diff --git a/abusiveexperiencereport/v1/abusiveexperiencereport-gen.go b/abusiveexperiencereport/v1/abusiveexperiencereport-gen.go index 87936b8c584..cf9fa5251df 100644 --- a/abusiveexperiencereport/v1/abusiveexperiencereport-gen.go +++ b/abusiveexperiencereport/v1/abusiveexperiencereport-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/abusive-experience-report/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // abusiveexperiencereportService, err := abusiveexperiencereport.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // abusiveexperiencereportService, err := abusiveexperiencereport.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // abusiveexperiencereportService, err := abusiveexperiencereport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package abusiveexperiencereport // import "google.golang.org/api/abusiveexperiencereport/v1" import ( diff --git a/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-gen.go b/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-gen.go index 6d60ef510ac..347b56bd9e0 100644 --- a/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-gen.go +++ b/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/amp/cache/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // acceleratedmobilepageurlService, err := acceleratedmobilepageurl.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // acceleratedmobilepageurlService, err := acceleratedmobilepageurl.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // acceleratedmobilepageurlService, err := acceleratedmobilepageurl.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package acceleratedmobilepageurl // import "google.golang.org/api/acceleratedmobilepageurl/v1" import ( diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index 6645b921e09..e7a01a49840 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/assured-workloads/access-approval/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // accessapprovalService, err := accessapproval.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // accessapprovalService, err := accessapproval.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // accessapprovalService, err := accessapproval.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package accessapproval // import "google.golang.org/api/accessapproval/v1" import ( diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index 8258b01fd7c..870691a8d86 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1235,7 +1235,7 @@ } } }, - "revision": "20230806", + "revision": "20230903", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1288,7 +1288,7 @@ "type": "string" }, "scopes": { - "description": "The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[\"folders/123\"] has the following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes \"folders/123\" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", + "description": "The scopes of the AccessPolicy. Scopes define which resources a policy can restrict and where its resources can be referenced. For example, policy A with `scopes=[\"folders/123\"]` has the following behavior: - ServicePerimeter can only restrict projects within `folders/123`. - ServicePerimeter within policy A can only reference access levels defined within policy A. - Only one policy can include a given scope; thus, attempting to create a second policy which includes `folders/123` will result in an error. If no scopes are provided, then any resource within the organization can be restricted. Scopes cannot be modified after a policy is created. Policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", "items": { "type": "string" }, diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index 87e5c91af6a..64a305800ae 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/access-context-manager/docs/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // accesscontextmanagerService, err := accesscontextmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // accesscontextmanagerService, err := accesscontextmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // accesscontextmanagerService, err := accesscontextmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package accesscontextmanager // import "google.golang.org/api/accesscontextmanager/v1" import ( @@ -298,19 +311,18 @@ type AccessPolicy struct { // `organizations/{organization_id}` Parent string `json:"parent,omitempty"` - // Scopes: The scopes of a policy define which resources an ACM policy - // can restrict, and where ACM resources can be referenced. For example, - // a policy with scopes=["folders/123"] has the following behavior: - - // vpcsc perimeters can only restrict projects within folders/123 - - // access levels can only be referenced by resources within folders/123. - // If empty, there are no limitations on which resources can be - // restricted by an ACM policy, and there are no limitations on where - // ACM resources can be referenced. Only one policy can include a given - // scope (attempting to create a second policy which includes - // "folders/123" will result in an error). Currently, scopes cannot be - // modified after a policy is created. Currently, policies can only have - // a single scope. Format: list of `folders/{folder_number}` or - // `projects/{project_number}` + // Scopes: The scopes of the AccessPolicy. Scopes define which resources + // a policy can restrict and where its resources can be referenced. For + // example, policy A with `scopes=["folders/123"]` has the following + // behavior: - ServicePerimeter can only restrict projects within + // `folders/123`. - ServicePerimeter within policy A can only reference + // access levels defined within policy A. - Only one policy can include + // a given scope; thus, attempting to create a second policy which + // includes `folders/123` will result in an error. If no scopes are + // provided, then any resource within the organization can be + // restricted. Scopes cannot be modified after a policy is created. + // Policies can only have a single scope. Format: list of + // `folders/{folder_number}` or `projects/{project_number}` Scopes []string `json:"scopes,omitempty"` // Title: Required. Human readable title. Does not affect behavior. diff --git a/accesscontextmanager/v1beta/accesscontextmanager-gen.go b/accesscontextmanager/v1beta/accesscontextmanager-gen.go index 45b1c73d498..c87b38a3a74 100644 --- a/accesscontextmanager/v1beta/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1beta/accesscontextmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/access-context-manager/docs/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // accesscontextmanagerService, err := accesscontextmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // accesscontextmanagerService, err := accesscontextmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // accesscontextmanagerService, err := accesscontextmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package accesscontextmanager // import "google.golang.org/api/accesscontextmanager/v1beta" import ( diff --git a/acmedns/v1/acmedns-gen.go b/acmedns/v1/acmedns-gen.go index 0d593ca14f9..299c9b95950 100644 --- a/acmedns/v1/acmedns-gen.go +++ b/acmedns/v1/acmedns-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/domains/acme-dns/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // acmednsService, err := acmedns.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // acmednsService, err := acmedns.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // acmednsService, err := acmedns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package acmedns // import "google.golang.org/api/acmedns/v1" import ( diff --git a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go index 8300c550302..6af67925afe 100644 --- a/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go +++ b/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/authorized-buyers/apis/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package adexchangebuyer2 // import "google.golang.org/api/adexchangebuyer2/v2beta1" import ( diff --git a/adexperiencereport/v1/adexperiencereport-gen.go b/adexperiencereport/v1/adexperiencereport-gen.go index c32547f2da2..e422df62514 100644 --- a/adexperiencereport/v1/adexperiencereport-gen.go +++ b/adexperiencereport/v1/adexperiencereport-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/ad-experience-report/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // adexperiencereportService, err := adexperiencereport.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adexperiencereportService, err := adexperiencereport.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adexperiencereportService, err := adexperiencereport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package adexperiencereport // import "google.golang.org/api/adexperiencereport/v1" import ( diff --git a/admin/datatransfer/v1/admin-gen.go b/admin/datatransfer/v1/admin-gen.go index 32bfddba512..2b8c7820871 100644 --- a/admin/datatransfer/v1/admin-gen.go +++ b/admin/datatransfer/v1/admin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admin-sdk/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // adminService, err := admin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // adminService, err := admin.NewService(ctx, option.WithScopes(admin.AdminDatatransferReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adminService, err := admin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adminService, err := admin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package admin // import "google.golang.org/api/admin/datatransfer/v1" import ( diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index d9d2f7aac70..d3bb54e7029 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4643,7 +4643,7 @@ } } }, - "revision": "20230814", + "revision": "20230905", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -5356,30 +5356,43 @@ "deprovisionReason": { "description": "(Read-only) Deprovision reason.", "enum": [ - "deprovisionReasonUnspecified", - "deprovisionReasonSameModelReplacement", - "deprovisionReasonUpgrade", - "deprovisionReasonDomainMove", - "deprovisionReasonServiceExpiration", - "deprovisionReasonOther", - "deprovisionReasonDifferentModelReplacement", - "deprovisionReasonRetiringDevice", - "deprovisionReasonUpgradeTransfer", - "deprovisionReasonNotRequired", - "deprovisionReasonRepairCenter" + "DEPROVISION_REASON_UNSPECIFIED", + "DEPROVISION_REASON_SAME_MODEL_REPLACEMENT", + "DEPROVISION_REASON_UPGRADE", + "DEPROVISION_REASON_DOMAIN_MOVE", + "DEPROVISION_REASON_SERVICE_EXPIRATION", + "DEPROVISION_REASON_OTHER", + "DEPROVISION_REASON_DIFFERENT_MODEL_REPLACEMENT", + "DEPROVISION_REASON_RETIRING_DEVICE", + "DEPROVISION_REASON_UPGRADE_TRANSFER", + "DEPROVISION_REASON_NOT_REQUIRED", + "DEPROVISION_REASON_REPAIR_CENTER" + ], + "enumDeprecated": [ + false, + false, + true, + true, + true, + true, + false, + false, + false, + false, + false ], "enumDescriptions": [ "The deprovision reason is unknown.", - "The device was replaced by a device with the same model.", + "Same model replacement. You have return materials authorization (RMA) or you are replacing a malfunctioning device under warranty with the same device model.", "The device was upgraded.", "The device's domain was changed.", "Service expired for the device.", "The device was deprovisioned for a legacy reason that is no longer supported.", - "The device was replaced by a device with a different model.", - "The device was retired.", - "The device's perpetual upgrade was transferred to a new device.", + "Different model replacement. You are replacing this device with an upgraded or newer device model.", + "Retiring from fleet. You are donating, discarding, or otherwise removing the device from use.", + "ChromeOS Flex upgrade transfer. This is a ChromeOS Flex device that you are replacing with a Chromebook within a year.", "A reason was not required. For example, the licenses were returned to the customer's license pool.", - "The device was deprovisioned by a repair service center." + "The device was deprovisioned by the Repair Service Center. Can only be set by Repair Service Center during RMA." ], "type": "string" }, @@ -5421,17 +5434,15 @@ "enterpriseUpgrade", "educationUpgrade", "education", - "terminal", "kioskUpgrade" ], "enumDescriptions": [ - "UNSPECIFIED type.", - "Indicating the device is a Chromebook/Chromebox/Chromebase enterprise, which is packaged with an upgrade(license).", - "Indicating the device is consuming standalone Chrome Enterprise Upgrade, a Chrome Enterprise license.", - "Indicating the device is consuming Chrome Education Upgrade(AKA Chrome EDU perpetual license).", - "Packaged with a license as education.", - "Packaged with a license as terminal.", - "Indicating the device is consuming standalone Chrome Kiosk Upgrade, a Chrome Kiosk (annual) license." + "The license type is unknown.", + "The device is bundled with a perpetual Chrome Enterprise Upgrade.", + "The device has an annual standalone Chrome Enterprise Upgrade.", + "The device has a perpetual standalone Chrome Education Upgrade.", + "The device is bundled with a perpetual Chrome Education Upgrade.", + "The device has an annual Kiosk Upgrade." ], "readOnly": true, "type": "string" diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 3104dd5583e..8defa19ae3e 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admin-sdk/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // adminService, err := admin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // adminService, err := admin.NewService(ctx, option.WithScopes(admin.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adminService, err := admin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adminService, err := admin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package admin // import "google.golang.org/api/admin/directory/v1" import ( @@ -1565,24 +1579,31 @@ type ChromeOsDevice struct { // DeprovisionReason: (Read-only) Deprovision reason. // // Possible values: - // "deprovisionReasonUnspecified" - The deprovision reason is unknown. - // "deprovisionReasonSameModelReplacement" - The device was replaced - // by a device with the same model. - // "deprovisionReasonUpgrade" - The device was upgraded. - // "deprovisionReasonDomainMove" - The device's domain was changed. - // "deprovisionReasonServiceExpiration" - Service expired for the + // "DEPROVISION_REASON_UNSPECIFIED" - The deprovision reason is + // unknown. + // "DEPROVISION_REASON_SAME_MODEL_REPLACEMENT" - Same model + // replacement. You have return materials authorization (RMA) or you are + // replacing a malfunctioning device under warranty with the same device + // model. + // "DEPROVISION_REASON_UPGRADE" - The device was upgraded. + // "DEPROVISION_REASON_DOMAIN_MOVE" - The device's domain was changed. + // "DEPROVISION_REASON_SERVICE_EXPIRATION" - Service expired for the // device. - // "deprovisionReasonOther" - The device was deprovisioned for a + // "DEPROVISION_REASON_OTHER" - The device was deprovisioned for a // legacy reason that is no longer supported. - // "deprovisionReasonDifferentModelReplacement" - The device was - // replaced by a device with a different model. - // "deprovisionReasonRetiringDevice" - The device was retired. - // "deprovisionReasonUpgradeTransfer" - The device's perpetual upgrade - // was transferred to a new device. - // "deprovisionReasonNotRequired" - A reason was not required. For + // "DEPROVISION_REASON_DIFFERENT_MODEL_REPLACEMENT" - Different model + // replacement. You are replacing this device with an upgraded or newer + // device model. + // "DEPROVISION_REASON_RETIRING_DEVICE" - Retiring from fleet. You are + // donating, discarding, or otherwise removing the device from use. + // "DEPROVISION_REASON_UPGRADE_TRANSFER" - ChromeOS Flex upgrade + // transfer. This is a ChromeOS Flex device that you are replacing with + // a Chromebook within a year. + // "DEPROVISION_REASON_NOT_REQUIRED" - A reason was not required. For // example, the licenses were returned to the customer's license pool. - // "deprovisionReasonRepairCenter" - The device was deprovisioned by a - // repair service center. + // "DEPROVISION_REASON_REPAIR_CENTER" - The device was deprovisioned + // by the Repair Service Center. Can only be set by Repair Service + // Center during RMA. DeprovisionReason string `json:"deprovisionReason,omitempty"` // DeviceFiles: A list of device files to download (Read-only) @@ -1594,18 +1615,16 @@ type ChromeOsDevice struct { // DeviceLicenseType: Output only. Device license type. // // Possible values: - // "deviceLicenseTypeUnspecified" - UNSPECIFIED type. - // "enterprise" - Indicating the device is a - // Chromebook/Chromebox/Chromebase enterprise, which is packaged with an - // upgrade(license). - // "enterpriseUpgrade" - Indicating the device is consuming standalone - // Chrome Enterprise Upgrade, a Chrome Enterprise license. - // "educationUpgrade" - Indicating the device is consuming Chrome - // Education Upgrade(AKA Chrome EDU perpetual license). - // "education" - Packaged with a license as education. - // "terminal" - Packaged with a license as terminal. - // "kioskUpgrade" - Indicating the device is consuming standalone - // Chrome Kiosk Upgrade, a Chrome Kiosk (annual) license. + // "deviceLicenseTypeUnspecified" - The license type is unknown. + // "enterprise" - The device is bundled with a perpetual Chrome + // Enterprise Upgrade. + // "enterpriseUpgrade" - The device has an annual standalone Chrome + // Enterprise Upgrade. + // "educationUpgrade" - The device has a perpetual standalone Chrome + // Education Upgrade. + // "education" - The device is bundled with a perpetual Chrome + // Education Upgrade. + // "kioskUpgrade" - The device has an annual Kiosk Upgrade. DeviceLicenseType string `json:"deviceLicenseType,omitempty"` // DiskVolumeReports: Reports of disk space and other info about diff --git a/admin/reports/v1/admin-gen.go b/admin/reports/v1/admin-gen.go index 0ad19757feb..040bd2874f8 100644 --- a/admin/reports/v1/admin-gen.go +++ b/admin/reports/v1/admin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admin-sdk/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // adminService, err := admin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // adminService, err := admin.NewService(ctx, option.WithScopes(admin.AdminReportsUsageReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adminService, err := admin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adminService, err := admin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package admin // import "google.golang.org/api/admin/reports/v1" import ( diff --git a/admob/v1/admob-gen.go b/admob/v1/admob-gen.go index b0f3849124c..d6aaa808658 100644 --- a/admob/v1/admob-gen.go +++ b/admob/v1/admob-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admob/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // admobService, err := admob.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // admobService, err := admob.NewService(ctx, option.WithScopes(admob.AdmobReportScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // admobService, err := admob.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // admobService, err := admob.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package admob // import "google.golang.org/api/admob/v1" import ( diff --git a/admob/v1beta/admob-api.json b/admob/v1beta/admob-api.json index 065d8dd1627..7314b817b94 100644 --- a/admob/v1beta/admob-api.json +++ b/admob/v1beta/admob-api.json @@ -202,12 +202,115 @@ "response": { "$ref": "ListAdSourcesResponse" }, + "scopes": [ + "https://www.googleapis.com/auth/admob.readonly", + "https://www.googleapis.com/auth/admob.report" + ], + "streamingType": "NONE" + } + }, + "resources": { + "adapters": { + "methods": { + "list": { + "description": "List the adapters of the ad source.", + "flatPath": "v1beta/accounts/{accountsId}/adSources/{adSourcesId}/adapters", + "httpMethod": "GET", + "id": "admob.accounts.adSources.adapters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of adapters to return. If unspecified or 0, at most 10,000 adapters will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListAdapters` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent which owns this collection of adapters. Format: accounts/{publisher_id}/adSources/{ad_source_id}", + "location": "path", + "pattern": "^accounts/[^/]+/adSources/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/adapters", + "response": { + "$ref": "ListAdaptersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admob.readonly" + ], + "streamingType": "NONE" + } + } + } + } + }, + "adUnitMappings": { + "methods": { + "batchCreate": { + "description": "Batch create the ad unit mappings under the specific AdMob account. The maximum allowed batch size is 100. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/adUnitMappings:batchCreate", + "httpMethod": "POST", + "id": "admob.accounts.adUnitMappings.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The AdMob account which owns this collection of ad unit mappings. Format: accounts/{publisher_id} See https://support.google.com/admob/answer/2784578 for instructions on how to find your AdMob publisher ID.", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/adUnitMappings:batchCreate", + "request": { + "$ref": "BatchCreateAdUnitMappingsRequest" + }, + "response": { + "$ref": "BatchCreateAdUnitMappingsResponse" + }, "streamingType": "NONE" } } }, "adUnits": { "methods": { + "create": { + "description": "Creates an ad unit under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/adUnits", + "httpMethod": "POST", + "id": "admob.accounts.adUnits.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the account to create the specified ad unit for. Example: accounts/pub-9876543210987654", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/adUnits", + "request": { + "$ref": "AdUnit" + }, + "response": { + "$ref": "AdUnit" + }, + "streamingType": "NONE" + }, "list": { "description": "List the ad units under the specified AdMob account.", "flatPath": "v1beta/accounts/{accountsId}/adUnits", @@ -245,10 +348,110 @@ ], "streamingType": "NONE" } + }, + "resources": { + "adUnitMappings": { + "methods": { + "create": { + "description": "Create an ad unit mapping under the specific AdMob account and ad unit. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/adUnits/{adUnitsId}/adUnitMappings", + "httpMethod": "POST", + "id": "admob.accounts.adUnits.adUnitMappings.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent which owns the ad unit mapping. Format: accounts/{publisher_id}/adUnits/{ad_unit_id}", + "location": "path", + "pattern": "^accounts/[^/]+/adUnits/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/adUnitMappings", + "request": { + "$ref": "AdUnitMapping" + }, + "response": { + "$ref": "AdUnitMapping" + }, + "streamingType": "NONE" + }, + "list": { + "description": "List ad unit mappings under the specified AdMob account and ad unit. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/adUnits/{adUnitsId}/adUnitMappings", + "httpMethod": "GET", + "id": "admob.accounts.adUnits.adUnitMappings.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter string that uses [EBNF grammar syntax](https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible field to filter by is: - \"DISPLAY_NAME\" Possible filter function is: - `IN`: Used to filter fields that represent a singleton including \"DISPLAY_NAME\". The filter functions can be added together using `AND`. `OR` functionality is not supported. Example: filter: IN(DISPLAY_NAME, \"Test Ad Unit Mapping 1\", \"Test Ad Unit Mapping 2\")", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of ad unit mappings to return. If unspecified or 0, at most 10,000 ad unit mappings will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListAdUnitMappings` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent which owns this collection of ad unit mappings. Format: accounts/{publisher_id}/adUnits/{ad_unit_id}", + "location": "path", + "pattern": "^accounts/[^/]+/adUnits/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/adUnitMappings", + "response": { + "$ref": "ListAdUnitMappingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admob.readonly" + ], + "streamingType": "NONE" + } + } + } } }, "apps": { "methods": { + "create": { + "description": "Creates an app under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/apps", + "httpMethod": "POST", + "id": "admob.accounts.apps.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the account for which the app is being created. Example: accounts/pub-9876543210987654", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/apps", + "request": { + "$ref": "App" + }, + "response": { + "$ref": "App" + }, + "streamingType": "NONE" + }, "list": { "description": "List the apps under the specified AdMob account.", "flatPath": "v1beta/accounts/{accountsId}/apps", @@ -288,6 +491,202 @@ } } }, + "campaignReport": { + "methods": { + "generate": { + "description": "Generates Campaign Report based on provided specifications.", + "flatPath": "v1beta/accounts/{accountsId}/campaignReport:generate", + "httpMethod": "POST", + "id": "admob.accounts.campaignReport.generate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Resource name of the account to generate the report for. Example: accounts/pub-9876543210987654", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/campaignReport:generate", + "request": { + "$ref": "GenerateCampaignReportRequest" + }, + "response": { + "$ref": "GenerateCampaignReportResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admob.readonly", + "https://www.googleapis.com/auth/admob.report" + ], + "streamingType": "NONE" + } + } + }, + "mediationGroups": { + "methods": { + "create": { + "description": "Create a mediation group under the specific AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/mediationGroups", + "httpMethod": "POST", + "id": "admob.accounts.mediationGroups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent which owns the mediation group. Format: accounts/{publisher_id}", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/mediationGroups", + "request": { + "$ref": "MediationGroup" + }, + "response": { + "$ref": "MediationGroup" + }, + "streamingType": "NONE" + }, + "list": { + "description": "List mediation groups under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/mediationGroups", + "httpMethod": "GET", + "id": "admob.accounts.mediationGroups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter string that uses [EBNF grammar syntax](https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible fields to filter by are: - \"AD_SOURCE_IDS\" - \"AD_UNIT_IDS\" - \"APP_IDS\" - \"DISPLAY_NAME\" - \"FORMAT\" - \"MEDIATION_GROUP_ID\" - \"PLATFORM\" - \"STATE\" - \"TARGETED_REGION_CODES\" Possible filter functions are: - `IN`: Used to filter fields that represent a singleton including \"MEDIATION_GROUP_ID\", \"DISPLAY_NAME\", \"STATE\", \"PLATFORM\", and \"FORMAT\". - `CONTAINS_ANY`: Used to filter fields that represent a collection including \"AD_SOURCE_IDS\", \"AD_UNIT_IDS\", \"APP_IDS\", and \"TARGETED_REGION_CODES\". The filter functions can be added together using `AND`. `OR` functionality is not supported. Example: filter: IN(DISPLAY_NAME, \"Test Group 1\", \"Test Group 2\") AND IN(PLATFORM, \"ANDROID\") AND CONTAINS_ANY(AD_SOURCE_IDS, \"5450213213286189855\")", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of mediation groups to return. If unspecified or 0, at most 10,000 mediation groups will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListMediationGroupsResponse`; indicates that this is a continuation of a prior `ListMediationGroups` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the account to list mediation groups for. Example: accounts/pub-9876543210987654", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/mediationGroups", + "response": { + "$ref": "ListMediationGroupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/admob.readonly" + ], + "streamingType": "NONE" + }, + "patch": { + "description": "Update the specified mediation group under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}", + "httpMethod": "PATCH", + "id": "admob.accounts.mediationGroups.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789", + "location": "path", + "pattern": "^accounts/[^/]+/mediationGroups/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "List of mediation group fields to be updated. Updates to repeated fields such as items in a list will fully replace the existing value(s) with the new value(s). Updates to individual values in a map can be done by indexing by the key. The following field masks are supported for mediation group updates: - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"]\" clang-format off - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].ad_unit_mappings[\\\"{ad_unit_id}\\\"]\" clang-format on - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].cpm_micros\" - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].cpm_mode\" - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].state\" - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].display_name\" - \"targeting.ad_unit_ids\" To update a mediation group with a new mediation group line, use a distinct negative number for the \"mediation_group_line_id\". For Example: update_mask { paths: \"mediation_group_lines[\\\"123456789012345\\\"].cpm_micros\" }", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "MediationGroup" + }, + "response": { + "$ref": "MediationGroup" + }, + "streamingType": "NONE" + } + }, + "resources": { + "mediationAbExperiments": { + "methods": { + "create": { + "description": "Create an A/B testing experiment for a specified AdMob account and a mediation group. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}/mediationAbExperiments", + "httpMethod": "POST", + "id": "admob.accounts.mediationGroups.mediationAbExperiments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent which owns the mediation group. Format: accounts/{publisher_id}/mediationGroups/{mediation_group_id}", + "location": "path", + "pattern": "^accounts/[^/]+/mediationGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/mediationAbExperiments", + "request": { + "$ref": "MediationAbExperiment" + }, + "response": { + "$ref": "MediationAbExperiment" + }, + "streamingType": "NONE" + }, + "stop": { + "description": "Stop the mediation A/B experiment and choose a variant. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + "flatPath": "v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}/mediationAbExperiments:stop", + "httpMethod": "POST", + "id": "admob.accounts.mediationGroups.mediationAbExperiments.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the mediation group, the experiment for which to choose a variant for. Example: accounts/pub-9876543210987654/mediationGroups/0123456789/ mediationAbExperiments", + "location": "path", + "pattern": "^accounts/[^/]+/mediationGroups/[^/]+/mediationAbExperiments$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:stop", + "request": { + "$ref": "StopMediationAbExperimentRequest" + }, + "response": { + "$ref": "MediationAbExperiment" + }, + "streamingType": "NONE" + } + } + } + } + }, "mediationReport": { "methods": { "generate": { @@ -359,7 +758,7 @@ } } }, - "revision": "20230425", + "revision": "20230907", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdSource": { @@ -411,6 +810,128 @@ "name": { "description": "Resource name for this ad unit. Format is accounts/{publisher_id}/adUnits/{ad_unit_id_fragment} Example: accounts/pub-9876543210987654/adUnits/0123456789", "type": "string" + }, + "rewardSettings": { + "$ref": "AdUnitRewardSettings", + "description": "Optional. Settings for a rewarded ad unit. This can be set or unset only when the ad_format is \"REWARDED\"." + } + }, + "type": "object" + }, + "AdUnitMapping": { + "description": "Settings to map an AdMob ad unit to a 3rd party ad unit.", + "id": "AdUnitMapping", + "properties": { + "adUnitConfigurations": { + "additionalProperties": { + "type": "string" + }, + "description": "Settings for the specified ad unit to make an ad request to 3rd party ad network. Key-value pairs with values set by the user for the keys requested by the ad network. Please see https://support.google.com/admob/answer/3245073 for details on how to configure the network settings.", + "type": "object" + }, + "adapterId": { + "description": "The ID of mediation ad source adapter used by this ad unit mapping. The adapter determines the information needed in the ad_network_settings.", + "format": "int64", + "type": "string" + }, + "displayName": { + "description": "Optional. The display name of this ad unit mapping instance.", + "type": "string" + }, + "name": { + "description": "Resource name of this ad unit mapping. Format is: accounts/{publisher_id}/adUnits/{ad_unit_id_fragment}/adUnitMappings/{ad_unit_mapping_id} Example: accounts/pub-1234567890123456/adUnits/0123456789/adUnitMappings/987654321", + "type": "string" + }, + "state": { + "description": "Output only. The status of this ad unit mapping.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLED" + ], + "enumDescriptions": [ + "The default value.", + "The ad unit mapping is active and used to serve ads or collecting stats." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AdUnitRewardSettings": { + "description": "Settings for a rewarded ad unit.", + "id": "AdUnitRewardSettings", + "properties": { + "unitAmount": { + "description": "Reward amount for this ad unit.", + "format": "int64", + "type": "string" + }, + "unitType": { + "description": "Reward item for this ad unit.", + "type": "string" + } + }, + "type": "object" + }, + "Adapter": { + "description": "Describes adapters supported by each mediation ad source. Adapters correspond to a specific SDK implementation of the ad source, and are each associated with a single platform and a list of supported ad unit formats. Adapters may also require setting some configurations to perform ad requests. Configurations can be specified in the AdUnitMapping by setting the [ad_unit_configurations](#AdUnitMapping.ad_unit_configurations) key/value pairs. For example, the ad_unit_configurations can be used to pass various IDs to the adapter's third-party SDK.", + "id": "Adapter", + "properties": { + "adapterConfigMetadata": { + "description": "Output only. Configuration metadata associated with this adapter.", + "items": { + "$ref": "AdapterAdapterConfigMetadata" + }, + "readOnly": true, + "type": "array" + }, + "adapterId": { + "description": "Output only. ID of this adapter. It is used to set [adapter_id](#AdUnitMapping.adapter_id).", + "readOnly": true, + "type": "string" + }, + "formats": { + "description": "Output only. Indicates the formats of the ad units supported by this adapter.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Output only. Resource name of the adapter. Format is: accounts/{publisher_id}/adSources/{ad_source_id}/adapters/{adapter_id}.", + "readOnly": true, + "type": "string" + }, + "platform": { + "description": "Output only. Mobile application platform supported by this adapter. Supported values are: IOS, ANDROID, WINDOWS_PHONE", + "readOnly": true, + "type": "string" + }, + "title": { + "description": "Output only. The display name of this adapter.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AdapterAdapterConfigMetadata": { + "description": "Configuration metadata associated with this adapter. They are used to define the ad_unit_configurations associated with AdUnitMappings for the this adapter.", + "id": "AdapterAdapterConfigMetadata", + "properties": { + "adapterConfigMetadataId": { + "description": "This is used to fill the key of the [ad_unit_configurations](#AdUnitMapping.ad_unit_configurations).", + "type": "string" + }, + "adapterConfigMetadataLabel": { + "description": "Name of the adapter configuration metadata.", + "type": "string" + }, + "isRequired": { + "description": "Whether this metadata is required for configuring the AdUnitMappings.", + "type": "boolean" } }, "type": "object" @@ -459,28 +980,169 @@ }, "type": "object" }, - "AppLinkedAppInfo": { - "description": "Information from the app store if the app is linked to an app store.", - "id": "AppLinkedAppInfo", + "AppLinkedAppInfo": { + "description": "Information from the app store if the app is linked to an app store.", + "id": "AppLinkedAppInfo", + "properties": { + "androidAppStores": { + "description": "Optional. The app store information for published Android apps. This field is only used for apps on the Android platform and will be ignored if the PLATFORM is set to iOS. The default value is the Google Play App store. This field can be updated after app is created. If the app is not published, this field will not be included in the response.", + "items": { + "enum": [ + "ANDROID_APP_STORE_UNSPECIFIED", + "GOOGLE_PLAY_APP_STORE", + "AMAZON_APP_STORE", + "OPPO_APP_STORE", + "SAMSUNG_APP_STORE", + "VIVO_APP_STORE", + "XIAOMI_APP_STORE" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "Google Play Store.", + "Amazon Appstore.", + "Oppo App Market.", + "Samsung Galaxy Store.", + "VIVO App Store.", + "Xiaomi GetApps." + ], + "type": "string" + }, + "type": "array" + }, + "appStoreId": { + "description": "The app store ID of the app; present if and only if the app is linked to an app store. If the app is added to the Google Play store, it will be the application ID of the app. For example: \"com.example.myapp\". See https://developer.android.com/studio/build/application-id. If the app is added to the Apple App Store, it will be app store ID. For example \"105169111\". Note that setting the app store id is considered an irreversible action. Once an app is linked, it cannot be unlinked.", + "type": "string" + }, + "displayName": { + "description": "Output only. Display name of the app as it appears in the app store. This is an output-only field, and may be empty if the app cannot be found in the store.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AppManualAppInfo": { + "description": "Information provided for manual apps which are not linked to an application store (Example: Google Play, App Store).", + "id": "AppManualAppInfo", + "properties": { + "displayName": { + "description": "The display name of the app as shown in the AdMob UI, which is provided by the user. The maximum length allowed is 80 characters.", + "type": "string" + } + }, + "type": "object" + }, + "BatchCreateAdUnitMappingsRequest": { + "description": "Request to create a batch of ad unit mappings under the specific AdMob account.", + "id": "BatchCreateAdUnitMappingsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the ad unit mappings to create. A maximum of 100 ad unit mappings can be created in a batch. If the number of ad unit mappings in the batch request exceed 100, the entire request will be rejected and no ad unit mappings will be created.", + "items": { + "$ref": "CreateAdUnitMappingRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateAdUnitMappingsResponse": { + "description": "Response containing a batch of created ad unit mappings.", + "id": "BatchCreateAdUnitMappingsResponse", "properties": { - "appStoreId": { - "description": "The app store ID of the app; present if and only if the app is linked to an app store. If the app is added to the Google Play store, it will be the application ID of the app. For example: \"com.example.myapp\". See https://developer.android.com/studio/build/application-id. If the app is added to the Apple App Store, it will be app store ID. For example \"105169111\". Note that setting the app store id is considered an irreversible action. Once an app is linked, it cannot be unlinked.", - "type": "string" + "adUnitMappings": { + "description": "The Ad units mappings created under the requested account.", + "items": { + "$ref": "AdUnitMapping" + }, + "type": "array" + } + }, + "type": "object" + }, + "CampaignReportSpec": { + "description": "The specification for generating a Campaign report. For example, the specification to get IMPRESSIONS and CLICKS sliced by CAMPAIGN_ID can look like the following example: { \"date_range\": { \"start_date\": {\"year\": 2021, \"month\": 12, \"day\": 1}, \"end_date\": {\"year\": 2021, \"month\": 12, \"day\": 30} }, \"dimensions\": [\"CAMPAIGN_ID\"], \"metrics\": [\"IMPRESSIONS\", \"CLICKS\"], }", + "id": "CampaignReportSpec", + "properties": { + "dateRange": { + "$ref": "DateRange", + "description": "The date range for which the report is generated. The max range is 30 days." }, - "displayName": { - "description": "Output only. Display name of the app as it appears in the app store. This is an output-only field, and may be empty if the app cannot be found in the store.", - "readOnly": true, + "dimensions": { + "description": "List of dimensions of the report. The value combination of these dimensions determines the row of the report. If no dimensions are specified, the report returns a single row of requested metrics for the entire account.", + "items": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "DATE", + "CAMPAIGN_ID", + "CAMPAIGN_NAME", + "AD_ID", + "AD_NAME", + "PLACEMENT_ID", + "PLACEMENT_NAME", + "PLACEMENT_PLATFORM", + "COUNTRY", + "FORMAT" + ], + "enumDescriptions": [ + "Default value of an unspecified dimension. Do not use.", + "A date in the YYYYMMDD format (for example, \"20210701\").", + "The unique ID of the campaign, for example \"123456789\", which is consistent with the campaign id from campaign list api.", + "The name of the campaign.", + "The unique ID of the ad, for example \"123456789\".", + "The name of the ad, which may not be unique.", + "The vendor-specific unique ID of the app where the ad is placed. For example, com.goog.bar for Android and 123456789 for iOS apps.", + "The name of the app where the ad is placed.", + "The platform of the app where the ad is placed.", + "The name of the targeted country.", + "Format of the ad unit (for example, \"banner\", \"native\"), an ad delivery dimension." + ], + "type": "string" + }, + "type": "array" + }, + "languageCode": { + "description": "Language used for any localized text, such as certain applicable dimension values. The language tag is defined in the IETF BCP47. Defaults to 'en-US' if unspecified or invalid.", "type": "string" + }, + "metrics": { + "description": "List of metrics of the report. A report must specify at least one metric.", + "items": { + "enum": [ + "METRIC_UNSPECIFIED", + "IMPRESSIONS", + "CLICKS", + "CLICK_THROUGH_RATE", + "INSTALLS", + "ESTIMATED_COST", + "AVERAGE_CPI" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "The number of times an ad is shown to the user.", + "The number of times a user clicks an ad.", + "The number of clicks an ad receives divided by the number of times the ad is shown.", + "The number of times apps were downloaded to devices.", + "The estimated cost of serving a campaign ad instead of an ad that earns revenue. The currency is the reporting currency for campaigns.", + "The average cost per install. This means the average amount that was spent to acquire a new user. The currency is the reporting currency for campaigns." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "AppManualAppInfo": { - "description": "Information provided for manual apps which are not linked to an application store (Example: Google Play, App Store).", - "id": "AppManualAppInfo", + "CreateAdUnitMappingRequest": { + "description": "Request to create an ad unit mapping under the specific AdMob account and ad unit.", + "id": "CreateAdUnitMappingRequest", "properties": { - "displayName": { - "description": "The display name of the app as shown in the AdMob UI, which is provided by the user. The maximum length allowed is 80 characters.", + "adUnitMapping": { + "$ref": "AdUnitMapping", + "description": "Required. The ad unit mapping to create." + }, + "parent": { + "description": "Required. The parent which owns the ad unit mapping. Format: accounts/{publisher_id}/adUnits/{ad_unit_id}", "type": "string" } }, @@ -523,6 +1185,31 @@ }, "type": "object" }, + "GenerateCampaignReportRequest": { + "description": "Request to generate campaign report.", + "id": "GenerateCampaignReportRequest", + "properties": { + "reportSpec": { + "$ref": "CampaignReportSpec", + "description": "Campaign report specification." + } + }, + "type": "object" + }, + "GenerateCampaignReportResponse": { + "description": "Campaign Report API response.", + "id": "GenerateCampaignReportResponse", + "properties": { + "rows": { + "description": "The campaign report data from the specified publisher. At most 100000 rows will be returned from the API.", + "items": { + "$ref": "ReportRow" + }, + "type": "array" + } + }, + "type": "object" + }, "GenerateMediationReportRequest": { "description": "Request to generate an AdMob mediation report.", "id": "GenerateMediationReportRequest", @@ -601,6 +1288,24 @@ }, "type": "object" }, + "ListAdUnitMappingsResponse": { + "description": "Response for the ListAdUnitMappingsRequest.", + "id": "ListAdUnitMappingsResponse", + "properties": { + "adUnitMappings": { + "description": "The ad unit mappings from the specified account and ad unit.", + "items": { + "$ref": "AdUnitMapping" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Used to set the `page_token` in the `ListAdUnitMappingsRequest` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "ListAdUnitsResponse": { "description": "Response for the ad units list request.", "id": "ListAdUnitsResponse", @@ -619,6 +1324,24 @@ }, "type": "object" }, + "ListAdaptersResponse": { + "description": "Response for the ListAdaptersRequest.", + "id": "ListAdaptersResponse", + "properties": { + "adapters": { + "description": "The adapter.", + "items": { + "$ref": "Adapter" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Used to set the `page_token` in the `ListAdapterRequest` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "ListAppsResponse": { "description": "Response for the apps list request.", "id": "ListAppsResponse", @@ -637,6 +1360,24 @@ }, "type": "object" }, + "ListMediationGroupsResponse": { + "description": "Response for the mediation groups list request.", + "id": "ListMediationGroupsResponse", + "properties": { + "mediationGroups": { + "description": "The resulting mediation groups for the requested account.", + "items": { + "$ref": "MediationGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If not empty, indicates that there may be more mediation groups for the request; this value should be passed in a new `ListMediationGroupsRequest`.", + "type": "string" + } + }, + "type": "object" + }, "ListPublisherAccountsResponse": { "description": "Response for the publisher account list request.", "id": "ListPublisherAccountsResponse", @@ -670,6 +1411,265 @@ }, "type": "object" }, + "MediationAbExperiment": { + "description": "The mediation A/B experiment. NEXT ID: 12", + "id": "MediationAbExperiment", + "properties": { + "controlMediationLines": { + "description": "Output only. The experiment mediation lines for control. They are inherited from the parent mediation group. It is an output only field.", + "items": { + "$ref": "MediationAbExperimentExperimentMediationLine" + }, + "readOnly": true, + "type": "array" + }, + "displayName": { + "description": "The display name for the mediation A/B experiment.", + "type": "string" + }, + "experimentId": { + "description": "Output only. Unique identifier for the mediation A/B experiment. It is an output only property.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Resource name for this experiment. The format is accounts/{publisher_id}/ mediationGroups/{mediation_group_id}/mediationAbExperiment/ {mediation_group_experiment_id}. For example: accounts/pub-9876543210987654/mediationGroups/0123456789/ mediationAbExperiment/12345", + "type": "string" + }, + "state": { + "description": "Output only. The state of the experiment. It is an output only field.", + "enum": [ + "EXPERIMENT_STATE_UNSPECIFIED", + "EXPIRED", + "RUNNING", + "ENDED" + ], + "enumDescriptions": [ + "Default for an unset field. Do not use.", + "The experiment has expired.", + "The experiment is running and thus used in serving.", + "The experiment is ended, but not yet expired. Serving continues in the original configurations while the experiment is ready to call an action." + ], + "readOnly": true, + "type": "string" + }, + "treatmentMediationLines": { + "description": "The experiment mediation lines created for the treatment. They will be used for serving when the experiment status is RUNNING.", + "items": { + "$ref": "MediationAbExperimentExperimentMediationLine" + }, + "type": "array" + }, + "treatmentTrafficPercentage": { + "description": "The percentage of the mediation A/B experiment traffic that will be send to the treatment (variant B). The remainder is sent to the control (variant A). The percentage is expressed as an integer in the inclusive range of [1,99]. See https://support.google.com/admob/answer/9572326 for details.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "MediationAbExperimentExperimentMediationLine": { + "description": "The mediation group line for the experiment. It will be used for serving during the run of the experiment.", + "id": "MediationAbExperimentExperimentMediationLine", + "properties": { + "mediationGroupLine": { + "$ref": "MediationGroupMediationGroupLine", + "description": "The mediation group line used by the experiment." + } + }, + "type": "object" + }, + "MediationGroup": { + "description": "Describes an AdMob mediation group.", + "id": "MediationGroup", + "properties": { + "displayName": { + "description": "User provided name for the mediation group. The maximum length allowed is 120 characters.", + "type": "string" + }, + "mediationAbExperimentState": { + "description": "Output only. The state of the mediation a/b experiment that belongs to this mediation group.", + "enum": [ + "EXPERIMENT_STATE_UNSPECIFIED", + "RUNNING", + "NOT_RUNNING" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "The mediation group has an experiment in the RUNNING state.", + "There is no experiment in the RUNNING state in the mediation group." + ], + "readOnly": true, + "type": "string" + }, + "mediationGroupId": { + "description": "The ID of the mediation group. Example: \"0123456789\". This is a read only property.", + "type": "string" + }, + "mediationGroupLines": { + "additionalProperties": { + "$ref": "MediationGroupMediationGroupLine" + }, + "description": "The mediation lines used for serving for this mediation group. Key is the ID of the mediation group line. For creation, use distinct negative values as placeholder.", + "type": "object" + }, + "name": { + "description": "Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789", + "type": "string" + }, + "state": { + "description": "The status of the mediation group. Only enabled mediation groups will be served.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "The mediation group is active and used to serve ads or to collect stats.", + "The mediation group has been disabled and is no longer serving ads or collecting stats. Disabled mediation groups can be re-enabled." + ], + "type": "string" + }, + "targeting": { + "$ref": "MediationGroupTargeting", + "description": "Set of criteria targeted by this mediation group, such as ad units and geo locations." + } + }, + "type": "object" + }, + "MediationGroupMediationGroupLine": { + "description": "Settings for an ad network used by a mediation group.", + "id": "MediationGroupMediationGroupLine", + "properties": { + "adSourceId": { + "description": "The ID of the ad source this mediation line is associated with.", + "type": "string" + }, + "adUnitMappings": { + "additionalProperties": { + "type": "string" + }, + "description": "References of the ad unit mappings for each ad unit associated with this mediation line. Key is the ad unit ID, value is resource name of the ad unit mapping. For mediation lines where the ad source id is the AdMob Network, ad unit mappings will be ignored.", + "type": "object" + }, + "cpmMicros": { + "description": "The CPM for this allocation line. $0.01 is the minimum allowed amount. For LIVE CPM modes, the default amount is $0.01. This value is ignored if `cpm_mode` is `LIVE`. **Warning:** \"USD\" is the only supported currency at the moment. The unit is in micros.", + "format": "int64", + "type": "string" + }, + "cpmMode": { + "description": "Indicates how the CPM for this mediation line is provided. Note that `MANUAL` and `LIVE` are the only fully-supported mode at the moment. Please use the AdMob UI (https://admob.google.com) if you wish to create or update to other cpm modes.", + "enum": [ + "CPM_MODE_UNSPECIFIED", + "LIVE", + "MANUAL", + "ANO" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "CPM is calculated per ad request based on the ad auction.", + "CPM is set by the user manually.", + "CPM is retrieved from the ad network using the publisher specified credentials. Output only." + ], + "type": "string" + }, + "displayName": { + "description": "User-provided label for this mediation line. The maximum length allowed is 255 characters.", + "type": "string" + }, + "experimentVariant": { + "description": "Output only. The Mediation A/B experiment variant to which the mediation group line belongs to.", + "enum": [ + "VARIANT_UNSPECIFIED", + "VARIANT_A", + "VARIANT_B", + "ORIGINAL" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "The mediation group line belongs to the variant A.", + "The mediation group line belongs to the variant B.", + "The mediation group line isn't a part of an experiment." + ], + "readOnly": true, + "type": "string" + }, + "id": { + "description": "The 16 digit ID for this mediation line e.g. 0123456789012345. When creating a new mediation group line, use a distinct negative integer as the ID place holder.", + "type": "string" + }, + "state": { + "description": "The status of the mediation group line. Only enabled mediation group lines will be served.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLED", + "DISABLED", + "REMOVED" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "The mediation group line is active and used to serve ads.", + "The mediation group line has been disabled and is no longer served. Disabled mediation group lines can be re-enabled.", + "The mediation group line will be removed and no longer served. Removed mediation group lines can not be re-enabled and will no longer be visible. This is an input only field." + ], + "type": "string" + } + }, + "type": "object" + }, + "MediationGroupTargeting": { + "description": "Set of criteria targeted by this mediation group. For example, a mediation group can target specific ad unit IDs, platform, format and geo location.", + "id": "MediationGroupTargeting", + "properties": { + "adUnitIds": { + "description": "Ad units targeted by this mediation group. Example: \"ca-app-pub-1234/8790\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "excludedRegionCodes": { + "description": "The Unicode country/region code (CLDR) of a location, such as \"US\". Unset if this mediation group does not exclude any region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "format": { + "description": "Ad format targeted by this mediation group. Examples: \"banner\", \"native\".", + "type": "string" + }, + "idfaTargeting": { + "description": "The parameter can be used to target ad requests based on the availability of the IDFA. If set to ALL, the mediation group applies to all ad requests (with or without IDFA). If set to AVAILABLE, the mediation group applies to ad requests with IDFA. If set to NOT_AVAILABLE, the mediation group applies to ad requests without IDFA. Doesn't need to be specified for an ANDROID device.", + "enum": [ + "IDFA_TARGETING_UNSPECIFIED", + "ALL", + "AVAILABLE", + "NOT_AVAILABLE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "All the devices are targeted, regardless of IDFA availability.", + "Only the devices with IDFA availability are targeted.", + "Only the devices without IDFA availability are targeted." + ], + "type": "string" + }, + "platform": { + "description": "Describes the platform of the app. Examples: \"IOS\", \"Android\".", + "type": "string" + }, + "targetedRegionCodes": { + "description": "The Unicode country/region code (CLDR) of a location, such as \"US\". Unset if this mediation group targets all available regions. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "MediationReportSpec": { "description": "The specification for generating an AdMob Mediation report. For example, the specification to get observed ECPM sliced by ad source and app for the 'US' and 'CN' countries can look like the following example: { \"date_range\": { \"start_date\": {\"year\": 2021, \"month\": 9, \"day\": 1}, \"end_date\": {\"year\": 2021, \"month\": 9, \"day\": 30} }, \"dimensions\": [\"AD_SOURCE\", \"APP\", \"COUNTRY\"], \"metrics\": [\"OBSERVED_ECPM\"], \"dimension_filters\": [ { \"dimension\": \"COUNTRY\", \"matches_any\": {\"values\": [{\"value\": \"US\", \"value\": \"CN\"}]} } ], \"sort_conditions\": [ {\"dimension\":\"APP\", order: \"ASCENDING\"} ], \"localization_settings\": { \"currency_code\": \"USD\", \"language_code\": \"en-US\" } } For a better understanding, you can treat the preceding specification like the following pseudo SQL: SELECT AD_SOURCE, APP, COUNTRY, OBSERVED_ECPM FROM MEDIATION_REPORT WHERE DATE \u003e= '2021-09-01' AND DATE \u003c= '2021-09-30' AND COUNTRY IN ('US', 'CN') GROUP BY AD_SOURCE, APP, COUNTRY ORDER BY APP ASC;", "id": "MediationReportSpec", @@ -1306,6 +2306,27 @@ }, "type": "object" }, + "StopMediationAbExperimentRequest": { + "description": "Request to end the mediation A/B experiment and choose a winning variant.", + "id": "StopMediationAbExperimentRequest", + "properties": { + "variantChoice": { + "description": "The choice for the winning variant.", + "enum": [ + "VARIANT_CHOICE_UNSPECIFIED", + "VARIANT_CHOICE_A", + "VARIANT_CHOICE_B" + ], + "enumDescriptions": [ + "Default value for an unset field. Do not use.", + "Use the mediation lines from Variant A and complete the experiment. Variant A contains the original serving lines before the experiment creation.", + "Use the mediation lines form Variant B and complete the experiment. Variant B contains the newly added serving lines." + ], + "type": "string" + } + }, + "type": "object" + }, "StringList": { "description": "List of string values.", "id": "StringList", diff --git a/admob/v1beta/admob-gen.go b/admob/v1beta/admob-gen.go index 058242600dd..d6b4c71c277 100644 --- a/admob/v1beta/admob-gen.go +++ b/admob/v1beta/admob-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admob/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // admobService, err := admob.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // admobService, err := admob.NewService(ctx, option.WithScopes(admob.AdmobReportScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // admobService, err := admob.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // admobService, err := admob.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package admob // import "google.golang.org/api/admob/v1beta" import ( @@ -148,8 +162,11 @@ func (s *Service) userAgent() string { func NewAccountsService(s *Service) *AccountsService { rs := &AccountsService{s: s} rs.AdSources = NewAccountsAdSourcesService(s) + rs.AdUnitMappings = NewAccountsAdUnitMappingsService(s) rs.AdUnits = NewAccountsAdUnitsService(s) rs.Apps = NewAccountsAppsService(s) + rs.CampaignReport = NewAccountsCampaignReportService(s) + rs.MediationGroups = NewAccountsMediationGroupsService(s) rs.MediationReport = NewAccountsMediationReportService(s) rs.NetworkReport = NewAccountsNetworkReportService(s) return rs @@ -160,10 +177,16 @@ type AccountsService struct { AdSources *AccountsAdSourcesService + AdUnitMappings *AccountsAdUnitMappingsService + AdUnits *AccountsAdUnitsService Apps *AccountsAppsService + CampaignReport *AccountsCampaignReportService + + MediationGroups *AccountsMediationGroupsService + MediationReport *AccountsMediationReportService NetworkReport *AccountsNetworkReportService @@ -171,20 +194,53 @@ type AccountsService struct { func NewAccountsAdSourcesService(s *Service) *AccountsAdSourcesService { rs := &AccountsAdSourcesService{s: s} + rs.Adapters = NewAccountsAdSourcesAdaptersService(s) return rs } type AccountsAdSourcesService struct { s *Service + + Adapters *AccountsAdSourcesAdaptersService +} + +func NewAccountsAdSourcesAdaptersService(s *Service) *AccountsAdSourcesAdaptersService { + rs := &AccountsAdSourcesAdaptersService{s: s} + return rs +} + +type AccountsAdSourcesAdaptersService struct { + s *Service +} + +func NewAccountsAdUnitMappingsService(s *Service) *AccountsAdUnitMappingsService { + rs := &AccountsAdUnitMappingsService{s: s} + return rs +} + +type AccountsAdUnitMappingsService struct { + s *Service } func NewAccountsAdUnitsService(s *Service) *AccountsAdUnitsService { rs := &AccountsAdUnitsService{s: s} + rs.AdUnitMappings = NewAccountsAdUnitsAdUnitMappingsService(s) return rs } type AccountsAdUnitsService struct { s *Service + + AdUnitMappings *AccountsAdUnitsAdUnitMappingsService +} + +func NewAccountsAdUnitsAdUnitMappingsService(s *Service) *AccountsAdUnitsAdUnitMappingsService { + rs := &AccountsAdUnitsAdUnitMappingsService{s: s} + return rs +} + +type AccountsAdUnitsAdUnitMappingsService struct { + s *Service } func NewAccountsAppsService(s *Service) *AccountsAppsService { @@ -196,6 +252,36 @@ type AccountsAppsService struct { s *Service } +func NewAccountsCampaignReportService(s *Service) *AccountsCampaignReportService { + rs := &AccountsCampaignReportService{s: s} + return rs +} + +type AccountsCampaignReportService struct { + s *Service +} + +func NewAccountsMediationGroupsService(s *Service) *AccountsMediationGroupsService { + rs := &AccountsMediationGroupsService{s: s} + rs.MediationAbExperiments = NewAccountsMediationGroupsMediationAbExperimentsService(s) + return rs +} + +type AccountsMediationGroupsService struct { + s *Service + + MediationAbExperiments *AccountsMediationGroupsMediationAbExperimentsService +} + +func NewAccountsMediationGroupsMediationAbExperimentsService(s *Service) *AccountsMediationGroupsMediationAbExperimentsService { + rs := &AccountsMediationGroupsMediationAbExperimentsService{s: s} + return rs +} + +type AccountsMediationGroupsMediationAbExperimentsService struct { + s *Service +} + func NewAccountsMediationReportService(s *Service) *AccountsMediationReportService { rs := &AccountsMediationReportService{s: s} return rs @@ -289,6 +375,14 @@ type AdUnit struct { // accounts/pub-9876543210987654/adUnits/0123456789 Name string `json:"name,omitempty"` + // RewardSettings: Optional. Settings for a rewarded ad unit. This can + // be set or unset only when the ad_format is "REWARDED". + RewardSettings *AdUnitRewardSettings `json:"rewardSettings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AdFormat") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -312,6 +406,200 @@ func (s *AdUnit) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AdUnitMapping: Settings to map an AdMob ad unit to a 3rd party ad +// unit. +type AdUnitMapping struct { + // AdUnitConfigurations: Settings for the specified ad unit to make an + // ad request to 3rd party ad network. Key-value pairs with values set + // by the user for the keys requested by the ad network. Please see + // https://support.google.com/admob/answer/3245073 for details on how to + // configure the network settings. + AdUnitConfigurations map[string]string `json:"adUnitConfigurations,omitempty"` + + // AdapterId: The ID of mediation ad source adapter used by this ad unit + // mapping. The adapter determines the information needed in the + // ad_network_settings. + AdapterId int64 `json:"adapterId,omitempty,string"` + + // DisplayName: Optional. The display name of this ad unit mapping + // instance. + DisplayName string `json:"displayName,omitempty"` + + // Name: Resource name of this ad unit mapping. Format is: + // accounts/{publisher_id}/adUnits/{ad_unit_id_fragment}/adUnitMappings/{ + // ad_unit_mapping_id} Example: + // accounts/pub-1234567890123456/adUnits/0123456789/adUnitMappings/987654 + // 321 + Name string `json:"name,omitempty"` + + // State: Output only. The status of this ad unit mapping. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value. + // "ENABLED" - The ad unit mapping is active and used to serve ads or + // collecting stats. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AdUnitConfigurations") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdUnitConfigurations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AdUnitMapping) MarshalJSON() ([]byte, error) { + type NoMethod AdUnitMapping + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdUnitRewardSettings: Settings for a rewarded ad unit. +type AdUnitRewardSettings struct { + // UnitAmount: Reward amount for this ad unit. + UnitAmount int64 `json:"unitAmount,omitempty,string"` + + // UnitType: Reward item for this ad unit. + UnitType string `json:"unitType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UnitAmount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UnitAmount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AdUnitRewardSettings) MarshalJSON() ([]byte, error) { + type NoMethod AdUnitRewardSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Adapter: Describes adapters supported by each mediation ad source. +// Adapters correspond to a specific SDK implementation of the ad +// source, and are each associated with a single platform and a list of +// supported ad unit formats. Adapters may also require setting some +// configurations to perform ad requests. Configurations can be +// specified in the AdUnitMapping by setting the ad_unit_configurations +// (#AdUnitMapping.ad_unit_configurations) key/value pairs. For example, +// the ad_unit_configurations can be used to pass various IDs to the +// adapter's third-party SDK. +type Adapter struct { + // AdapterConfigMetadata: Output only. Configuration metadata associated + // with this adapter. + AdapterConfigMetadata []*AdapterAdapterConfigMetadata `json:"adapterConfigMetadata,omitempty"` + + // AdapterId: Output only. ID of this adapter. It is used to set + // adapter_id (#AdUnitMapping.adapter_id). + AdapterId string `json:"adapterId,omitempty"` + + // Formats: Output only. Indicates the formats of the ad units supported + // by this adapter. + Formats []string `json:"formats,omitempty"` + + // Name: Output only. Resource name of the adapter. Format is: + // accounts/{publisher_id}/adSources/{ad_source_id}/adapters/{adapter_id} + // . + Name string `json:"name,omitempty"` + + // Platform: Output only. Mobile application platform supported by this + // adapter. Supported values are: IOS, ANDROID, WINDOWS_PHONE + Platform string `json:"platform,omitempty"` + + // Title: Output only. The display name of this adapter. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AdapterConfigMetadata") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdapterConfigMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Adapter) MarshalJSON() ([]byte, error) { + type NoMethod Adapter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AdapterAdapterConfigMetadata: Configuration metadata associated with +// this adapter. They are used to define the ad_unit_configurations +// associated with AdUnitMappings for the this adapter. +type AdapterAdapterConfigMetadata struct { + // AdapterConfigMetadataId: This is used to fill the key of the + // ad_unit_configurations (#AdUnitMapping.ad_unit_configurations). + AdapterConfigMetadataId string `json:"adapterConfigMetadataId,omitempty"` + + // AdapterConfigMetadataLabel: Name of the adapter configuration + // metadata. + AdapterConfigMetadataLabel string `json:"adapterConfigMetadataLabel,omitempty"` + + // IsRequired: Whether this metadata is required for configuring the + // AdUnitMappings. + IsRequired bool `json:"isRequired,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AdapterConfigMetadataId") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdapterConfigMetadataId") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AdapterAdapterConfigMetadata) MarshalJSON() ([]byte, error) { + type NoMethod AdapterAdapterConfigMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // App: Describes an AdMob app for a specific platform (For example: // Android or iOS). type App struct { @@ -354,6 +642,10 @@ type App struct { // "ANDROID". Platform string `json:"platform,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AppApprovalState") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -381,6 +673,24 @@ func (s *App) MarshalJSON() ([]byte, error) { // AppLinkedAppInfo: Information from the app store if the app is linked // to an app store. type AppLinkedAppInfo struct { + // AndroidAppStores: Optional. The app store information for published + // Android apps. This field is only used for apps on the Android + // platform and will be ignored if the PLATFORM is set to iOS. The + // default value is the Google Play App store. This field can be updated + // after app is created. If the app is not published, this field will + // not be included in the response. + // + // Possible values: + // "ANDROID_APP_STORE_UNSPECIFIED" - Default value for an unset field. + // Do not use. + // "GOOGLE_PLAY_APP_STORE" - Google Play Store. + // "AMAZON_APP_STORE" - Amazon Appstore. + // "OPPO_APP_STORE" - Oppo App Market. + // "SAMSUNG_APP_STORE" - Samsung Galaxy Store. + // "VIVO_APP_STORE" - VIVO App Store. + // "XIAOMI_APP_STORE" - Xiaomi GetApps. + AndroidAppStores []string `json:"androidAppStores,omitempty"` + // AppStoreId: The app store ID of the app; present if and only if the // app is linked to an app store. If the app is added to the Google Play // store, it will be the application ID of the app. For example: @@ -396,7 +706,7 @@ type AppLinkedAppInfo struct { // app cannot be found in the store. DisplayName string `json:"displayName,omitempty"` - // ForceSendFields is a list of field names (e.g. "AppStoreId") to + // ForceSendFields is a list of field names (e.g. "AndroidAppStores") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -404,12 +714,13 @@ type AppLinkedAppInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppStoreId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AndroidAppStores") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -450,31 +761,17 @@ func (s *AppManualAppInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Date: Represents a whole or partial calendar date, such as a -// birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type Date struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` - - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` - - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` +// BatchCreateAdUnitMappingsRequest: Request to create a batch of ad +// unit mappings under the specific AdMob account. +type BatchCreateAdUnitMappingsRequest struct { + // Requests: Required. The request message specifying the ad unit + // mappings to create. A maximum of 100 ad unit mappings can be created + // in a batch. If the number of ad unit mappings in the batch request + // exceed 100, the entire request will be rejected and no ad unit + // mappings will be created. + Requests []*CreateAdUnitMappingRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to + // ForceSendFields is a list of field names (e.g. "Requests") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -482,8 +779,8 @@ type Date struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -491,24 +788,24 @@ type Date struct { NullFields []string `json:"-"` } -func (s *Date) MarshalJSON() ([]byte, error) { - type NoMethod Date +func (s *BatchCreateAdUnitMappingsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateAdUnitMappingsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DateRange: Specification of a single date range. Both dates are -// inclusive. -type DateRange struct { - // EndDate: End date of the date range, inclusive. Must be greater than - // or equal to the start date. - EndDate *Date `json:"endDate,omitempty"` +// BatchCreateAdUnitMappingsResponse: Response containing a batch of +// created ad unit mappings. +type BatchCreateAdUnitMappingsResponse struct { + // AdUnitMappings: The Ad units mappings created under the requested + // account. + AdUnitMappings []*AdUnitMapping `json:"adUnitMappings,omitempty"` - // StartDate: Start date of the date range, inclusive. Must be less than - // or equal to the end date. - StartDate *Date `json:"startDate,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndDate") to + // ForceSendFields is a list of field names (e.g. "AdUnitMappings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -516,28 +813,84 @@ type DateRange struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndDate") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdUnitMappings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *DateRange) MarshalJSON() ([]byte, error) { - type NoMethod DateRange +func (s *BatchCreateAdUnitMappingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateAdUnitMappingsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateMediationReportRequest: Request to generate an AdMob -// mediation report. -type GenerateMediationReportRequest struct { - // ReportSpec: Network report specification. - ReportSpec *MediationReportSpec `json:"reportSpec,omitempty"` +// CampaignReportSpec: The specification for generating a Campaign +// report. For example, the specification to get IMPRESSIONS and CLICKS +// sliced by CAMPAIGN_ID can look like the following example: { +// "date_range": { "start_date": {"year": 2021, "month": 12, "day": 1}, +// "end_date": {"year": 2021, "month": 12, "day": 30} }, "dimensions": +// ["CAMPAIGN_ID"], "metrics": ["IMPRESSIONS", "CLICKS"], } +type CampaignReportSpec struct { + // DateRange: The date range for which the report is generated. The max + // range is 30 days. + DateRange *DateRange `json:"dateRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReportSpec") to + // Dimensions: List of dimensions of the report. The value combination + // of these dimensions determines the row of the report. If no + // dimensions are specified, the report returns a single row of + // requested metrics for the entire account. + // + // Possible values: + // "DIMENSION_UNSPECIFIED" - Default value of an unspecified + // dimension. Do not use. + // "DATE" - A date in the YYYYMMDD format (for example, "20210701"). + // "CAMPAIGN_ID" - The unique ID of the campaign, for example + // "123456789", which is consistent with the campaign id from campaign + // list api. + // "CAMPAIGN_NAME" - The name of the campaign. + // "AD_ID" - The unique ID of the ad, for example "123456789". + // "AD_NAME" - The name of the ad, which may not be unique. + // "PLACEMENT_ID" - The vendor-specific unique ID of the app where the + // ad is placed. For example, com.goog.bar for Android and 123456789 for + // iOS apps. + // "PLACEMENT_NAME" - The name of the app where the ad is placed. + // "PLACEMENT_PLATFORM" - The platform of the app where the ad is + // placed. + // "COUNTRY" - The name of the targeted country. + // "FORMAT" - Format of the ad unit (for example, "banner", "native"), + // an ad delivery dimension. + Dimensions []string `json:"dimensions,omitempty"` + + // LanguageCode: Language used for any localized text, such as certain + // applicable dimension values. The language tag is defined in the IETF + // BCP47. Defaults to 'en-US' if unspecified or invalid. + LanguageCode string `json:"languageCode,omitempty"` + + // Metrics: List of metrics of the report. A report must specify at + // least one metric. + // + // Possible values: + // "METRIC_UNSPECIFIED" - Default value for an unset field. Do not + // use. + // "IMPRESSIONS" - The number of times an ad is shown to the user. + // "CLICKS" - The number of times a user clicks an ad. + // "CLICK_THROUGH_RATE" - The number of clicks an ad receives divided + // by the number of times the ad is shown. + // "INSTALLS" - The number of times apps were downloaded to devices. + // "ESTIMATED_COST" - The estimated cost of serving a campaign ad + // instead of an ad that earns revenue. The currency is the reporting + // currency for campaigns. + // "AVERAGE_CPI" - The average cost per install. This means the + // average amount that was spent to acquire a new user. The currency is + // the reporting currency for campaigns. + Metrics []string `json:"metrics,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateRange") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -545,7 +898,7 @@ type GenerateMediationReportRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReportSpec") to include in + // NullFields is a list of field names (e.g. "DateRange") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -554,28 +907,232 @@ type GenerateMediationReportRequest struct { NullFields []string `json:"-"` } -func (s *GenerateMediationReportRequest) MarshalJSON() ([]byte, error) { - type NoMethod GenerateMediationReportRequest +func (s *CampaignReportSpec) MarshalJSON() ([]byte, error) { + type NoMethod CampaignReportSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GenerateMediationReportResponse: The streaming response for the AdMob -// mediation report where the first response contains the report header, -// then a stream of row responses, and finally a footer as the last -// response message. For example: [{ "header": { "date_range": { -// "start_date": {"year": 2018, "month": 9, "day": 1}, "end_date": -// {"year": 2018, "month": 9, "day": 1} }, "localization_settings": { -// "currency_code": "USD", "language_code": "en-US" } } }, { "row": { -// "dimension_values": { "DATE": {"value": "20180918"}, "APP": { -// "value": "ca-app-pub-8123415297019784~1001342552", "display_label": -// "My app name!" } }, "metric_values": { "ESTIMATED_EARNINGS": -// {"decimal_value": "1324746"} } } }, { "footer": -// {"matching_row_count": 1} }] -type GenerateMediationReportResponse struct { - // Footer: Additional information about the generated report, such as - // warnings about the data. - Footer *ReportFooter `json:"footer,omitempty"` +// CreateAdUnitMappingRequest: Request to create an ad unit mapping +// under the specific AdMob account and ad unit. +type CreateAdUnitMappingRequest struct { + // AdUnitMapping: Required. The ad unit mapping to create. + AdUnitMapping *AdUnitMapping `json:"adUnitMapping,omitempty"` + + // Parent: Required. The parent which owns the ad unit mapping. Format: + // accounts/{publisher_id}/adUnits/{ad_unit_id} + Parent string `json:"parent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdUnitMapping") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdUnitMapping") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateAdUnitMappingRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateAdUnitMappingRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Date: Represents a whole or partial calendar date, such as a +// birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type Date struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Date) MarshalJSON() ([]byte, error) { + type NoMethod Date + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DateRange: Specification of a single date range. Both dates are +// inclusive. +type DateRange struct { + // EndDate: End date of the date range, inclusive. Must be greater than + // or equal to the start date. + EndDate *Date `json:"endDate,omitempty"` + + // StartDate: Start date of the date range, inclusive. Must be less than + // or equal to the end date. + StartDate *Date `json:"startDate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndDate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndDate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DateRange) MarshalJSON() ([]byte, error) { + type NoMethod DateRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateCampaignReportRequest: Request to generate campaign report. +type GenerateCampaignReportRequest struct { + // ReportSpec: Campaign report specification. + ReportSpec *CampaignReportSpec `json:"reportSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ReportSpec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReportSpec") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateCampaignReportRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateCampaignReportRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateCampaignReportResponse: Campaign Report API response. +type GenerateCampaignReportResponse struct { + // Rows: The campaign report data from the specified publisher. At most + // 100000 rows will be returned from the API. + Rows []*ReportRow `json:"rows,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Rows") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Rows") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateCampaignReportResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateCampaignReportResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateMediationReportRequest: Request to generate an AdMob +// mediation report. +type GenerateMediationReportRequest struct { + // ReportSpec: Network report specification. + ReportSpec *MediationReportSpec `json:"reportSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ReportSpec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReportSpec") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateMediationReportRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateMediationReportRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateMediationReportResponse: The streaming response for the AdMob +// mediation report where the first response contains the report header, +// then a stream of row responses, and finally a footer as the last +// response message. For example: [{ "header": { "date_range": { +// "start_date": {"year": 2018, "month": 9, "day": 1}, "end_date": +// {"year": 2018, "month": 9, "day": 1} }, "localization_settings": { +// "currency_code": "USD", "language_code": "en-US" } } }, { "row": { +// "dimension_values": { "DATE": {"value": "20180918"}, "APP": { +// "value": "ca-app-pub-8123415297019784~1001342552", "display_label": +// "My app name!" } }, "metric_values": { "ESTIMATED_EARNINGS": +// {"decimal_value": "1324746"} } } }, { "footer": +// {"matching_row_count": 1} }] +type GenerateMediationReportResponse struct { + // Footer: Additional information about the generated report, such as + // warnings about the data. + Footer *ReportFooter `json:"footer,omitempty"` // Header: Report generation settings that describes the report // contents, such as the report date range and localization settings. @@ -727,6 +1284,46 @@ func (s *ListAdSourcesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListAdUnitMappingsResponse: Response for the +// ListAdUnitMappingsRequest. +type ListAdUnitMappingsResponse struct { + // AdUnitMappings: The ad unit mappings from the specified account and + // ad unit. + AdUnitMappings []*AdUnitMapping `json:"adUnitMappings,omitempty"` + + // NextPageToken: Used to set the `page_token` in the + // `ListAdUnitMappingsRequest` to retrieve the next page. If this field + // is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AdUnitMappings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdUnitMappings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListAdUnitMappingsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAdUnitMappingsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListAdUnitsResponse: Response for the ad units list request. type ListAdUnitsResponse struct { // AdUnits: The resulting ad units for the requested account. @@ -764,21 +1361,21 @@ func (s *ListAdUnitsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListAppsResponse: Response for the apps list request. -type ListAppsResponse struct { - // Apps: The resulting apps for the requested account. - Apps []*App `json:"apps,omitempty"` +// ListAdaptersResponse: Response for the ListAdaptersRequest. +type ListAdaptersResponse struct { + // Adapters: The adapter. + Adapters []*Adapter `json:"adapters,omitempty"` - // NextPageToken: If not empty, indicates that there may be more apps - // for the request; this value should be passed in a new - // `ListAppsRequest`. + // NextPageToken: Used to set the `page_token` in the + // `ListAdapterRequest` to retrieve the next page. If this field is + // omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Apps") to + // ForceSendFields is a list of field names (e.g. "Adapters") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -786,8 +1383,8 @@ type ListAppsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Apps") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Adapters") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -795,28 +1392,27 @@ type ListAppsResponse struct { NullFields []string `json:"-"` } -func (s *ListAppsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAppsResponse +func (s *ListAdaptersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAdaptersResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListPublisherAccountsResponse: Response for the publisher account -// list request. -type ListPublisherAccountsResponse struct { - // Account: Publisher that the client credentials can access. - Account []*PublisherAccount `json:"account,omitempty"` +// ListAppsResponse: Response for the apps list request. +type ListAppsResponse struct { + // Apps: The resulting apps for the requested account. + Apps []*App `json:"apps,omitempty"` - // NextPageToken: If not empty, indicates that there might be more - // accounts for the request; you must pass this value in a new - // `ListPublisherAccountsRequest`. + // NextPageToken: If not empty, indicates that there may be more apps + // for the request; this value should be passed in a new + // `ListAppsRequest`. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Account") to + // ForceSendFields is a list of field names (e.g. "Apps") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -824,9 +1420,87 @@ type ListPublisherAccountsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Account") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an + // NullFields is a list of field names (e.g. "Apps") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListAppsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAppsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListMediationGroupsResponse: Response for the mediation groups list +// request. +type ListMediationGroupsResponse struct { + // MediationGroups: The resulting mediation groups for the requested + // account. + MediationGroups []*MediationGroup `json:"mediationGroups,omitempty"` + + // NextPageToken: If not empty, indicates that there may be more + // mediation groups for the request; this value should be passed in a + // new `ListMediationGroupsRequest`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "MediationGroups") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MediationGroups") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListMediationGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMediationGroupsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListPublisherAccountsResponse: Response for the publisher account +// list request. +type ListPublisherAccountsResponse struct { + // Account: Publisher that the client credentials can access. + Account []*PublisherAccount `json:"account,omitempty"` + + // NextPageToken: If not empty, indicates that there might be more + // accounts for the request; you must pass this value in a new + // `ListPublisherAccountsRequest`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Account") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Account") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. @@ -876,6 +1550,345 @@ func (s *LocalizationSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// MediationAbExperiment: The mediation A/B experiment. NEXT ID: 12 +type MediationAbExperiment struct { + // ControlMediationLines: Output only. The experiment mediation lines + // for control. They are inherited from the parent mediation group. It + // is an output only field. + ControlMediationLines []*MediationAbExperimentExperimentMediationLine `json:"controlMediationLines,omitempty"` + + // DisplayName: The display name for the mediation A/B experiment. + DisplayName string `json:"displayName,omitempty"` + + // ExperimentId: Output only. Unique identifier for the mediation A/B + // experiment. It is an output only property. + ExperimentId string `json:"experimentId,omitempty"` + + // Name: Resource name for this experiment. The format is + // accounts/{publisher_id}/ + // mediationGroups/{mediation_group_id}/mediationAbExperiment/ + // {mediation_group_experiment_id}. For example: + // accounts/pub-9876543210987654/mediationGroups/0123456789/ + // mediationAbExperiment/12345 + Name string `json:"name,omitempty"` + + // State: Output only. The state of the experiment. It is an output only + // field. + // + // Possible values: + // "EXPERIMENT_STATE_UNSPECIFIED" - Default for an unset field. Do not + // use. + // "EXPIRED" - The experiment has expired. + // "RUNNING" - The experiment is running and thus used in serving. + // "ENDED" - The experiment is ended, but not yet expired. Serving + // continues in the original configurations while the experiment is + // ready to call an action. + State string `json:"state,omitempty"` + + // TreatmentMediationLines: The experiment mediation lines created for + // the treatment. They will be used for serving when the experiment + // status is RUNNING. + TreatmentMediationLines []*MediationAbExperimentExperimentMediationLine `json:"treatmentMediationLines,omitempty"` + + // TreatmentTrafficPercentage: The percentage of the mediation A/B + // experiment traffic that will be send to the treatment (variant B). + // The remainder is sent to the control (variant A). The percentage is + // expressed as an integer in the inclusive range of [1,99]. See + // https://support.google.com/admob/answer/9572326 for details. + TreatmentTrafficPercentage int64 `json:"treatmentTrafficPercentage,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ControlMediationLines") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ControlMediationLines") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MediationAbExperiment) MarshalJSON() ([]byte, error) { + type NoMethod MediationAbExperiment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediationAbExperimentExperimentMediationLine: The mediation group +// line for the experiment. It will be used for serving during the run +// of the experiment. +type MediationAbExperimentExperimentMediationLine struct { + // MediationGroupLine: The mediation group line used by the experiment. + MediationGroupLine *MediationGroupMediationGroupLine `json:"mediationGroupLine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MediationGroupLine") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MediationGroupLine") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MediationAbExperimentExperimentMediationLine) MarshalJSON() ([]byte, error) { + type NoMethod MediationAbExperimentExperimentMediationLine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediationGroup: Describes an AdMob mediation group. +type MediationGroup struct { + // DisplayName: User provided name for the mediation group. The maximum + // length allowed is 120 characters. + DisplayName string `json:"displayName,omitempty"` + + // MediationAbExperimentState: Output only. The state of the mediation + // a/b experiment that belongs to this mediation group. + // + // Possible values: + // "EXPERIMENT_STATE_UNSPECIFIED" - Default value for an unset field. + // Do not use. + // "RUNNING" - The mediation group has an experiment in the RUNNING + // state. + // "NOT_RUNNING" - There is no experiment in the RUNNING state in the + // mediation group. + MediationAbExperimentState string `json:"mediationAbExperimentState,omitempty"` + + // MediationGroupId: The ID of the mediation group. Example: + // "0123456789". This is a read only property. + MediationGroupId string `json:"mediationGroupId,omitempty"` + + // MediationGroupLines: The mediation lines used for serving for this + // mediation group. Key is the ID of the mediation group line. For + // creation, use distinct negative values as placeholder. + MediationGroupLines map[string]MediationGroupMediationGroupLine `json:"mediationGroupLines,omitempty"` + + // Name: Resource name for this mediation group. Format is: + // accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: + // accounts/pub-9876543210987654/mediationGroups/0123456789 + Name string `json:"name,omitempty"` + + // State: The status of the mediation group. Only enabled mediation + // groups will be served. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value for an unset field. Do not use. + // "ENABLED" - The mediation group is active and used to serve ads or + // to collect stats. + // "DISABLED" - The mediation group has been disabled and is no longer + // serving ads or collecting stats. Disabled mediation groups can be + // re-enabled. + State string `json:"state,omitempty"` + + // Targeting: Set of criteria targeted by this mediation group, such as + // ad units and geo locations. + Targeting *MediationGroupTargeting `json:"targeting,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MediationGroup) MarshalJSON() ([]byte, error) { + type NoMethod MediationGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediationGroupMediationGroupLine: Settings for an ad network used by +// a mediation group. +type MediationGroupMediationGroupLine struct { + // AdSourceId: The ID of the ad source this mediation line is associated + // with. + AdSourceId string `json:"adSourceId,omitempty"` + + // AdUnitMappings: References of the ad unit mappings for each ad unit + // associated with this mediation line. Key is the ad unit ID, value is + // resource name of the ad unit mapping. For mediation lines where the + // ad source id is the AdMob Network, ad unit mappings will be ignored. + AdUnitMappings map[string]string `json:"adUnitMappings,omitempty"` + + // CpmMicros: The CPM for this allocation line. $0.01 is the minimum + // allowed amount. For LIVE CPM modes, the default amount is $0.01. This + // value is ignored if `cpm_mode` is `LIVE`. **Warning:** "USD" is the + // only supported currency at the moment. The unit is in micros. + CpmMicros int64 `json:"cpmMicros,omitempty,string"` + + // CpmMode: Indicates how the CPM for this mediation line is provided. + // Note that `MANUAL` and `LIVE` are the only fully-supported mode at + // the moment. Please use the AdMob UI (https://admob.google.com) if you + // wish to create or update to other cpm modes. + // + // Possible values: + // "CPM_MODE_UNSPECIFIED" - Default value for an unset field. Do not + // use. + // "LIVE" - CPM is calculated per ad request based on the ad auction. + // "MANUAL" - CPM is set by the user manually. + // "ANO" - CPM is retrieved from the ad network using the publisher + // specified credentials. Output only. + CpmMode string `json:"cpmMode,omitempty"` + + // DisplayName: User-provided label for this mediation line. The maximum + // length allowed is 255 characters. + DisplayName string `json:"displayName,omitempty"` + + // ExperimentVariant: Output only. The Mediation A/B experiment variant + // to which the mediation group line belongs to. + // + // Possible values: + // "VARIANT_UNSPECIFIED" - Default value for an unset field. Do not + // use. + // "VARIANT_A" - The mediation group line belongs to the variant A. + // "VARIANT_B" - The mediation group line belongs to the variant B. + // "ORIGINAL" - The mediation group line isn't a part of an + // experiment. + ExperimentVariant string `json:"experimentVariant,omitempty"` + + // Id: The 16 digit ID for this mediation line e.g. 0123456789012345. + // When creating a new mediation group line, use a distinct negative + // integer as the ID place holder. + Id string `json:"id,omitempty"` + + // State: The status of the mediation group line. Only enabled mediation + // group lines will be served. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value for an unset field. Do not use. + // "ENABLED" - The mediation group line is active and used to serve + // ads. + // "DISABLED" - The mediation group line has been disabled and is no + // longer served. Disabled mediation group lines can be re-enabled. + // "REMOVED" - The mediation group line will be removed and no longer + // served. Removed mediation group lines can not be re-enabled and will + // no longer be visible. This is an input only field. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdSourceId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdSourceId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MediationGroupMediationGroupLine) MarshalJSON() ([]byte, error) { + type NoMethod MediationGroupMediationGroupLine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MediationGroupTargeting: Set of criteria targeted by this mediation +// group. For example, a mediation group can target specific ad unit +// IDs, platform, format and geo location. +type MediationGroupTargeting struct { + // AdUnitIds: Ad units targeted by this mediation group. Example: + // "ca-app-pub-1234/8790". + AdUnitIds []string `json:"adUnitIds,omitempty"` + + // ExcludedRegionCodes: The Unicode country/region code (CLDR) of a + // location, such as "US". Unset if this mediation group does not + // exclude any region. + ExcludedRegionCodes []string `json:"excludedRegionCodes,omitempty"` + + // Format: Ad format targeted by this mediation group. Examples: + // "banner", "native". + Format string `json:"format,omitempty"` + + // IdfaTargeting: The parameter can be used to target ad requests based + // on the availability of the IDFA. If set to ALL, the mediation group + // applies to all ad requests (with or without IDFA). If set to + // AVAILABLE, the mediation group applies to ad requests with IDFA. If + // set to NOT_AVAILABLE, the mediation group applies to ad requests + // without IDFA. Doesn't need to be specified for an ANDROID device. + // + // Possible values: + // "IDFA_TARGETING_UNSPECIFIED" - Default value. This value is unused. + // "ALL" - All the devices are targeted, regardless of IDFA + // availability. + // "AVAILABLE" - Only the devices with IDFA availability are targeted. + // "NOT_AVAILABLE" - Only the devices without IDFA availability are + // targeted. + IdfaTargeting string `json:"idfaTargeting,omitempty"` + + // Platform: Describes the platform of the app. Examples: "IOS", + // "Android". + Platform string `json:"platform,omitempty"` + + // TargetedRegionCodes: The Unicode country/region code (CLDR) of a + // location, such as "US". Unset if this mediation group targets all + // available regions. For more information, see + // http://www.unicode.org/reports/tr35/#unicode_region_subtag. + TargetedRegionCodes []string `json:"targetedRegionCodes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdUnitIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdUnitIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *MediationGroupTargeting) MarshalJSON() ([]byte, error) { + type NoMethod MediationGroupTargeting + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MediationReportSpec: The specification for generating an AdMob // Mediation report. For example, the specification to get observed ECPM // sliced by ad source and app for the 'US' and 'CN' countries can look @@ -1832,6 +2845,45 @@ func (s *ReportWarning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StopMediationAbExperimentRequest: Request to end the mediation A/B +// experiment and choose a winning variant. +type StopMediationAbExperimentRequest struct { + // VariantChoice: The choice for the winning variant. + // + // Possible values: + // "VARIANT_CHOICE_UNSPECIFIED" - Default value for an unset field. Do + // not use. + // "VARIANT_CHOICE_A" - Use the mediation lines from Variant A and + // complete the experiment. Variant A contains the original serving + // lines before the experiment creation. + // "VARIANT_CHOICE_B" - Use the mediation lines form Variant B and + // complete the experiment. Variant B contains the newly added serving + // lines. + VariantChoice string `json:"variantChoice,omitempty"` + + // ForceSendFields is a list of field names (e.g. "VariantChoice") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "VariantChoice") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StopMediationAbExperimentRequest) MarshalJSON() ([]byte, error) { + type NoMethod StopMediationAbExperimentRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // StringList: List of string values. type StringList struct { // Values: The string values. @@ -2359,6 +3411,10 @@ func (c *AccountsAdSourcesListCall) Do(opts ...googleapi.CallOption) (*ListAdSou // "response": { // "$ref": "ListAdSourcesResponse" // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admob.readonly", + // "https://www.googleapis.com/auth/admob.report" + // ], // "streamingType": "NONE" // } @@ -2385,9 +3441,9 @@ func (c *AccountsAdSourcesListCall) Pages(ctx context.Context, f func(*ListAdSou } } -// method id "admob.accounts.adUnits.list": +// method id "admob.accounts.adSources.adapters.list": -type AccountsAdUnitsListCall struct { +type AccountsAdSourcesAdaptersListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -2396,30 +3452,29 @@ type AccountsAdUnitsListCall struct { header_ http.Header } -// List: List the ad units under the specified AdMob account. +// List: List the adapters of the ad source. // -// - parent: Resource name of the account to list ad units for. Example: -// accounts/pub-9876543210987654. -func (r *AccountsAdUnitsService) List(parent string) *AccountsAdUnitsListCall { - c := &AccountsAdUnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent which owns this collection of adapters. Format: +// accounts/{publisher_id}/adSources/{ad_source_id}. +func (r *AccountsAdSourcesAdaptersService) List(parent string) *AccountsAdSourcesAdaptersListCall { + c := &AccountsAdSourcesAdaptersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of ad units to return. If unspecified or 0, at most 10,000 ad units +// of adapters to return. If unspecified or 0, at most 10,000 adapters // will be returned. The maximum value is 20,000; values above 20,000 // will be coerced to 20,000. -func (c *AccountsAdUnitsListCall) PageSize(pageSize int64) *AccountsAdUnitsListCall { +func (c *AccountsAdSourcesAdaptersListCall) PageSize(pageSize int64) *AccountsAdSourcesAdaptersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListAdUnitsResponse`; indicates that this is a -// continuation of a prior `ListAdUnits` call, and that the system -// should return the next page of data. -func (c *AccountsAdUnitsListCall) PageToken(pageToken string) *AccountsAdUnitsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListAdapters` call. Provide this to +// retrieve the subsequent page. +func (c *AccountsAdSourcesAdaptersListCall) PageToken(pageToken string) *AccountsAdSourcesAdaptersListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2427,7 +3482,7 @@ func (c *AccountsAdUnitsListCall) PageToken(pageToken string) *AccountsAdUnitsLi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAdUnitsListCall) Fields(s ...googleapi.Field) *AccountsAdUnitsListCall { +func (c *AccountsAdSourcesAdaptersListCall) Fields(s ...googleapi.Field) *AccountsAdSourcesAdaptersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2437,7 +3492,7 @@ func (c *AccountsAdUnitsListCall) Fields(s ...googleapi.Field) *AccountsAdUnitsL // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsAdUnitsListCall) IfNoneMatch(entityTag string) *AccountsAdUnitsListCall { +func (c *AccountsAdSourcesAdaptersListCall) IfNoneMatch(entityTag string) *AccountsAdSourcesAdaptersListCall { c.ifNoneMatch_ = entityTag return c } @@ -2445,21 +3500,21 @@ func (c *AccountsAdUnitsListCall) IfNoneMatch(entityTag string) *AccountsAdUnits // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAdUnitsListCall) Context(ctx context.Context) *AccountsAdUnitsListCall { +func (c *AccountsAdSourcesAdaptersListCall) Context(ctx context.Context) *AccountsAdSourcesAdaptersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAdUnitsListCall) Header() http.Header { +func (c *AccountsAdSourcesAdaptersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAdUnitsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAdSourcesAdaptersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2472,7 +3527,7 @@ func (c *AccountsAdUnitsListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adUnits") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adapters") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2485,14 +3540,14 @@ func (c *AccountsAdUnitsListCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "admob.accounts.adUnits.list" call. -// Exactly one of *ListAdUnitsResponse or error will be non-nil. Any +// Do executes the "admob.accounts.adSources.adapters.list" call. +// Exactly one of *ListAdaptersResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListAdUnitsResponse.ServerResponse.Header or (if a response was +// *ListAdaptersResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *AccountsAdUnitsListCall) Do(opts ...googleapi.CallOption) (*ListAdUnitsResponse, error) { +func (c *AccountsAdSourcesAdaptersListCall) Do(opts ...googleapi.CallOption) (*ListAdaptersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2511,7 +3566,7 @@ func (c *AccountsAdUnitsListCall) Do(opts ...googleapi.CallOption) (*ListAdUnits if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListAdUnitsResponse{ + ret := &ListAdaptersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2523,36 +3578,36 @@ func (c *AccountsAdUnitsListCall) Do(opts ...googleapi.CallOption) (*ListAdUnits } return ret, nil // { - // "description": "List the ad units under the specified AdMob account.", - // "flatPath": "v1beta/accounts/{accountsId}/adUnits", + // "description": "List the adapters of the ad source.", + // "flatPath": "v1beta/accounts/{accountsId}/adSources/{adSourcesId}/adapters", // "httpMethod": "GET", - // "id": "admob.accounts.adUnits.list", + // "id": "admob.accounts.adSources.adapters.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of ad units to return. If unspecified or 0, at most 10,000 ad units will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + // "description": "The maximum number of adapters to return. If unspecified or 0, at most 10,000 adapters will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The value returned by the last `ListAdUnitsResponse`; indicates that this is a continuation of a prior `ListAdUnits` call, and that the system should return the next page of data.", + // "description": "A page token, received from a previous `ListAdapters` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Resource name of the account to list ad units for. Example: accounts/pub-9876543210987654", + // "description": "Required. The parent which owns this collection of adapters. Format: accounts/{publisher_id}/adSources/{ad_source_id}", // "location": "path", - // "pattern": "^accounts/[^/]+$", + // "pattern": "^accounts/[^/]+/adSources/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/adUnits", + // "path": "v1beta/{+parent}/adapters", // "response": { - // "$ref": "ListAdUnitsResponse" + // "$ref": "ListAdaptersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/admob.readonly" @@ -2565,7 +3620,7 @@ func (c *AccountsAdUnitsListCall) Do(opts ...googleapi.CallOption) (*ListAdUnits // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountsAdUnitsListCall) Pages(ctx context.Context, f func(*ListAdUnitsResponse) error) error { +func (c *AccountsAdSourcesAdaptersListCall) Pages(ctx context.Context, f func(*ListAdaptersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2583,96 +3638,220 @@ func (c *AccountsAdUnitsListCall) Pages(ctx context.Context, f func(*ListAdUnits } } -// method id "admob.accounts.apps.list": +// method id "admob.accounts.adUnitMappings.batchCreate": -type AccountsAppsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsAdUnitMappingsBatchCreateCall struct { + s *Service + parent string + batchcreateadunitmappingsrequest *BatchCreateAdUnitMappingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: List the apps under the specified AdMob account. +// BatchCreate: Batch create the ad unit mappings under the specific +// AdMob account. The maximum allowed batch size is 100. This method has +// limited access. If you see a 403 permission denied error, please +// reach out to your account manager for access. // -// - parent: Resource name of the account to list apps for. Example: -// accounts/pub-9876543210987654. -func (r *AccountsAppsService) List(parent string) *AccountsAppsListCall { - c := &AccountsAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The AdMob account which owns this collection of ad unit +// mappings. Format: accounts/{publisher_id} See +// https://support.google.com/admob/answer/2784578 for instructions on +// how to find your AdMob publisher ID. +func (r *AccountsAdUnitMappingsService) BatchCreate(parent string, batchcreateadunitmappingsrequest *BatchCreateAdUnitMappingsRequest) *AccountsAdUnitMappingsBatchCreateCall { + c := &AccountsAdUnitMappingsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.batchcreateadunitmappingsrequest = batchcreateadunitmappingsrequest return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of apps to return. If unspecified or 0, at most 10,000 apps will be -// returned. The maximum value is 20,000; values above 20,000 will be -// coerced to 20,000. -func (c *AccountsAppsListCall) PageSize(pageSize int64) *AccountsAppsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdUnitMappingsBatchCreateCall) Fields(s ...googleapi.Field) *AccountsAdUnitMappingsBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": The value returned -// by the last `ListAppsResponse`; indicates that this is a continuation -// of a prior `ListApps` call, and that the system should return the -// next page of data. -func (c *AccountsAppsListCall) PageToken(pageToken string) *AccountsAppsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdUnitMappingsBatchCreateCall) Context(ctx context.Context) *AccountsAdUnitMappingsBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdUnitMappingsBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdUnitMappingsBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateadunitmappingsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adUnitMappings:batchCreate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.adUnitMappings.batchCreate" call. +// Exactly one of *BatchCreateAdUnitMappingsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *BatchCreateAdUnitMappingsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsAdUnitMappingsBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateAdUnitMappingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &BatchCreateAdUnitMappingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Batch create the ad unit mappings under the specific AdMob account. The maximum allowed batch size is 100. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/adUnitMappings:batchCreate", + // "httpMethod": "POST", + // "id": "admob.accounts.adUnitMappings.batchCreate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The AdMob account which owns this collection of ad unit mappings. Format: accounts/{publisher_id} See https://support.google.com/admob/answer/2784578 for instructions on how to find your AdMob publisher ID.", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/adUnitMappings:batchCreate", + // "request": { + // "$ref": "BatchCreateAdUnitMappingsRequest" + // }, + // "response": { + // "$ref": "BatchCreateAdUnitMappingsResponse" + // }, + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.adUnits.create": + +type AccountsAdUnitsCreateCall struct { + s *Service + parent string + adunit *AdUnit + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an ad unit under the specified AdMob account. This +// method has limited access. If you see a 403 permission denied error, +// please reach out to your account manager for access. +// +// - parent: Resource name of the account to create the specified ad +// unit for. Example: accounts/pub-9876543210987654. +func (r *AccountsAdUnitsService) Create(parent string, adunit *AdUnit) *AccountsAdUnitsCreateCall { + c := &AccountsAdUnitsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.adunit = adunit return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAppsListCall) Fields(s ...googleapi.Field) *AccountsAppsListCall { +func (c *AccountsAdUnitsCreateCall) Fields(s ...googleapi.Field) *AccountsAdUnitsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountsAppsListCall) IfNoneMatch(entityTag string) *AccountsAppsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAppsListCall) Context(ctx context.Context) *AccountsAppsListCall { +func (c *AccountsAdUnitsCreateCall) Context(ctx context.Context) *AccountsAdUnitsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAppsListCall) Header() http.Header { +func (c *AccountsAdUnitsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAdUnitsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunit) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/apps") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adUnits") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -2683,14 +3862,14 @@ func (c *AccountsAppsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "admob.accounts.apps.list" call. -// Exactly one of *ListAppsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListAppsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsAppsListCall) Do(opts ...googleapi.CallOption) (*ListAppsResponse, error) { +// Do executes the "admob.accounts.adUnits.create" call. +// Exactly one of *AdUnit or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *AdUnit.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsAdUnitsCreateCall) Do(opts ...googleapi.CallOption) (*AdUnit, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2709,7 +3888,7 @@ func (c *AccountsAppsListCall) Do(opts ...googleapi.CallOption) (*ListAppsRespon if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListAppsResponse{ + ret := &AdUnit{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2721,64 +3900,1907 @@ func (c *AccountsAppsListCall) Do(opts ...googleapi.CallOption) (*ListAppsRespon } return ret, nil // { - // "description": "List the apps under the specified AdMob account.", - // "flatPath": "v1beta/accounts/{accountsId}/apps", - // "httpMethod": "GET", - // "id": "admob.accounts.apps.list", + // "description": "Creates an ad unit under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/adUnits", + // "httpMethod": "POST", + // "id": "admob.accounts.adUnits.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of apps to return. If unspecified or 0, at most 10,000 apps will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The value returned by the last `ListAppsResponse`; indicates that this is a continuation of a prior `ListApps` call, and that the system should return the next page of data.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Resource name of the account to list apps for. Example: accounts/pub-9876543210987654", + // "description": "Required. Resource name of the account to create the specified ad unit for. Example: accounts/pub-9876543210987654", // "location": "path", // "pattern": "^accounts/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/apps", + // "path": "v1beta/{+parent}/adUnits", + // "request": { + // "$ref": "AdUnit" + // }, // "response": { - // "$ref": "ListAppsResponse" + // "$ref": "AdUnit" // }, - // "scopes": [ - // "https://www.googleapis.com/auth/admob.readonly" - // ], // "streamingType": "NONE" // } } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *AccountsAppsListCall) Pages(ctx context.Context, f func(*ListAppsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "admob.accounts.adUnits.list": + +type AccountsAdUnitsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the ad units under the specified AdMob account. +// +// - parent: Resource name of the account to list ad units for. Example: +// accounts/pub-9876543210987654. +func (r *AccountsAdUnitsService) List(parent string) *AccountsAdUnitsListCall { + c := &AccountsAdUnitsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ad units to return. If unspecified or 0, at most 10,000 ad units +// will be returned. The maximum value is 20,000; values above 20,000 +// will be coerced to 20,000. +func (c *AccountsAdUnitsListCall) PageSize(pageSize int64) *AccountsAdUnitsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListAdUnitsResponse`; indicates that this is a +// continuation of a prior `ListAdUnits` call, and that the system +// should return the next page of data. +func (c *AccountsAdUnitsListCall) PageToken(pageToken string) *AccountsAdUnitsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdUnitsListCall) Fields(s ...googleapi.Field) *AccountsAdUnitsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAdUnitsListCall) IfNoneMatch(entityTag string) *AccountsAdUnitsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdUnitsListCall) Context(ctx context.Context) *AccountsAdUnitsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdUnitsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdUnitsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adUnits") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.adUnits.list" call. +// Exactly one of *ListAdUnitsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListAdUnitsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAdUnitsListCall) Do(opts ...googleapi.CallOption) (*ListAdUnitsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAdUnitsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List the ad units under the specified AdMob account.", + // "flatPath": "v1beta/accounts/{accountsId}/adUnits", + // "httpMethod": "GET", + // "id": "admob.accounts.adUnits.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of ad units to return. If unspecified or 0, at most 10,000 ad units will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListAdUnitsResponse`; indicates that this is a continuation of a prior `ListAdUnits` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the account to list ad units for. Example: accounts/pub-9876543210987654", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/adUnits", + // "response": { + // "$ref": "ListAdUnitsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admob.readonly" + // ], + // "streamingType": "NONE" + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsAdUnitsListCall) Pages(ctx context.Context, f func(*ListAdUnitsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "admob.accounts.adUnits.adUnitMappings.create": + +type AccountsAdUnitsAdUnitMappingsCreateCall struct { + s *Service + parent string + adunitmapping *AdUnitMapping + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create an ad unit mapping under the specific AdMob account +// and ad unit. This method has limited access. If you see a 403 +// permission denied error, please reach out to your account manager for +// access. +// +// - parent: The parent which owns the ad unit mapping. Format: +// accounts/{publisher_id}/adUnits/{ad_unit_id}. +func (r *AccountsAdUnitsAdUnitMappingsService) Create(parent string, adunitmapping *AdUnitMapping) *AccountsAdUnitsAdUnitMappingsCreateCall { + c := &AccountsAdUnitsAdUnitMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.adunitmapping = adunitmapping + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdUnitsAdUnitMappingsCreateCall) Fields(s ...googleapi.Field) *AccountsAdUnitsAdUnitMappingsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdUnitsAdUnitMappingsCreateCall) Context(ctx context.Context) *AccountsAdUnitsAdUnitMappingsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdUnitsAdUnitMappingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdUnitsAdUnitMappingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunitmapping) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adUnitMappings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.adUnits.adUnitMappings.create" call. +// Exactly one of *AdUnitMapping or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AdUnitMapping.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAdUnitsAdUnitMappingsCreateCall) Do(opts ...googleapi.CallOption) (*AdUnitMapping, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AdUnitMapping{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create an ad unit mapping under the specific AdMob account and ad unit. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/adUnits/{adUnitsId}/adUnitMappings", + // "httpMethod": "POST", + // "id": "admob.accounts.adUnits.adUnitMappings.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent which owns the ad unit mapping. Format: accounts/{publisher_id}/adUnits/{ad_unit_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adUnits/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/adUnitMappings", + // "request": { + // "$ref": "AdUnitMapping" + // }, + // "response": { + // "$ref": "AdUnitMapping" + // }, + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.adUnits.adUnitMappings.list": + +type AccountsAdUnitsAdUnitMappingsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List ad unit mappings under the specified AdMob account and ad +// unit. This method has limited access. If you see a 403 permission +// denied error, please reach out to your account manager for access. +// +// - parent: The parent which owns this collection of ad unit mappings. +// Format: accounts/{publisher_id}/adUnits/{ad_unit_id}. +func (r *AccountsAdUnitsAdUnitMappingsService) List(parent string) *AccountsAdUnitsAdUnitMappingsListCall { + c := &AccountsAdUnitsAdUnitMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter string that +// uses EBNF grammar syntax +// (https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible +// field to filter by is: - "DISPLAY_NAME" Possible filter function is: +// - `IN`: Used to filter fields that represent a singleton including +// "DISPLAY_NAME". The filter functions can be added together using +// `AND`. `OR` functionality is not supported. Example: filter: +// IN(DISPLAY_NAME, "Test Ad Unit Mapping 1", "Test Ad Unit Mapping 2") +func (c *AccountsAdUnitsAdUnitMappingsListCall) Filter(filter string) *AccountsAdUnitsAdUnitMappingsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ad unit mappings to return. If unspecified or 0, at most 10,000 ad +// unit mappings will be returned. The maximum value is 20,000; values +// above 20,000 will be coerced to 20,000. +func (c *AccountsAdUnitsAdUnitMappingsListCall) PageSize(pageSize int64) *AccountsAdUnitsAdUnitMappingsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListAdUnitMappings` call. Provide this to +// retrieve the subsequent page. +func (c *AccountsAdUnitsAdUnitMappingsListCall) PageToken(pageToken string) *AccountsAdUnitsAdUnitMappingsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAdUnitsAdUnitMappingsListCall) Fields(s ...googleapi.Field) *AccountsAdUnitsAdUnitMappingsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAdUnitsAdUnitMappingsListCall) IfNoneMatch(entityTag string) *AccountsAdUnitsAdUnitMappingsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAdUnitsAdUnitMappingsListCall) Context(ctx context.Context) *AccountsAdUnitsAdUnitMappingsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAdUnitsAdUnitMappingsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAdUnitsAdUnitMappingsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/adUnitMappings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.adUnits.adUnitMappings.list" call. +// Exactly one of *ListAdUnitMappingsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListAdUnitMappingsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAdUnitsAdUnitMappingsListCall) Do(opts ...googleapi.CallOption) (*ListAdUnitMappingsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAdUnitMappingsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List ad unit mappings under the specified AdMob account and ad unit. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/adUnits/{adUnitsId}/adUnitMappings", + // "httpMethod": "GET", + // "id": "admob.accounts.adUnits.adUnitMappings.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter string that uses [EBNF grammar syntax](https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible field to filter by is: - \"DISPLAY_NAME\" Possible filter function is: - `IN`: Used to filter fields that represent a singleton including \"DISPLAY_NAME\". The filter functions can be added together using `AND`. `OR` functionality is not supported. Example: filter: IN(DISPLAY_NAME, \"Test Ad Unit Mapping 1\", \"Test Ad Unit Mapping 2\")", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of ad unit mappings to return. If unspecified or 0, at most 10,000 ad unit mappings will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListAdUnitMappings` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent which owns this collection of ad unit mappings. Format: accounts/{publisher_id}/adUnits/{ad_unit_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/adUnits/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/adUnitMappings", + // "response": { + // "$ref": "ListAdUnitMappingsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admob.readonly" + // ], + // "streamingType": "NONE" + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsAdUnitsAdUnitMappingsListCall) Pages(ctx context.Context, f func(*ListAdUnitMappingsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "admob.accounts.apps.create": + +type AccountsAppsCreateCall struct { + s *Service + parent string + app *App + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an app under the specified AdMob account. This method +// has limited access. If you see a 403 permission denied error, please +// reach out to your account manager for access. +// +// - parent: Resource name of the account for which the app is being +// created. Example: accounts/pub-9876543210987654. +func (r *AccountsAppsService) Create(parent string, app *App) *AccountsAppsCreateCall { + c := &AccountsAppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.app = app + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsCreateCall) Fields(s ...googleapi.Field) *AccountsAppsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsCreateCall) Context(ctx context.Context) *AccountsAppsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.app) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/apps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.apps.create" call. +// Exactly one of *App or error will be non-nil. Any non-2xx status code +// is an error. Response headers are in either +// *App.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsAppsCreateCall) Do(opts ...googleapi.CallOption) (*App, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &App{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an app under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/apps", + // "httpMethod": "POST", + // "id": "admob.accounts.apps.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Resource name of the account for which the app is being created. Example: accounts/pub-9876543210987654", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/apps", + // "request": { + // "$ref": "App" + // }, + // "response": { + // "$ref": "App" + // }, + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.apps.list": + +type AccountsAppsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the apps under the specified AdMob account. +// +// - parent: Resource name of the account to list apps for. Example: +// accounts/pub-9876543210987654. +func (r *AccountsAppsService) List(parent string) *AccountsAppsListCall { + c := &AccountsAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of apps to return. If unspecified or 0, at most 10,000 apps will be +// returned. The maximum value is 20,000; values above 20,000 will be +// coerced to 20,000. +func (c *AccountsAppsListCall) PageSize(pageSize int64) *AccountsAppsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListAppsResponse`; indicates that this is a continuation +// of a prior `ListApps` call, and that the system should return the +// next page of data. +func (c *AccountsAppsListCall) PageToken(pageToken string) *AccountsAppsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsListCall) Fields(s ...googleapi.Field) *AccountsAppsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAppsListCall) IfNoneMatch(entityTag string) *AccountsAppsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsListCall) Context(ctx context.Context) *AccountsAppsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/apps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.apps.list" call. +// Exactly one of *ListAppsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListAppsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAppsListCall) Do(opts ...googleapi.CallOption) (*ListAppsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAppsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List the apps under the specified AdMob account.", + // "flatPath": "v1beta/accounts/{accountsId}/apps", + // "httpMethod": "GET", + // "id": "admob.accounts.apps.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of apps to return. If unspecified or 0, at most 10,000 apps will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListAppsResponse`; indicates that this is a continuation of a prior `ListApps` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the account to list apps for. Example: accounts/pub-9876543210987654", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/apps", + // "response": { + // "$ref": "ListAppsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admob.readonly" + // ], + // "streamingType": "NONE" + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsAppsListCall) Pages(ctx context.Context, f func(*ListAppsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "admob.accounts.campaignReport.generate": + +type AccountsCampaignReportGenerateCall struct { + s *Service + parent string + generatecampaignreportrequest *GenerateCampaignReportRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Generate: Generates Campaign Report based on provided specifications. +// +// - parent: Resource name of the account to generate the report for. +// Example: accounts/pub-9876543210987654. +func (r *AccountsCampaignReportService) Generate(parent string, generatecampaignreportrequest *GenerateCampaignReportRequest) *AccountsCampaignReportGenerateCall { + c := &AccountsCampaignReportGenerateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generatecampaignreportrequest = generatecampaignreportrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsCampaignReportGenerateCall) Fields(s ...googleapi.Field) *AccountsCampaignReportGenerateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsCampaignReportGenerateCall) Context(ctx context.Context) *AccountsCampaignReportGenerateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsCampaignReportGenerateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsCampaignReportGenerateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatecampaignreportrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/campaignReport:generate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.campaignReport.generate" call. +// Exactly one of *GenerateCampaignReportResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GenerateCampaignReportResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsCampaignReportGenerateCall) Do(opts ...googleapi.CallOption) (*GenerateCampaignReportResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GenerateCampaignReportResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generates Campaign Report based on provided specifications.", + // "flatPath": "v1beta/accounts/{accountsId}/campaignReport:generate", + // "httpMethod": "POST", + // "id": "admob.accounts.campaignReport.generate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Resource name of the account to generate the report for. Example: accounts/pub-9876543210987654", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/campaignReport:generate", + // "request": { + // "$ref": "GenerateCampaignReportRequest" + // }, + // "response": { + // "$ref": "GenerateCampaignReportResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admob.readonly", + // "https://www.googleapis.com/auth/admob.report" + // ], + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.mediationGroups.create": + +type AccountsMediationGroupsCreateCall struct { + s *Service + parent string + mediationgroup *MediationGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a mediation group under the specific AdMob account. +// This method has limited access. If you see a 403 permission denied +// error, please reach out to your account manager for access. +// +// - parent: The parent which owns the mediation group. Format: +// accounts/{publisher_id}. +func (r *AccountsMediationGroupsService) Create(parent string, mediationgroup *MediationGroup) *AccountsMediationGroupsCreateCall { + c := &AccountsMediationGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.mediationgroup = mediationgroup + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsMediationGroupsCreateCall) Fields(s ...googleapi.Field) *AccountsMediationGroupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsMediationGroupsCreateCall) Context(ctx context.Context) *AccountsMediationGroupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsMediationGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsMediationGroupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mediationgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/mediationGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.mediationGroups.create" call. +// Exactly one of *MediationGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MediationGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsMediationGroupsCreateCall) Do(opts ...googleapi.CallOption) (*MediationGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &MediationGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create a mediation group under the specific AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/mediationGroups", + // "httpMethod": "POST", + // "id": "admob.accounts.mediationGroups.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent which owns the mediation group. Format: accounts/{publisher_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/mediationGroups", + // "request": { + // "$ref": "MediationGroup" + // }, + // "response": { + // "$ref": "MediationGroup" + // }, + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.mediationGroups.list": + +type AccountsMediationGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List mediation groups under the specified AdMob account. This +// method has limited access. If you see a 403 permission denied error, +// please reach out to your account manager for access. +// +// - parent: Resource name of the account to list mediation groups for. +// Example: accounts/pub-9876543210987654. +func (r *AccountsMediationGroupsService) List(parent string) *AccountsMediationGroupsListCall { + c := &AccountsMediationGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter string that +// uses EBNF grammar syntax +// (https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible +// fields to filter by are: - "AD_SOURCE_IDS" - "AD_UNIT_IDS" - +// "APP_IDS" - "DISPLAY_NAME" - "FORMAT" - "MEDIATION_GROUP_ID" - +// "PLATFORM" - "STATE" - "TARGETED_REGION_CODES" Possible filter +// functions are: - `IN`: Used to filter fields that represent a +// singleton including "MEDIATION_GROUP_ID", "DISPLAY_NAME", "STATE", +// "PLATFORM", and "FORMAT". - `CONTAINS_ANY`: Used to filter fields +// that represent a collection including "AD_SOURCE_IDS", "AD_UNIT_IDS", +// "APP_IDS", and "TARGETED_REGION_CODES". The filter functions can be +// added together using `AND`. `OR` functionality is not supported. +// Example: filter: IN(DISPLAY_NAME, "Test Group 1", "Test Group 2") AND +// IN(PLATFORM, "ANDROID") AND CONTAINS_ANY(AD_SOURCE_IDS, +// "5450213213286189855") +func (c *AccountsMediationGroupsListCall) Filter(filter string) *AccountsMediationGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of mediation groups to return. If unspecified or 0, at most 10,000 +// mediation groups will be returned. The maximum value is 20,000; +// values above 20,000 will be coerced to 20,000. +func (c *AccountsMediationGroupsListCall) PageSize(pageSize int64) *AccountsMediationGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListMediationGroupsResponse`; indicates that this is a +// continuation of a prior `ListMediationGroups` call, and that the +// system should return the next page of data. +func (c *AccountsMediationGroupsListCall) PageToken(pageToken string) *AccountsMediationGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsMediationGroupsListCall) Fields(s ...googleapi.Field) *AccountsMediationGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsMediationGroupsListCall) IfNoneMatch(entityTag string) *AccountsMediationGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsMediationGroupsListCall) Context(ctx context.Context) *AccountsMediationGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsMediationGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsMediationGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/mediationGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.mediationGroups.list" call. +// Exactly one of *ListMediationGroupsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListMediationGroupsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsMediationGroupsListCall) Do(opts ...googleapi.CallOption) (*ListMediationGroupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListMediationGroupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List mediation groups under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/mediationGroups", + // "httpMethod": "GET", + // "id": "admob.accounts.mediationGroups.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter string that uses [EBNF grammar syntax](https://google.aip.dev/assets/misc/ebnf-filtering.txt). Possible fields to filter by are: - \"AD_SOURCE_IDS\" - \"AD_UNIT_IDS\" - \"APP_IDS\" - \"DISPLAY_NAME\" - \"FORMAT\" - \"MEDIATION_GROUP_ID\" - \"PLATFORM\" - \"STATE\" - \"TARGETED_REGION_CODES\" Possible filter functions are: - `IN`: Used to filter fields that represent a singleton including \"MEDIATION_GROUP_ID\", \"DISPLAY_NAME\", \"STATE\", \"PLATFORM\", and \"FORMAT\". - `CONTAINS_ANY`: Used to filter fields that represent a collection including \"AD_SOURCE_IDS\", \"AD_UNIT_IDS\", \"APP_IDS\", and \"TARGETED_REGION_CODES\". The filter functions can be added together using `AND`. `OR` functionality is not supported. Example: filter: IN(DISPLAY_NAME, \"Test Group 1\", \"Test Group 2\") AND IN(PLATFORM, \"ANDROID\") AND CONTAINS_ANY(AD_SOURCE_IDS, \"5450213213286189855\")", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of mediation groups to return. If unspecified or 0, at most 10,000 mediation groups will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListMediationGroupsResponse`; indicates that this is a continuation of a prior `ListMediationGroups` call, and that the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the account to list mediation groups for. Example: accounts/pub-9876543210987654", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/mediationGroups", + // "response": { + // "$ref": "ListMediationGroupsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/admob.readonly" + // ], + // "streamingType": "NONE" + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsMediationGroupsListCall) Pages(ctx context.Context, f func(*ListMediationGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "admob.accounts.mediationGroups.patch": + +type AccountsMediationGroupsPatchCall struct { + s *Service + name string + mediationgroup *MediationGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update the specified mediation group under the specified AdMob +// account. This method has limited access. If you see a 403 permission +// denied error, please reach out to your account manager for access. +// +// - name: Resource name for this mediation group. Format is: +// accounts/{publisher_id}/mediationGroups/{mediation_group_id} +// Example: accounts/pub-9876543210987654/mediationGroups/0123456789. +func (r *AccountsMediationGroupsService) Patch(name string, mediationgroup *MediationGroup) *AccountsMediationGroupsPatchCall { + c := &AccountsMediationGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.mediationgroup = mediationgroup + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of +// mediation group fields to be updated. Updates to repeated fields such +// as items in a list will fully replace the existing value(s) with the +// new value(s). Updates to individual values in a map can be done by +// indexing by the key. The following field masks are supported for +// mediation group updates: - +// "mediation_group_lines[\"{mediation_group_line_id}\"]" clang-format +// off - +// "mediation_group_lines[\"{mediation_group_line_id}\"].ad_unit_mappings +// [\"{ad_unit_id}\"]" clang-format on - +// "mediation_group_lines[\"{mediation_group_line_id}\"].cpm_micros" - +// "mediation_group_lines[\"{mediation_group_line_id}\"].cpm_mode" - +// "mediation_group_lines[\"{mediation_group_line_id}\"].state" - +// "mediation_group_lines[\"{mediation_group_line_id}\"].display_name" - +// "targeting.ad_unit_ids" To update a mediation group with a new +// mediation group line, use a distinct negative number for the +// "mediation_group_line_id". For Example: update_mask { paths: +// "mediation_group_lines[\"123456789012345\"].cpm_micros" } +func (c *AccountsMediationGroupsPatchCall) UpdateMask(updateMask string) *AccountsMediationGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsMediationGroupsPatchCall) Fields(s ...googleapi.Field) *AccountsMediationGroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsMediationGroupsPatchCall) Context(ctx context.Context) *AccountsMediationGroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsMediationGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsMediationGroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mediationgroup) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.mediationGroups.patch" call. +// Exactly one of *MediationGroup or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *MediationGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsMediationGroupsPatchCall) Do(opts ...googleapi.CallOption) (*MediationGroup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &MediationGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the specified mediation group under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}", + // "httpMethod": "PATCH", + // "id": "admob.accounts.mediationGroups.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for this mediation group. Format is: accounts/{publisher_id}/mediationGroups/{mediation_group_id} Example: accounts/pub-9876543210987654/mediationGroups/0123456789", + // "location": "path", + // "pattern": "^accounts/[^/]+/mediationGroups/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "List of mediation group fields to be updated. Updates to repeated fields such as items in a list will fully replace the existing value(s) with the new value(s). Updates to individual values in a map can be done by indexing by the key. The following field masks are supported for mediation group updates: - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"]\" clang-format off - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].ad_unit_mappings[\\\"{ad_unit_id}\\\"]\" clang-format on - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].cpm_micros\" - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].cpm_mode\" - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].state\" - \"mediation_group_lines[\\\"{mediation_group_line_id}\\\"].display_name\" - \"targeting.ad_unit_ids\" To update a mediation group with a new mediation group line, use a distinct negative number for the \"mediation_group_line_id\". For Example: update_mask { paths: \"mediation_group_lines[\\\"123456789012345\\\"].cpm_micros\" }", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "MediationGroup" + // }, + // "response": { + // "$ref": "MediationGroup" + // }, + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.mediationGroups.mediationAbExperiments.create": + +type AccountsMediationGroupsMediationAbExperimentsCreateCall struct { + s *Service + parent string + mediationabexperiment *MediationAbExperiment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create an A/B testing experiment for a specified AdMob +// account and a mediation group. This method has limited access. If you +// see a 403 permission denied error, please reach out to your account +// manager for access. +// +// - parent: The parent which owns the mediation group. Format: +// accounts/{publisher_id}/mediationGroups/{mediation_group_id}. +func (r *AccountsMediationGroupsMediationAbExperimentsService) Create(parent string, mediationabexperiment *MediationAbExperiment) *AccountsMediationGroupsMediationAbExperimentsCreateCall { + c := &AccountsMediationGroupsMediationAbExperimentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.mediationabexperiment = mediationabexperiment + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsMediationGroupsMediationAbExperimentsCreateCall) Fields(s ...googleapi.Field) *AccountsMediationGroupsMediationAbExperimentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsMediationGroupsMediationAbExperimentsCreateCall) Context(ctx context.Context) *AccountsMediationGroupsMediationAbExperimentsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsMediationGroupsMediationAbExperimentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsMediationGroupsMediationAbExperimentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.mediationabexperiment) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/mediationAbExperiments") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.mediationGroups.mediationAbExperiments.create" call. +// Exactly one of *MediationAbExperiment or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *MediationAbExperiment.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsMediationGroupsMediationAbExperimentsCreateCall) Do(opts ...googleapi.CallOption) (*MediationAbExperiment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &MediationAbExperiment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create an A/B testing experiment for a specified AdMob account and a mediation group. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}/mediationAbExperiments", + // "httpMethod": "POST", + // "id": "admob.accounts.mediationGroups.mediationAbExperiments.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent which owns the mediation group. Format: accounts/{publisher_id}/mediationGroups/{mediation_group_id}", + // "location": "path", + // "pattern": "^accounts/[^/]+/mediationGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/mediationAbExperiments", + // "request": { + // "$ref": "MediationAbExperiment" + // }, + // "response": { + // "$ref": "MediationAbExperiment" + // }, + // "streamingType": "NONE" + // } + +} + +// method id "admob.accounts.mediationGroups.mediationAbExperiments.stop": + +type AccountsMediationGroupsMediationAbExperimentsStopCall struct { + s *Service + name string + stopmediationabexperimentrequest *StopMediationAbExperimentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stop the mediation A/B experiment and choose a variant. This +// method has limited access. If you see a 403 permission denied error, +// please reach out to your account manager for access. +// +// - name: Name of the mediation group, the experiment for which to +// choose a variant for. Example: +// accounts/pub-9876543210987654/mediationGroups/0123456789/ +// mediationAbExperiments. +func (r *AccountsMediationGroupsMediationAbExperimentsService) Stop(name string, stopmediationabexperimentrequest *StopMediationAbExperimentRequest) *AccountsMediationGroupsMediationAbExperimentsStopCall { + c := &AccountsMediationGroupsMediationAbExperimentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopmediationabexperimentrequest = stopmediationabexperimentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsMediationGroupsMediationAbExperimentsStopCall) Fields(s ...googleapi.Field) *AccountsMediationGroupsMediationAbExperimentsStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsMediationGroupsMediationAbExperimentsStopCall) Context(ctx context.Context) *AccountsMediationGroupsMediationAbExperimentsStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsMediationGroupsMediationAbExperimentsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsMediationGroupsMediationAbExperimentsStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopmediationabexperimentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "admob.accounts.mediationGroups.mediationAbExperiments.stop" call. +// Exactly one of *MediationAbExperiment or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *MediationAbExperiment.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsMediationGroupsMediationAbExperimentsStopCall) Do(opts ...googleapi.CallOption) (*MediationAbExperiment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &MediationAbExperiment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Stop the mediation A/B experiment and choose a variant. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.", + // "flatPath": "v1beta/accounts/{accountsId}/mediationGroups/{mediationGroupsId}/mediationAbExperiments:stop", + // "httpMethod": "POST", + // "id": "admob.accounts.mediationGroups.mediationAbExperiments.stop", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of the mediation group, the experiment for which to choose a variant for. Example: accounts/pub-9876543210987654/mediationGroups/0123456789/ mediationAbExperiments", + // "location": "path", + // "pattern": "^accounts/[^/]+/mediationGroups/[^/]+/mediationAbExperiments$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:stop", + // "request": { + // "$ref": "StopMediationAbExperimentRequest" + // }, + // "response": { + // "$ref": "MediationAbExperiment" + // }, + // "streamingType": "NONE" + // } + } // method id "admob.accounts.mediationReport.generate": diff --git a/adsense/v2/adsense-gen.go b/adsense/v2/adsense-gen.go index 83d089a790f..e7bc3518ede 100644 --- a/adsense/v2/adsense-gen.go +++ b/adsense/v2/adsense-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/adsense/management/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // adsenseService, err := adsense.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // adsenseService, err := adsense.NewService(ctx, option.WithScopes(adsense.AdsenseReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adsenseService, err := adsense.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adsenseService, err := adsense.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package adsense // import "google.golang.org/api/adsense/v2" import ( diff --git a/adsensehost/v4.1/adsensehost-gen.go b/adsensehost/v4.1/adsensehost-gen.go index f889e4f36d5..972f469cd37 100644 --- a/adsensehost/v4.1/adsensehost-gen.go +++ b/adsensehost/v4.1/adsensehost-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/adsense/host/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // adsensehostService, err := adsensehost.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // adsensehostService, err := adsensehost.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // adsensehostService, err := adsensehost.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package adsensehost // import "google.golang.org/api/adsensehost/v4.1" import ( diff --git a/advisorynotifications/v1/advisorynotifications-gen.go b/advisorynotifications/v1/advisorynotifications-gen.go index f8a7b2b52c4..a40d589e375 100644 --- a/advisorynotifications/v1/advisorynotifications-gen.go +++ b/advisorynotifications/v1/advisorynotifications-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/advisory-notifications // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // advisorynotificationsService, err := advisorynotifications.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // advisorynotificationsService, err := advisorynotifications.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // advisorynotificationsService, err := advisorynotifications.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package advisorynotifications // import "google.golang.org/api/advisorynotifications/v1" import ( diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 9ac4117d19f..1c909739267 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -18,6 +18,178 @@ "description": "Train high-quality custom machine learning models with minimal machine learning expertise and effort.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/vertex-ai/", + "endpoints": [ + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-east1-aiplatform.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-east2-aiplatform.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-northeast1-aiplatform.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-northeast2-aiplatform.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-northeast3-aiplatform.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-south1-aiplatform.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-southeast1-aiplatform.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-southeast2-aiplatform.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://australia-southeast1-aiplatform.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://australia-southeast2-aiplatform.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-central2-aiplatform.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-north1-aiplatform.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-southwest1-aiplatform.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west1-aiplatform.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west2-aiplatform.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west3-aiplatform.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west4-aiplatform.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west6-aiplatform.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west8-aiplatform.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west9-aiplatform.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://me-west1-aiplatform.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://northamerica-northeast1-aiplatform.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://northamerica-northeast2-aiplatform.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://southamerica-east1-aiplatform.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://southamerica-west1-aiplatform.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-central1-aiplatform.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-central2-aiplatform.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-east1-aiplatform.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-east4-aiplatform.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-south1-aiplatform.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west1-aiplatform.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west2-aiplatform.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west3-aiplatform.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west4-aiplatform.googleapis.com/", + "location": "us-west4" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -12270,7 +12442,7 @@ } } }, - "revision": "20230809", + "revision": "20230812", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -16001,13 +16173,6 @@ "Used for Feature that is bytes." ], "type": "string" - }, - "versionLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels with user-defined metadata to organize your versions. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.", - "type": "object" } }, "type": "object" @@ -21628,6 +21793,10 @@ "description": "All parameters related to queuing and scheduling of custom jobs.", "id": "GoogleCloudAiplatformV1Scheduling", "properties": { + "disableRetries": { + "description": "Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.", + "type": "boolean" + }, "restartJobOnWorkerRestart": { "description": "Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.", "type": "boolean" diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index f3d81219a11..3f54a4705df 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/vertex-ai/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // aiplatformService, err := aiplatform.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // aiplatformService, err := aiplatform.NewService(ctx, option.WithScopes(aiplatform.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // aiplatformService, err := aiplatform.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // aiplatformService, err := aiplatform.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package aiplatform // import "google.golang.org/api/aiplatform/v1" import ( @@ -8014,14 +8028,6 @@ type GoogleCloudAiplatformV1Feature struct { // "BYTES" - Used for Feature that is bytes. ValueType string `json:"valueType,omitempty"` - // VersionLabels: The labels with user-defined metadata to organize your - // versions. Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are - // allowed. See https://goo.gl/xmQnxf for more information and examples - // of labels. - VersionLabels map[string]string `json:"versionLabels,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -18332,6 +18338,11 @@ func (s *GoogleCloudAiplatformV1ScheduleRunResponse) MarshalJSON() ([]byte, erro // GoogleCloudAiplatformV1Scheduling: All parameters related to queuing // and scheduling of custom jobs. type GoogleCloudAiplatformV1Scheduling struct { + // DisableRetries: Optional. Indicates if the job should retry for + // internal errors after the job starts running. If true, overrides + // `Scheduling.restart_job_on_worker_restart` to false. + DisableRetries bool `json:"disableRetries,omitempty"` + // RestartJobOnWorkerRestart: Restarts the entire CustomJob if a worker // gets restarted. This feature can be used by distributed training jobs // that are not resilient to workers leaving and joining a job. @@ -18340,22 +18351,21 @@ type GoogleCloudAiplatformV1Scheduling struct { // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RestartJobOnWorkerRestart") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "DisableRetries") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "RestartJobOnWorkerRestart") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "DisableRetries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index fb3f4421566..b75719fd134 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -18,6 +18,178 @@ "description": "Train high-quality custom machine learning models with minimal machine learning expertise and effort.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/vertex-ai/", + "endpoints": [ + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-east1-aiplatform.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-east2-aiplatform.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-northeast1-aiplatform.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-northeast2-aiplatform.googleapis.com/", + "location": "asia-northeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-northeast3-aiplatform.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-south1-aiplatform.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-southeast1-aiplatform.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://asia-southeast2-aiplatform.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://australia-southeast1-aiplatform.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://australia-southeast2-aiplatform.googleapis.com/", + "location": "australia-southeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-central2-aiplatform.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-north1-aiplatform.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-southwest1-aiplatform.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west1-aiplatform.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west2-aiplatform.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west3-aiplatform.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west4-aiplatform.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west6-aiplatform.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west8-aiplatform.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://europe-west9-aiplatform.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://me-west1-aiplatform.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://northamerica-northeast1-aiplatform.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://northamerica-northeast2-aiplatform.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://southamerica-east1-aiplatform.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://southamerica-west1-aiplatform.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-central1-aiplatform.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-central2-aiplatform.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-east1-aiplatform.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-east4-aiplatform.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-south1-aiplatform.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west1-aiplatform.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west2-aiplatform.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west3-aiplatform.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Locational Endpoint", + "endpointUrl": "https://us-west4-aiplatform.googleapis.com/", + "location": "us-west4" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -14749,7 +14921,7 @@ } } }, - "revision": "20230809", + "revision": "20230812", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -18703,34 +18875,6 @@ "Used for Feature that is bytes." ], "type": "string" - }, - "versionCreateTime": { - "description": "Output only. Timestamp when this version was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "versionDescription": { - "description": "The description of this version.", - "type": "string" - }, - "versionId": { - "description": "Output only. Immutable. The version ID of the feature. It is an auto-incrementing decimal number in string representation. A new version is committed when a new model version is created under an existing feature id.", - "readOnly": true, - "type": "string" - }, - "versionLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels with user-defined metadata to organize your versions. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.", - "type": "object" - }, - "versionUpdateTime": { - "description": "Output only. Timestamp when this version was most recently updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" } }, "type": "object" @@ -25054,6 +25198,10 @@ "description": "All parameters related to queuing and scheduling of custom jobs.", "id": "GoogleCloudAiplatformV1beta1Scheduling", "properties": { + "disableRetries": { + "description": "Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.", + "type": "boolean" + }, "restartJobOnWorkerRestart": { "description": "Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.", "type": "boolean" diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 0b8a677c6a5..8c29cfd7e00 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/vertex-ai/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // aiplatformService, err := aiplatform.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // aiplatformService, err := aiplatform.NewService(ctx, option.WithScopes(aiplatform.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // aiplatformService, err := aiplatform.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // aiplatformService, err := aiplatform.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package aiplatform // import "google.golang.org/api/aiplatform/v1beta1" import ( @@ -8810,31 +8824,6 @@ type GoogleCloudAiplatformV1beta1Feature struct { // "BYTES" - Used for Feature that is bytes. ValueType string `json:"valueType,omitempty"` - // VersionCreateTime: Output only. Timestamp when this version was - // created. - VersionCreateTime string `json:"versionCreateTime,omitempty"` - - // VersionDescription: The description of this version. - VersionDescription string `json:"versionDescription,omitempty"` - - // VersionId: Output only. Immutable. The version ID of the feature. It - // is an auto-incrementing decimal number in string representation. A - // new version is committed when a new model version is created under an - // existing feature id. - VersionId string `json:"versionId,omitempty"` - - // VersionLabels: The labels with user-defined metadata to organize your - // versions. Label keys and values can be no longer than 64 characters - // (Unicode codepoints), can only contain lowercase letters, numeric - // characters, underscores and dashes. International characters are - // allowed. See https://goo.gl/xmQnxf for more information and examples - // of labels. - VersionLabels map[string]string `json:"versionLabels,omitempty"` - - // VersionUpdateTime: Output only. Timestamp when this version was most - // recently updated. - VersionUpdateTime string `json:"versionUpdateTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -20363,6 +20352,11 @@ func (s *GoogleCloudAiplatformV1beta1ScheduleRunResponse) MarshalJSON() ([]byte, // GoogleCloudAiplatformV1beta1Scheduling: All parameters related to // queuing and scheduling of custom jobs. type GoogleCloudAiplatformV1beta1Scheduling struct { + // DisableRetries: Optional. Indicates if the job should retry for + // internal errors after the job starts running. If true, overrides + // `Scheduling.restart_job_on_worker_restart` to false. + DisableRetries bool `json:"disableRetries,omitempty"` + // RestartJobOnWorkerRestart: Restarts the entire CustomJob if a worker // gets restarted. This feature can be used by distributed training jobs // that are not resilient to workers leaving and joining a job. @@ -20371,22 +20365,21 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RestartJobOnWorkerRestart") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "DisableRetries") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "RestartJobOnWorkerRestart") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "DisableRetries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index d3ceff61751..b804c74d3f5 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20230424", + "revision": "20230904", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AbuseDetected": { @@ -459,6 +459,62 @@ }, "type": "object" }, + "AccessApproval": { + "description": "Alert that is triggered when Google support requests to access customer data.", + "id": "AccessApproval", + "properties": { + "justificationReason": { + "description": "Justification for data access based on justification enums.", + "items": { + "enum": [ + "JUSTIFICATION_UNSPECIFIED", + "CUSTOMER_INITIATED_SUPPORT", + "GOOGLE_INITIATED_REVIEW", + "GOOGLE_INITIATED_SERVICE", + "THIRD_PARTY_DATA_REQUEST", + "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" + ], + "enumDescriptions": [ + "Justification unspecified", + "Customer Initiated Support", + "Google Initiated Review", + "Google Initiated Service", + "Third Party Data Request", + "Google Response to Production Alert" + ], + "type": "string" + }, + "type": "array" + }, + "officeLocation": { + "description": "Office location of Google staff requesting access such as \"US\".", + "type": "string" + }, + "products": { + "description": "Products within scope of the Access Approvals request.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requestId": { + "description": "ID of the Access Approvals request. This is a helpful field when requesting support from Google.", + "type": "string" + }, + "scope": { + "description": "Scope of access, also known as a resource. This is further narrowed down by the product field.", + "type": "string" + }, + "tickets": { + "description": "Support tickets related to this Access Approvals request. Populated if there is an associated case number.", + "items": { + "$ref": "SupportTicket" + }, + "type": "array" + } + }, + "type": "object" + }, "AccountSuspensionDetails": { "description": "Details about why an account is receiving an account suspension warning.", "id": "AccountSuspensionDetails", @@ -1816,6 +1872,21 @@ }, "type": "object" }, + "SupportTicket": { + "description": "Support ticket related to Access Approvals request", + "id": "SupportTicket", + "properties": { + "ticketId": { + "description": "Support ticket ID", + "type": "string" + }, + "ticketUrl": { + "description": "Link to support ticket", + "type": "string" + } + }, + "type": "object" + }, "SuspiciousActivity": { "description": "A mobile suspicious activity alert. Derived from audit logs.", "id": "SuspiciousActivity", diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index db46c72d886..39c3bae58c9 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admin-sdk/alertcenter/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // alertcenterService, err := alertcenter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // alertcenterService, err := alertcenter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // alertcenterService, err := alertcenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package alertcenter // import "google.golang.org/api/alertcenter/v1beta1" import ( @@ -222,6 +235,65 @@ func (s *AbuseDetected) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccessApproval: Alert that is triggered when Google support requests +// to access customer data. +type AccessApproval struct { + // JustificationReason: Justification for data access based on + // justification enums. + // + // Possible values: + // "JUSTIFICATION_UNSPECIFIED" - Justification unspecified + // "CUSTOMER_INITIATED_SUPPORT" - Customer Initiated Support + // "GOOGLE_INITIATED_REVIEW" - Google Initiated Review + // "GOOGLE_INITIATED_SERVICE" - Google Initiated Service + // "THIRD_PARTY_DATA_REQUEST" - Third Party Data Request + // "GOOGLE_RESPONSE_TO_PRODUCTION_ALERT" - Google Response to + // Production Alert + JustificationReason []string `json:"justificationReason,omitempty"` + + // OfficeLocation: Office location of Google staff requesting access + // such as "US". + OfficeLocation string `json:"officeLocation,omitempty"` + + // Products: Products within scope of the Access Approvals request. + Products []string `json:"products,omitempty"` + + // RequestId: ID of the Access Approvals request. This is a helpful + // field when requesting support from Google. + RequestId string `json:"requestId,omitempty"` + + // Scope: Scope of access, also known as a resource. This is further + // narrowed down by the product field. + Scope string `json:"scope,omitempty"` + + // Tickets: Support tickets related to this Access Approvals request. + // Populated if there is an associated case number. + Tickets []*SupportTicket `json:"tickets,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JustificationReason") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JustificationReason") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AccessApproval) MarshalJSON() ([]byte, error) { + type NoMethod AccessApproval + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AccountSuspensionDetails: Details about why an account is receiving // an account suspension warning. type AccountSuspensionDetails struct { @@ -2440,6 +2512,37 @@ func (s *SuperAdminPasswordResetEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SupportTicket: Support ticket related to Access Approvals request +type SupportTicket struct { + // TicketId: Support ticket ID + TicketId string `json:"ticketId,omitempty"` + + // TicketUrl: Link to support ticket + TicketUrl string `json:"ticketUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TicketId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TicketId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SupportTicket) MarshalJSON() ([]byte, error) { + type NoMethod SupportTicket + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SuspiciousActivity: A mobile suspicious activity alert. Derived from // audit logs. type SuspiciousActivity struct { diff --git a/analytics/v3/analytics-gen.go b/analytics/v3/analytics-gen.go index 1bc22b9d462..e802cacc80a 100644 --- a/analytics/v3/analytics-gen.go +++ b/analytics/v3/analytics-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/analytics/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticsService, err := analytics.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticsService, err := analytics.NewService(ctx, option.WithScopes(analytics.AnalyticsUserDeletionScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticsService, err := analytics.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticsService, err := analytics.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analytics // import "google.golang.org/api/analytics/v3" import ( diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 43ee8e2d3ab..9e39bfa4e5a 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -3192,6 +3192,160 @@ ] } } + }, + "sKAdNetworkConversionValueSchema": { + "methods": { + "create": { + "description": "Creates a SKAdNetworkConversionValueSchema.", + "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + "httpMethod": "POST", + "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this schema will be created. Format: properties/{property}/dataStreams/{dataStream}", + "location": "path", + "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "delete": { + "description": "Deletes target SKAdNetworkConversionValueSchema.", + "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + "httpMethod": "DELETE", + "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + "location": "path", + "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + }, + "get": { + "description": "Looks up a single SKAdNetworkConversionValueSchema.", + "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + "httpMethod": "GET", + "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of SKAdNetwork conversion value schema to look up. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + "location": "path", + "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "list": { + "description": "Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one SKAdNetworkConversionValueSchema.", + "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + "httpMethod": "GET", + "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSKAdNetworkConversionValueSchema` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Format: properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema", + "location": "path", + "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit", + "https://www.googleapis.com/auth/analytics.readonly" + ] + }, + "patch": { + "description": "Updates a SKAdNetworkConversionValueSchema.", + "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + "httpMethod": "PATCH", + "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Resource name of the schema. This will be child of ONLY an iOS stream, and there can be at most one such child under an iOS stream. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema", + "location": "path", + "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to be updated. Omitted fields will not be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + }, + "response": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + }, + "scopes": [ + "https://www.googleapis.com/auth/analytics.edit" + ] + } + } } } }, @@ -4356,7 +4510,7 @@ } } }, - "revision": "20230817", + "revision": "20230906", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -5793,6 +5947,10 @@ "searchAds360Link": { "$ref": "GoogleAnalyticsAdminV1alphaSearchAds360Link", "description": "A snapshot of a SearchAds360Link resource in change history." + }, + "skadnetworkConversionValueSchema": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema", + "description": "A snapshot of SKAdNetworkConversionValueSchema resource in change history." } }, "type": "object" @@ -6040,6 +6198,49 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaConversionValues": { + "description": "Conversion value settings for a postback window for SKAdNetwork conversion value schema.", + "id": "GoogleAnalyticsAdminV1alphaConversionValues", + "properties": { + "coarseValue": { + "description": "Required. A coarse grained conversion value. This value is not guaranteed to be unique.", + "enum": [ + "COARSE_VALUE_UNSPECIFIED", + "COARSE_VALUE_LOW", + "COARSE_VALUE_MEDIUM", + "COARSE_VALUE_HIGH" + ], + "enumDescriptions": [ + "Coarse value not specified.", + "Coarse value of low.", + "Coarse value of medium.", + "Coarse value of high." + ], + "type": "string" + }, + "displayName": { + "description": "Display name of the SKAdNetwork conversion value. The max allowed display name length is 50 UTF-16 code units.", + "type": "string" + }, + "eventMappings": { + "description": "Event conditions that must be met for this Conversion Value to be achieved. The conditions in this list are ANDed together. It must have minimum of 1 entry and maximum of 3 entries, if the postback window is enabled.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaEventMapping" + }, + "type": "array" + }, + "fineValue": { + "description": "The fine-grained conversion value. This is applicable only to the first postback window. Its valid values are [0,63], both inclusive. It must be set for postback window 1, and must not be set for postback window 2 \u0026 3. This value is not guaranteed to be unique. If the configuration for the first postback window is re-used for second or third postback windows this field has no effect.", + "format": "int32", + "type": "integer" + }, + "lockEnabled": { + "description": "If true, the SDK should lock to this conversion value for the current postback window.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaCreateAccessBindingRequest": { "description": "Request message for CreateAccessBinding RPC.", "id": "GoogleAnalyticsAdminV1alphaCreateAccessBindingRequest", @@ -6597,6 +6798,37 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaEventMapping": { + "description": "Event setting conditions to match an event.", + "id": "GoogleAnalyticsAdminV1alphaEventMapping", + "properties": { + "eventName": { + "description": "Required. Name of the GA4 event. It must always be set. The max allowed display name length is 40 UTF-16 code units.", + "type": "string" + }, + "maxEventCount": { + "description": "The maximum number of times the event occurred. If not set, maximum event count won't be checked.", + "format": "int64", + "type": "string" + }, + "maxEventValue": { + "description": "The maximum revenue generated due to the event. Revenue currency will be defined at the property level. If not set, maximum event value won't be checked.", + "format": "double", + "type": "number" + }, + "minEventCount": { + "description": "At least one of the following four min/max values must be set. The values set will be ANDed together to qualify an event. The minimum number of times the event occurred. If not set, minimum event count won't be checked.", + "format": "int64", + "type": "string" + }, + "minEventValue": { + "description": "The minimum revenue generated due to the event. Revenue currency will be defined at the property level. If not set, minimum event value won't be checked.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaExpandedDataSet": { "description": "A resource message representing a GA4 ExpandedDataSet.", "id": "GoogleAnalyticsAdminV1alphaExpandedDataSet", @@ -7326,6 +7558,24 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse": { + "description": "Response message for ListSKAdNetworkConversionValueSchemas RPC", + "id": "GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. Currently, Google Analytics supports only one SKAdNetworkConversionValueSchema per dataStream, so this will never be populated.", + "type": "string" + }, + "skadnetworkConversionValueSchemas": { + "description": "List of SKAdNetworkConversionValueSchemas. This will have at most one value.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse": { "description": "Response message for ListSearchAds360Links RPC.", "id": "GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse", @@ -7472,6 +7722,24 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaPostbackWindow": { + "description": "Settings for a SKAdNetwork conversion postback window.", + "id": "GoogleAnalyticsAdminV1alphaPostbackWindow", + "properties": { + "conversionValues": { + "description": "Ordering of the repeated field will be used to prioritize the conversion value settings. Lower indexed entries are prioritized higher. The first conversion value setting that evaluates to true will be selected. It must have at least one entry if enable_postback_window_settings is set to true. It can have maximum of 128 entries.", + "items": { + "$ref": "GoogleAnalyticsAdminV1alphaConversionValues" + }, + "type": "array" + }, + "postbackWindowSettingsEnabled": { + "description": "If enable_postback_window_settings is true, conversion_values must be populated and will be used for determining when and how to set the Conversion Value on a client device and exporting schema to linked Ads accounts. If false, the settings are not used, but are retained in case they may be used in the future. This must always be true for postback_window_one.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaProperty": { "description": "A resource message representing a Google Analytics GA4 property.", "id": "GoogleAnalyticsAdminV1alphaProperty", @@ -7780,6 +8048,34 @@ }, "type": "object" }, + "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema": { + "description": "SKAdNetwork conversion value schema of an iOS stream.", + "id": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema", + "properties": { + "applyConversionValues": { + "description": "If enabled, the GA SDK will set conversion values using this schema definition, and schema will be exported to any Google Ads accounts linked to this property. If disabled, the GA SDK will not automatically set conversion values, and also the schema will not be exported to Ads.", + "type": "boolean" + }, + "name": { + "description": "Output only. Resource name of the schema. This will be child of ONLY an iOS stream, and there can be at most one such child under an iOS stream. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema", + "readOnly": true, + "type": "string" + }, + "postbackWindowOne": { + "$ref": "GoogleAnalyticsAdminV1alphaPostbackWindow", + "description": "Required. The conversion value settings for the first postback window. These differ from values for postback window two and three in that they contain a \"Fine\" grained conversion value (a numeric value). Conversion values for this postback window must be set. The other windows are optional and may inherit this window's settings if unset or disabled." + }, + "postbackWindowThree": { + "$ref": "GoogleAnalyticsAdminV1alphaPostbackWindow", + "description": "The conversion value settings for the third postback window. This field should only be set if the user chose to define different conversion values for this postback window. It is allowed to configure window 3 without setting window 2. In case window 1 \u0026 2 settings are set and enable_postback_window_settings for this postback window is set to false, the schema will inherit settings from postback_window_two." + }, + "postbackWindowTwo": { + "$ref": "GoogleAnalyticsAdminV1alphaPostbackWindow", + "description": "The conversion value settings for the second postback window. This field should only be configured if there is a need to define different conversion values for this postback window. If enable_postback_window_settings is set to false for this postback window, the values from postback_window_one will be used." + } + }, + "type": "object" + }, "GoogleAnalyticsAdminV1alphaSearchAds360Link": { "description": "A link between a GA4 property and a Search Ads 360 entity.", "id": "GoogleAnalyticsAdminV1alphaSearchAds360Link", @@ -7893,6 +8189,7 @@ "EXPANDED_DATA_SET", "CHANNEL_GROUP", "ENHANCED_MEASUREMENT_SETTINGS", + "SKADNETWORK_CONVERSION_VALUE_SCHEMA", "ADSENSE_LINK", "AUDIENCE", "EVENT_CREATE_RULE" @@ -7917,6 +8214,7 @@ "ExpandedDataSet resource", "ChannelGroup resource", "EnhancedMeasurementSettings resource", + "SKAdNetworkConversionValueSchema resource", "AdSenseLink resource", "Audience resource", "EventCreateRule resource" diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index d8d6675b031..44214e365d7 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: http://code.google.com/apis/analytics/docs/mgmt/home.html // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticsadminService, err := analyticsadmin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithScopes(analyticsadmin.AnalyticsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analyticsadmin // import "google.golang.org/api/analyticsadmin/v1alpha" import ( @@ -334,6 +348,7 @@ func NewPropertiesDataStreamsService(s *Service) *PropertiesDataStreamsService { rs := &PropertiesDataStreamsService{s: s} rs.EventCreateRules = NewPropertiesDataStreamsEventCreateRulesService(s) rs.MeasurementProtocolSecrets = NewPropertiesDataStreamsMeasurementProtocolSecretsService(s) + rs.SKAdNetworkConversionValueSchema = NewPropertiesDataStreamsSKAdNetworkConversionValueSchemaService(s) return rs } @@ -343,6 +358,8 @@ type PropertiesDataStreamsService struct { EventCreateRules *PropertiesDataStreamsEventCreateRulesService MeasurementProtocolSecrets *PropertiesDataStreamsMeasurementProtocolSecretsService + + SKAdNetworkConversionValueSchema *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService } func NewPropertiesDataStreamsEventCreateRulesService(s *Service) *PropertiesDataStreamsEventCreateRulesService { @@ -363,6 +380,15 @@ type PropertiesDataStreamsMeasurementProtocolSecretsService struct { s *Service } +func NewPropertiesDataStreamsSKAdNetworkConversionValueSchemaService(s *Service) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService { + rs := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaService{s: s} + return rs +} + +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaService struct { + s *Service +} + func NewPropertiesDisplayVideo360AdvertiserLinkProposalsService(s *Service) *PropertiesDisplayVideo360AdvertiserLinkProposalsService { rs := &PropertiesDisplayVideo360AdvertiserLinkProposalsService{s: s} return rs @@ -2994,6 +3020,10 @@ type GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource struct // history. SearchAds360Link *GoogleAnalyticsAdminV1alphaSearchAds360Link `json:"searchAds360Link,omitempty"` + // SkadnetworkConversionValueSchema: A snapshot of + // SKAdNetworkConversionValueSchema resource in change history. + SkadnetworkConversionValueSchema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema `json:"skadnetworkConversionValueSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "Account") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3414,6 +3444,65 @@ func (s *GoogleAnalyticsAdminV1alphaConversionEvent) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaConversionValues: Conversion value +// settings for a postback window for SKAdNetwork conversion value +// schema. +type GoogleAnalyticsAdminV1alphaConversionValues struct { + // CoarseValue: Required. A coarse grained conversion value. This value + // is not guaranteed to be unique. + // + // Possible values: + // "COARSE_VALUE_UNSPECIFIED" - Coarse value not specified. + // "COARSE_VALUE_LOW" - Coarse value of low. + // "COARSE_VALUE_MEDIUM" - Coarse value of medium. + // "COARSE_VALUE_HIGH" - Coarse value of high. + CoarseValue string `json:"coarseValue,omitempty"` + + // DisplayName: Display name of the SKAdNetwork conversion value. The + // max allowed display name length is 50 UTF-16 code units. + DisplayName string `json:"displayName,omitempty"` + + // EventMappings: Event conditions that must be met for this Conversion + // Value to be achieved. The conditions in this list are ANDed together. + // It must have minimum of 1 entry and maximum of 3 entries, if the + // postback window is enabled. + EventMappings []*GoogleAnalyticsAdminV1alphaEventMapping `json:"eventMappings,omitempty"` + + // FineValue: The fine-grained conversion value. This is applicable only + // to the first postback window. Its valid values are [0,63], both + // inclusive. It must be set for postback window 1, and must not be set + // for postback window 2 & 3. This value is not guaranteed to be unique. + // If the configuration for the first postback window is re-used for + // second or third postback windows this field has no effect. + FineValue int64 `json:"fineValue,omitempty"` + + // LockEnabled: If true, the SDK should lock to this conversion value + // for the current postback window. + LockEnabled bool `json:"lockEnabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CoarseValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CoarseValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaConversionValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaConversionValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaCreateAccessBindingRequest: Request // message for CreateAccessBinding RPC. type GoogleAnalyticsAdminV1alphaCreateAccessBindingRequest struct { @@ -4372,6 +4461,72 @@ func (s *GoogleAnalyticsAdminV1alphaEventCreateRule) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaEventMapping: Event setting conditions to +// match an event. +type GoogleAnalyticsAdminV1alphaEventMapping struct { + // EventName: Required. Name of the GA4 event. It must always be set. + // The max allowed display name length is 40 UTF-16 code units. + EventName string `json:"eventName,omitempty"` + + // MaxEventCount: The maximum number of times the event occurred. If not + // set, maximum event count won't be checked. + MaxEventCount int64 `json:"maxEventCount,omitempty,string"` + + // MaxEventValue: The maximum revenue generated due to the event. + // Revenue currency will be defined at the property level. If not set, + // maximum event value won't be checked. + MaxEventValue float64 `json:"maxEventValue,omitempty"` + + // MinEventCount: At least one of the following four min/max values must + // be set. The values set will be ANDed together to qualify an event. + // The minimum number of times the event occurred. If not set, minimum + // event count won't be checked. + MinEventCount int64 `json:"minEventCount,omitempty,string"` + + // MinEventValue: The minimum revenue generated due to the event. + // Revenue currency will be defined at the property level. If not set, + // minimum event value won't be checked. + MinEventValue float64 `json:"minEventValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EventName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaEventMapping) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaEventMapping + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleAnalyticsAdminV1alphaEventMapping) UnmarshalJSON(data []byte) error { + type NoMethod GoogleAnalyticsAdminV1alphaEventMapping + var s1 struct { + MaxEventValue gensupport.JSONFloat64 `json:"maxEventValue"` + MinEventValue gensupport.JSONFloat64 `json:"minEventValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxEventValue = float64(s1.MaxEventValue) + s.MinEventValue = float64(s1.MinEventValue) + return nil +} + // GoogleAnalyticsAdminV1alphaExpandedDataSet: A resource message // representing a GA4 ExpandedDataSet. type GoogleAnalyticsAdminV1alphaExpandedDataSet struct { @@ -5848,6 +6003,47 @@ func (s *GoogleAnalyticsAdminV1alphaListPropertiesResponse) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespon +// se: Response message for ListSKAdNetworkConversionValueSchemas RPC +type GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. Currently, Google Analytics supports only one + // SKAdNetworkConversionValueSchema per dataStream, so this will never + // be populated. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SkadnetworkConversionValueSchemas: List of + // SKAdNetworkConversionValueSchemas. This will have at most one value. + SkadnetworkConversionValueSchemas []*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema `json:"skadnetworkConversionValueSchemas,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse: Response // message for ListSearchAds360Links RPC. type GoogleAnalyticsAdminV1alphaListSearchAds360LinksResponse struct { @@ -6121,6 +6317,49 @@ func (s *GoogleAnalyticsAdminV1alphaParameterMutation) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaPostbackWindow: Settings for a SKAdNetwork +// conversion postback window. +type GoogleAnalyticsAdminV1alphaPostbackWindow struct { + // ConversionValues: Ordering of the repeated field will be used to + // prioritize the conversion value settings. Lower indexed entries are + // prioritized higher. The first conversion value setting that evaluates + // to true will be selected. It must have at least one entry if + // enable_postback_window_settings is set to true. It can have maximum + // of 128 entries. + ConversionValues []*GoogleAnalyticsAdminV1alphaConversionValues `json:"conversionValues,omitempty"` + + // PostbackWindowSettingsEnabled: If enable_postback_window_settings is + // true, conversion_values must be populated and will be used for + // determining when and how to set the Conversion Value on a client + // device and exporting schema to linked Ads accounts. If false, the + // settings are not used, but are retained in case they may be used in + // the future. This must always be true for postback_window_one. + PostbackWindowSettingsEnabled bool `json:"postbackWindowSettingsEnabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConversionValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConversionValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaPostbackWindow) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaPostbackWindow + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaProperty: A resource message representing // a Google Analytics GA4 property. type GoogleAnalyticsAdminV1alphaProperty struct { @@ -6523,6 +6762,76 @@ func (s *GoogleAnalyticsAdminV1alphaRunAccessReportResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema: +// SKAdNetwork conversion value schema of an iOS stream. +type GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema struct { + // ApplyConversionValues: If enabled, the GA SDK will set conversion + // values using this schema definition, and schema will be exported to + // any Google Ads accounts linked to this property. If disabled, the GA + // SDK will not automatically set conversion values, and also the schema + // will not be exported to Ads. + ApplyConversionValues bool `json:"applyConversionValues,omitempty"` + + // Name: Output only. Resource name of the schema. This will be child of + // ONLY an iOS stream, and there can be at most one such child under an + // iOS stream. Format: + // properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionVa + // lueSchema + Name string `json:"name,omitempty"` + + // PostbackWindowOne: Required. The conversion value settings for the + // first postback window. These differ from values for postback window + // two and three in that they contain a "Fine" grained conversion value + // (a numeric value). Conversion values for this postback window must be + // set. The other windows are optional and may inherit this window's + // settings if unset or disabled. + PostbackWindowOne *GoogleAnalyticsAdminV1alphaPostbackWindow `json:"postbackWindowOne,omitempty"` + + // PostbackWindowThree: The conversion value settings for the third + // postback window. This field should only be set if the user chose to + // define different conversion values for this postback window. It is + // allowed to configure window 3 without setting window 2. In case + // window 1 & 2 settings are set and enable_postback_window_settings for + // this postback window is set to false, the schema will inherit + // settings from postback_window_two. + PostbackWindowThree *GoogleAnalyticsAdminV1alphaPostbackWindow `json:"postbackWindowThree,omitempty"` + + // PostbackWindowTwo: The conversion value settings for the second + // postback window. This field should only be configured if there is a + // need to define different conversion values for this postback window. + // If enable_postback_window_settings is set to false for this postback + // window, the values from postback_window_one will be used. + PostbackWindowTwo *GoogleAnalyticsAdminV1alphaPostbackWindow `json:"postbackWindowTwo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "ApplyConversionValues") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApplyConversionValues") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAnalyticsAdminV1alphaSearchAds360Link: A link between a GA4 // property and a Search Ads 360 entity. type GoogleAnalyticsAdminV1alphaSearchAds360Link struct { @@ -6662,6 +6971,8 @@ type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { // "CHANNEL_GROUP" - ChannelGroup resource // "ENHANCED_MEASUREMENT_SETTINGS" - EnhancedMeasurementSettings // resource + // "SKADNETWORK_CONVERSION_VALUE_SCHEMA" - + // SKAdNetworkConversionValueSchema resource // "ADSENSE_LINK" - AdSenseLink resource // "AUDIENCE" - Audience resource // "EVENT_CREATE_RULE" - EventCreateRule resource @@ -23324,6 +23635,809 @@ func (c *PropertiesDataStreamsMeasurementProtocolSecretsPatchCall) Do(opts ...go } +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create": + +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall struct { + s *Service + parent string + googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a SKAdNetworkConversionValueSchema. +// +// - parent: The parent resource where this schema will be created. +// Format: properties/{property}/dataStreams/{dataStream}. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Create(parent string, googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema = googleanalyticsadminv1alphaskadnetworkconversionvalueschema + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sKAdNetworkConversionValueSchema") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + // "httpMethod": "POST", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this schema will be created. Format: properties/{property}/dataStreams/{dataStream}", + // "location": "path", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete": + +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes target SKAdNetworkConversionValueSchema. +// +// - name: The name of the SKAdNetworkConversionValueSchema to delete. +// Format: +// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion +// ValueSchema/{skadnetwork_conversion_value_schema}. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Delete(name string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes target SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "httpMethod": "DELETE", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the SKAdNetworkConversionValueSchema to delete. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + // "location": "path", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get": + +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Looks up a single SKAdNetworkConversionValueSchema. +// +// - name: The resource name of SKAdNetwork conversion value schema to +// look up. Format: +// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion +// ValueSchema/{skadnetwork_conversion_value_schema}. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Get(name string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaGetCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Looks up a single SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of SKAdNetwork conversion value schema to look up. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}", + // "location": "path", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list": + +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SKAdNetworkConversionValueSchema on a stream. Properties +// can have at most one SKAdNetworkConversionValueSchema. +// +// - parent: Format: +// properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConvers +// ionValueSchema Example: +// properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) List(parent string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of resources to return. The service may return fewer than this value, +// even if there are additional pages. If unspecified, at most 50 +// resources will be returned. The maximum value is 200; (higher values +// will be coerced to the maximum) +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageSize(pageSize int64) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSKAdNetworkConversionValueSchemas` +// call. Provide this to retrieve the subsequent page. When paginating, +// all other parameters provided to +// `ListSKAdNetworkConversionValueSchema` must match the call that +// provided the page token. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) PageToken(pageToken string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) IfNoneMatch(entityTag string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sKAdNetworkConversionValueSchema") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespo +// nse or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasRespo +// nse.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema", + // "httpMethod": "GET", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListSKAdNetworkConversionValueSchemas` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSKAdNetworkConversionValueSchema` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Format: properties/{property_id}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema", + // "location": "path", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/sKAdNetworkConversionValueSchema", + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit", + // "https://www.googleapis.com/auth/analytics.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaListCall) Pages(ctx context.Context, f func(*GoogleAnalyticsAdminV1alphaListSKAdNetworkConversionValueSchemasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch": + +type PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall struct { + s *Service + name string + googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a SKAdNetworkConversionValueSchema. +// +// - name: Output only. Resource name of the schema. This will be child +// of ONLY an iOS stream, and there can be at most one such child +// under an iOS stream. Format: +// properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversion +// ValueSchema. +func (r *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService) Patch(name string, googleanalyticsadminv1alphaskadnetworkconversionvalueschema *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { + c := &PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema = googleanalyticsadminv1alphaskadnetworkconversionvalueschema + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to be updated. Omitted fields will not be updated. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) UpdateMask(updateMask string) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Context(ctx context.Context) *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleanalyticsadminv1alphaskadnetworkconversionvalueschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch" call. +// Exactly one of +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *PropertiesDataStreamsSKAdNetworkConversionValueSchemaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a SKAdNetworkConversionValueSchema.", + // "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/sKAdNetworkConversionValueSchema/{sKAdNetworkConversionValueSchemaId}", + // "httpMethod": "PATCH", + // "id": "analyticsadmin.properties.dataStreams.sKAdNetworkConversionValueSchema.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. Resource name of the schema. This will be child of ONLY an iOS stream, and there can be at most one such child under an iOS stream. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema", + // "location": "path", + // "pattern": "^properties/[^/]+/dataStreams/[^/]+/sKAdNetworkConversionValueSchema/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to be updated. Omitted fields will not be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, + // "response": { + // "$ref": "GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/analytics.edit" + // ] + // } + +} + // method id "analyticsadmin.properties.displayVideo360AdvertiserLinkProposals.approve": type PropertiesDisplayVideo360AdvertiserLinkProposalsApproveCall struct { diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 2158b40b503..cae69392532 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: http://code.google.com/apis/analytics/docs/mgmt/home.html // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticsadminService, err := analyticsadmin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithScopes(analyticsadmin.AnalyticsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticsadminService, err := analyticsadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analyticsadmin // import "google.golang.org/api/analyticsadmin/v1beta" import ( diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 10c9d8a5e47..b78cebaeece 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -313,7 +313,7 @@ } } }, - "revision": "20230808", + "revision": "20230906", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -635,7 +635,7 @@ "description": "One dimension can be the result of an expression of multiple dimensions. For example, dimension \"country, city\": concatenate(country, \", \", city)." }, "name": { - "description": "The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names. If `dimensionExpression` is specified, `name` can be any string that you would like within the allowed character set. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimension names that you choose must match the regular expression `^[a-zA-Z0-9_]$`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.", + "description": "The name of the dimension. See the [API Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names supported by core reporting methods such as `runReport` and `batchRunReports`. See [Realtime Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) for the list of dimension names supported by the `runRealtimeReport` method. See [Funnel Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) for the list of dimension names supported by the `runFunnelReport` method. If `dimensionExpression` is specified, `name` can be any string that you would like within the allowed character set. For example if a `dimensionExpression` concatenates `country` and `city`, you could call that dimension `countryAndCity`. Dimension names that you choose must match the regular expression `^[a-zA-Z0-9_]$`. Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and `pivots`.", "type": "string" } }, @@ -888,7 +888,7 @@ "type": "boolean" }, "name": { - "description": "The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names. If `expression` is specified, `name` can be any string that you would like within the allowed character set. For example if `expression` is `screenPageViews/sessions`, you could call that metric's name = `viewsPerSession`. Metric names that you choose must match the regular expression `^[a-zA-Z0-9_]$`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.", + "description": "The name of the metric. See the [API Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) for the list of metric names supported by core reporting methods such as `runReport` and `batchRunReports`. See [Realtime Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) for the list of metric names supported by the `runRealtimeReport` method. See [Funnel Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) for the list of metric names supported by the `runFunnelReport` method. If `expression` is specified, `name` can be any string that you would like within the allowed character set. For example if `expression` is `screenPageViews/sessions`, you could call that metric's name = `viewsPerSession`. Metric names that you choose must match the regular expression `^[a-zA-Z0-9_]$`. Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric `expression`.", "type": "string" } }, diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 4438adefd29..3001805a3ec 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/analytics/devguides/reporting/data/v1/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticsdataService, err := analyticsdata.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticsdataService, err := analyticsdata.NewService(ctx, option.WithScopes(analyticsdata.AnalyticsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticsdataService, err := analyticsdata.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticsdataService, err := analyticsdata.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analyticsdata // import "google.golang.org/api/analyticsdata/v1beta" import ( @@ -792,14 +806,20 @@ type Dimension struct { // Name: The name of the dimension. See the API Dimensions // (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) - // for the list of dimension names. If `dimensionExpression` is - // specified, `name` can be any string that you would like within the - // allowed character set. For example if a `dimensionExpression` - // concatenates `country` and `city`, you could call that dimension - // `countryAndCity`. Dimension names that you choose must match the - // regular expression `^[a-zA-Z0-9_]$`. Dimensions are referenced by - // `name` in `dimensionFilter`, `orderBys`, `dimensionExpression`, and - // `pivots`. + // for the list of dimension names supported by core reporting methods + // such as `runReport` and `batchRunReports`. See Realtime Dimensions + // (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#dimensions) + // for the list of dimension names supported by the `runRealtimeReport` + // method. See Funnel Dimensions + // (https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#dimensions) + // for the list of dimension names supported by the `runFunnelReport` + // method. If `dimensionExpression` is specified, `name` can be any + // string that you would like within the allowed character set. For + // example if a `dimensionExpression` concatenates `country` and `city`, + // you could call that dimension `countryAndCity`. Dimension names that + // you choose must match the regular expression `^[a-zA-Z0-9_]$`. + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "DimensionExpression") @@ -1260,13 +1280,19 @@ type Metric struct { // Name: The name of the metric. See the API Metrics // (https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) - // for the list of metric names. If `expression` is specified, `name` - // can be any string that you would like within the allowed character - // set. For example if `expression` is `screenPageViews/sessions`, you - // could call that metric's name = `viewsPerSession`. Metric names that - // you choose must match the regular expression `^[a-zA-Z0-9_]$`. - // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and - // metric `expression`. + // for the list of metric names supported by core reporting methods such + // as `runReport` and `batchRunReports`. See Realtime Metrics + // (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema#metrics) + // for the list of metric names supported by the `runRealtimeReport` + // method. See Funnel Metrics + // (https://developers.google.com/analytics/devguides/reporting/data/v1/exploration-api-schema#metrics) + // for the list of metric names supported by the `runFunnelReport` + // method. If `expression` is specified, `name` can be any string that + // you would like within the allowed character set. For example if + // `expression` is `screenPageViews/sessions`, you could call that + // metric's name = `viewsPerSession`. Metric names that you choose must + // match the regular expression `^[a-zA-Z0-9_]$`. Metrics are referenced + // by `name` in `metricFilter`, `orderBys`, and metric `expression`. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Expression") to diff --git a/analyticshub/v1/analyticshub-api.json b/analyticshub/v1/analyticshub-api.json index 5d881273206..8ebecaf14d8 100644 --- a/analyticshub/v1/analyticshub-api.json +++ b/analyticshub/v1/analyticshub-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20230804", + "revision": "20230821", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1719,7 +1719,7 @@ "type": "object" }, "Subscription": { - "description": "A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets. TODO(b/267528977) Consider port the new resource to v1beta1 and dataexchange APIs.", + "description": "A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets.", "id": "Subscription", "properties": { "creationTime": { diff --git a/analyticshub/v1/analyticshub-gen.go b/analyticshub/v1/analyticshub-gen.go index 01554ef1cb3..287bdda0bb8 100644 --- a/analyticshub/v1/analyticshub-gen.go +++ b/analyticshub/v1/analyticshub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bigquery/docs/analytics-hub-introduction // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticshubService, err := analyticshub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticshubService, err := analyticshub.NewService(ctx, option.WithScopes(analyticshub.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticshubService, err := analyticshub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticshubService, err := analyticshub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analyticshub // import "google.golang.org/api/analyticshub/v1" import ( @@ -1705,8 +1719,6 @@ func (s *SubscribeListingResponse) MarshalJSON() ([]byte, error) { // Subscription: A subscription represents a subscribers' access to a // particular set of published data. It contains references to // associated listings, data exchanges, and linked datasets. -// TODO(b/267528977) Consider port the new resource to v1beta1 and -// dataexchange APIs. type Subscription struct { // CreationTime: Output only. Timestamp when the subscription was // created. diff --git a/analyticshub/v1beta1/analyticshub-api.json b/analyticshub/v1beta1/analyticshub-api.json index 2ae027cd85d..06f5243135e 100644 --- a/analyticshub/v1beta1/analyticshub-api.json +++ b/analyticshub/v1beta1/analyticshub-api.json @@ -695,7 +695,7 @@ } } }, - "revision": "20230804", + "revision": "20230821", "rootUrl": "https://analyticshub.googleapis.com/", "schemas": { "AuditConfig": { @@ -1279,7 +1279,7 @@ "type": "object" }, "Subscription": { - "description": "A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets. TODO(b/267528977) Consider port the new resource to v1beta1 and dataexchange APIs.", + "description": "A subscription represents a subscribers' access to a particular set of published data. It contains references to associated listings, data exchanges, and linked datasets.", "id": "Subscription", "properties": { "creationTime": { diff --git a/analyticshub/v1beta1/analyticshub-gen.go b/analyticshub/v1beta1/analyticshub-gen.go index bb7daeca575..7197f0dcc1c 100644 --- a/analyticshub/v1beta1/analyticshub-gen.go +++ b/analyticshub/v1beta1/analyticshub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bigquery/docs/analytics-hub-introduction // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticshubService, err := analyticshub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticshubService, err := analyticshub.NewService(ctx, option.WithScopes(analyticshub.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticshubService, err := analyticshub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticshubService, err := analyticshub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analyticshub // import "google.golang.org/api/analyticshub/v1beta1" import ( @@ -1387,8 +1401,6 @@ type SubscribeListingResponse struct { // Subscription: A subscription represents a subscribers' access to a // particular set of published data. It contains references to // associated listings, data exchanges, and linked datasets. -// TODO(b/267528977) Consider port the new resource to v1beta1 and -// dataexchange APIs. type Subscription struct { // CreationTime: Output only. Timestamp when the subscription was // created. diff --git a/analyticsreporting/v4/analyticsreporting-gen.go b/analyticsreporting/v4/analyticsreporting-gen.go index f48808fb0f5..e7ece131227 100644 --- a/analyticsreporting/v4/analyticsreporting-gen.go +++ b/analyticsreporting/v4/analyticsreporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/analytics/devguides/reporting/core/v4/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // analyticsreportingService, err := analyticsreporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // analyticsreportingService, err := analyticsreporting.NewService(ctx, option.WithScopes(analyticsreporting.AnalyticsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // analyticsreportingService, err := analyticsreporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // analyticsreportingService, err := analyticsreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package analyticsreporting // import "google.golang.org/api/analyticsreporting/v4" import ( diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 60573231076..bc03927bb48 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -631,6 +631,32 @@ "$ref": "Device" } }, + "getSimLockState": { + "description": "Gets a device's SIM lock state.", + "flatPath": "v1/partners/{partnersId}/devices:getSimLockState", + "httpMethod": "POST", + "id": "androiddeviceprovisioning.partners.devices.getSimLockState", + "parameterOrder": [ + "partnerId" + ], + "parameters": { + "partnerId": { + "description": "Required. The ID of the partner.", + "format": "int64", + "location": "path", + "pattern": "^[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/partners/{+partnerId}/devices:getSimLockState", + "request": { + "$ref": "GetDeviceSimLockStateRequest" + }, + "response": { + "$ref": "GetDeviceSimLockStateResponse" + } + }, "metadata": { "description": "Updates reseller metadata associated with the device. Android devices only.", "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata", @@ -825,7 +851,7 @@ } } }, - "revision": "20230515", + "revision": "20230906", "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "schemas": { "ClaimDeviceRequest": { @@ -1500,6 +1526,39 @@ }, "type": "object" }, + "GetDeviceSimLockStateRequest": { + "description": "Request to get a device's SIM lock status.", + "id": "GetDeviceSimLockStateRequest", + "properties": { + "deviceIdentifier": { + "$ref": "DeviceIdentifier", + "description": "Required. Required. The device identifier to search for." + } + }, + "type": "object" + }, + "GetDeviceSimLockStateResponse": { + "description": "Response containing a device's SimLock state.", + "id": "GetDeviceSimLockStateResponse", + "properties": { + "simLockState": { + "enum": [ + "SIM_LOCK_STATE_UNSPECIFIED", + "UNLOCKED", + "LOCKED_TO_PARTNER", + "LOCKED_TO_OTHER_PARTNER" + ], + "enumDescriptions": [ + "Invalid code. Shouldn't be used.", + "Device is not SIM locked.", + "Device is SIM locked to the partner querying SIM lock state.", + "Device is SIM locked to a different partner." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleWorkspaceAccount": { "description": "A Google Workspace customer.", "id": "GoogleWorkspaceAccount", diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index f16ba632c38..990f836a89b 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/zero-touch/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // androiddeviceprovisioningService, err := androiddeviceprovisioning.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package androiddeviceprovisioning // import "google.golang.org/api/androiddeviceprovisioning/v1" import ( @@ -1401,6 +1414,76 @@ func (s *FindDevicesByOwnerResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GetDeviceSimLockStateRequest: Request to get a device's SIM lock +// status. +type GetDeviceSimLockStateRequest struct { + // DeviceIdentifier: Required. Required. The device identifier to search + // for. + DeviceIdentifier *DeviceIdentifier `json:"deviceIdentifier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceIdentifier") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceIdentifier") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetDeviceSimLockStateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GetDeviceSimLockStateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetDeviceSimLockStateResponse: Response containing a device's SimLock +// state. +type GetDeviceSimLockStateResponse struct { + // Possible values: + // "SIM_LOCK_STATE_UNSPECIFIED" - Invalid code. Shouldn't be used. + // "UNLOCKED" - Device is not SIM locked. + // "LOCKED_TO_PARTNER" - Device is SIM locked to the partner querying + // SIM lock state. + // "LOCKED_TO_OTHER_PARTNER" - Device is SIM locked to a different + // partner. + SimLockState string `json:"simLockState,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SimLockState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SimLockState") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GetDeviceSimLockStateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetDeviceSimLockStateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleWorkspaceAccount: A Google Workspace customer. type GoogleWorkspaceAccount struct { // CustomerId: Required. The customer ID. @@ -5074,6 +5157,146 @@ func (c *PartnersDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, erro } +// method id "androiddeviceprovisioning.partners.devices.getSimLockState": + +type PartnersDevicesGetSimLockStateCall struct { + s *Service + partnerId int64 + getdevicesimlockstaterequest *GetDeviceSimLockStateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetSimLockState: Gets a device's SIM lock state. +// +// - partnerId: The ID of the partner. +func (r *PartnersDevicesService) GetSimLockState(partnerId int64, getdevicesimlockstaterequest *GetDeviceSimLockStateRequest) *PartnersDevicesGetSimLockStateCall { + c := &PartnersDevicesGetSimLockStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.partnerId = partnerId + c.getdevicesimlockstaterequest = getdevicesimlockstaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *PartnersDevicesGetSimLockStateCall) Fields(s ...googleapi.Field) *PartnersDevicesGetSimLockStateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *PartnersDevicesGetSimLockStateCall) Context(ctx context.Context) *PartnersDevicesGetSimLockStateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *PartnersDevicesGetSimLockStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PartnersDevicesGetSimLockStateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getdevicesimlockstaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/devices:getSimLockState") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "partnerId": strconv.FormatInt(c.partnerId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "androiddeviceprovisioning.partners.devices.getSimLockState" call. +// Exactly one of *GetDeviceSimLockStateResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GetDeviceSimLockStateResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *PartnersDevicesGetSimLockStateCall) Do(opts ...googleapi.CallOption) (*GetDeviceSimLockStateResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GetDeviceSimLockStateResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a device's SIM lock state.", + // "flatPath": "v1/partners/{partnersId}/devices:getSimLockState", + // "httpMethod": "POST", + // "id": "androiddeviceprovisioning.partners.devices.getSimLockState", + // "parameterOrder": [ + // "partnerId" + // ], + // "parameters": { + // "partnerId": { + // "description": "Required. The ID of the partner.", + // "format": "int64", + // "location": "path", + // "pattern": "^[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/partners/{+partnerId}/devices:getSimLockState", + // "request": { + // "$ref": "GetDeviceSimLockStateRequest" + // }, + // "response": { + // "$ref": "GetDeviceSimLockStateResponse" + // } + // } + +} + // method id "androiddeviceprovisioning.partners.devices.metadata": type PartnersDevicesMetadataCall struct { diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go index c46d7aa0c4a..5541f45012d 100644 --- a/androidenterprise/v1/androidenterprise-gen.go +++ b/androidenterprise/v1/androidenterprise-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/android/work/play/emm-api // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // androidenterpriseService, err := androidenterprise.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // androidenterpriseService, err := androidenterprise.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // androidenterpriseService, err := androidenterprise.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package androidenterprise // import "google.golang.org/api/androidenterprise/v1" import ( diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 835bd8c0ed1..da8c62cceaa 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20230807", + "revision": "20230828", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1534,7 +1534,7 @@ "type": "object" }, "ApplicationPolicy": { - "description": "Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled.", + "description": "Policy for an individual app. Note: Application availability on a given device cannot be changed using this policy if installAppsDisabled is enabled. The maximum number of applications that you can specify per enterprise policy is 3,000.", "id": "ApplicationPolicy", "properties": { "accessibleTrackIds": { @@ -1605,7 +1605,7 @@ "type": "string" }, "delegatedScopes": { - "description": "The scopes delegated to the app from Android Device Policy.", + "description": "The scopes delegated to the app from Android Device Policy. These provide additional privileges for the applications they are applied to.", "items": { "enum": [ "DELEGATED_SCOPE_UNSPECIFIED", @@ -1616,7 +1616,8 @@ "PACKAGE_ACCESS", "ENABLE_SYSTEM_APP", "NETWORK_ACTIVITY_LOGS", - "SECURITY_LOGS" + "SECURITY_LOGS", + "CERT_SELECTION" ], "enumDescriptions": [ "No delegation scope specified.", @@ -1627,7 +1628,8 @@ "Grants access to package access state.", "Grants access for enabling system apps.", "Grants access to network activity logs. Allows the delegated application to call setNetworkLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setNetworkLoggingEnabled%28android.content.ComponentName,%20boolean%29), isNetworkLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isNetworkLoggingEnabled%28android.content.ComponentName%29) and retrieveNetworkLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveNetworkLogs%28android.content.ComponentName,%20long%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices on Android 10 and above. Supported for a work profile on Android 12 and above. When delegation is supported and set, NETWORK_ACTIVITY_LOGS is ignored.", - "Grants access to security logs. Allows the delegated application to call setSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSecurityLoggingEnabled%28android.content.ComponentName,%20boolean%29), isSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isSecurityLoggingEnabled%28android.content.ComponentName%29), retrieveSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveSecurityLogs%28android.content.ComponentName%29) and retrievePreRebootSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrievePreRebootSecurityLogs%28android.content.ComponentName%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices and company-owned devices with a work profile on Android 12 and above. When delegation is supported and set, SECURITY_LOGS is ignored." + "Grants access to security logs. Allows the delegated application to call setSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSecurityLoggingEnabled%28android.content.ComponentName,%20boolean%29), isSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isSecurityLoggingEnabled%28android.content.ComponentName%29), retrieveSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveSecurityLogs%28android.content.ComponentName%29) and retrievePreRebootSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrievePreRebootSecurityLogs%28android.content.ComponentName%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices and company-owned devices with a work profile on Android 12 and above. When delegation is supported and set, SECURITY_LOGS is ignored.", + "Grants access to selection of KeyChain certificates on behalf of requesting apps. Once granted, the delegated application will start receiving DelegatedAdminReceiver#onChoosePrivateKeyAlias (https://developer.android.com/reference/android/app/admin/DelegatedAdminReceiver#onChoosePrivateKeyAlias%28android.content.Context,%20android.content.Intent,%20int,%20android.net.Uri,%20java.lang.String%29). Allows the delegated application to call grantKeyPairToApp (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#grantKeyPairToApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) and revokeKeyPairFromApp (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#revokeKeyPairFromApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) methods. There can be at most one app that has this delegation. choosePrivateKeyRules must be empty and privateKeySelectionEnabled has no effect if certificate selection is delegated to an application." ], "type": "string" }, @@ -1656,7 +1658,7 @@ "Unspecified. Defaults to AVAILABLE.", "The app is automatically installed and can be removed by the user.", "The app is automatically installed and can't be removed by the user.", - "The app is blocked and can't be installed. If the app was installed under a previous policy, it will be uninstalled.", + "The app is blocked and can't be installed. If the app was installed under a previous policy, it will be uninstalled. This also blocks its instant app functionality.", "The app is available to install.", "The app is automatically installed and can't be removed by the user and will prevent setup from completion until installation is complete.", "The app is automatically installed in kiosk mode: it's set as the preferred home intent and whitelisted for lock task mode. Device setup won't complete until the app is installed. After installation, users won't be able to remove the app. You can only set this installType for one app per policy. When this is present in the policy, status bar will be automatically disabled." @@ -2620,14 +2622,14 @@ "id": "DeviceRadioState", "properties": { "airplaneModeState": { - "description": "Controls whether airplane mode can be toggled by the user or not", + "description": "Controls whether airplane mode can be toggled by the user or not.", "enum": [ "AIRPLANE_MODE_STATE_UNSPECIFIED", "AIRPLANE_MODE_USER_CHOICE", "AIRPLANE_MODE_DISABLED" ], "enumDescriptions": [ - "Unspecified. Defaults to AIRPLANE_MODE_USER_CHOICE", + "Unspecified. Defaults to AIRPLANE_MODE_USER_CHOICE.", "The user is allowed to toggle airplane mode on or off.", "Airplane mode is disabled. The user is not allowed to toggle airplane mode on. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 9." ], @@ -4510,7 +4512,7 @@ "type": "boolean" }, "choosePrivateKeyRules": { - "description": "Rules for determining apps' access to private keys. See ChoosePrivateKeyRule for details.", + "description": "Rules for determining apps' access to private keys. See ChoosePrivateKeyRule for details. This must be empty if any application has CERT_SELECTION delegation scope.", "items": { "$ref": "ChoosePrivateKeyRule" }, @@ -4846,7 +4848,7 @@ "type": "string" }, "privateKeySelectionEnabled": { - "description": "Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable.", + "description": "Allows showing UI on a device for a user to choose a private key alias if there are no matching rules in ChoosePrivateKeyRules. For devices below Android P, setting this may leave enterprise keys vulnerable. This value will have no effect if any application has CERT_SELECTION delegation scope.", "type": "boolean" }, "recommendedGlobalProxy": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index b6881cb738c..e43e0826a5a 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/android/management // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // androidmanagementService, err := androidmanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // androidmanagementService, err := androidmanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // androidmanagementService, err := androidmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package androidmanagement // import "google.golang.org/api/androidmanagement/v1" import ( @@ -826,7 +839,8 @@ func (s *ApplicationPermission) MarshalJSON() ([]byte, error) { // ApplicationPolicy: Policy for an individual app. Note: Application // availability on a given device cannot be changed using this policy if -// installAppsDisabled is enabled. +// installAppsDisabled is enabled. The maximum number of applications +// that you can specify per enterprise policy is 3,000. type ApplicationPolicy struct { // AccessibleTrackIds: List of the app’s track IDs that a device // belonging to the enterprise can access. If the list contains multiple @@ -911,7 +925,8 @@ type ApplicationPolicy struct { DefaultPermissionPolicy string `json:"defaultPermissionPolicy,omitempty"` // DelegatedScopes: The scopes delegated to the app from Android Device - // Policy. + // Policy. These provide additional privileges for the applications they + // are applied to. // // Possible values: // "DELEGATED_SCOPE_UNSPECIFIED" - No delegation scope specified. @@ -948,6 +963,19 @@ type ApplicationPolicy struct { // Supported for fully managed devices and company-owned devices with a // work profile on Android 12 and above. When delegation is supported // and set, SECURITY_LOGS is ignored. + // "CERT_SELECTION" - Grants access to selection of KeyChain + // certificates on behalf of requesting apps. Once granted, the + // delegated application will start receiving + // DelegatedAdminReceiver#onChoosePrivateKeyAlias + // (https://developer.android.com/reference/android/app/admin/DelegatedAdminReceiver#onChoosePrivateKeyAlias%28android.content.Context,%20android.content.Intent,%20int,%20android.net.Uri,%20java.lang.String%29). + // Allows the delegated application to call grantKeyPairToApp + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#grantKeyPairToApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) + // and revokeKeyPairFromApp + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#revokeKeyPairFromApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) + // methods. There can be at most one app that has this delegation. + // choosePrivateKeyRules must be empty and privateKeySelectionEnabled + // has no effect if certificate selection is delegated to an + // application. DelegatedScopes []string `json:"delegatedScopes,omitempty"` // Disabled: Whether the app is disabled. When disabled, the app data is @@ -968,7 +996,8 @@ type ApplicationPolicy struct { // "FORCE_INSTALLED" - The app is automatically installed and can't be // removed by the user. // "BLOCKED" - The app is blocked and can't be installed. If the app - // was installed under a previous policy, it will be uninstalled. + // was installed under a previous policy, it will be uninstalled. This + // also blocks its instant app functionality. // "AVAILABLE" - The app is available to install. // "REQUIRED_FOR_SETUP" - The app is automatically installed and can't // be removed by the user and will prevent setup from completion until @@ -2365,11 +2394,11 @@ func (s *DeviceConnectivityManagement) MarshalJSON() ([]byte, error) { // DeviceRadioState: Controls for device radio settings. type DeviceRadioState struct { // AirplaneModeState: Controls whether airplane mode can be toggled by - // the user or not + // the user or not. // // Possible values: // "AIRPLANE_MODE_STATE_UNSPECIFIED" - Unspecified. Defaults to - // AIRPLANE_MODE_USER_CHOICE + // AIRPLANE_MODE_USER_CHOICE. // "AIRPLANE_MODE_USER_CHOICE" - The user is allowed to toggle // airplane mode on or off. // "AIRPLANE_MODE_DISABLED" - Airplane mode is disabled. The user is @@ -5258,7 +5287,8 @@ type Policy struct { CellBroadcastsConfigDisabled bool `json:"cellBroadcastsConfigDisabled,omitempty"` // ChoosePrivateKeyRules: Rules for determining apps' access to private - // keys. See ChoosePrivateKeyRule for details. + // keys. See ChoosePrivateKeyRule for details. This must be empty if any + // application has CERT_SELECTION delegation scope. ChoosePrivateKeyRules []*ChoosePrivateKeyRule `json:"choosePrivateKeyRules,omitempty"` // ComplianceRules: Rules declaring which mitigating actions to take @@ -5570,7 +5600,8 @@ type Policy struct { // PrivateKeySelectionEnabled: Allows showing UI on a device for a user // to choose a private key alias if there are no matching rules in // ChoosePrivateKeyRules. For devices below Android P, setting this may - // leave enterprise keys vulnerable. + // leave enterprise keys vulnerable. This value will have no effect if + // any application has CERT_SELECTION delegation scope. PrivateKeySelectionEnabled bool `json:"privateKeySelectionEnabled,omitempty"` // RecommendedGlobalProxy: The network-independent global HTTP proxy. diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 70495714038..bf9fe11d38e 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -4047,7 +4047,7 @@ } } }, - "revision": "20230815", + "revision": "20230907", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -6865,12 +6865,14 @@ "enum": [ "PRICE_CHANGE_MODE_UNSPECIFIED", "PRICE_DECREASE", - "PRICE_INCREASE" + "PRICE_INCREASE", + "OPT_OUT_PRICE_INCREASE" ], "enumDescriptions": [ "Price change mode unspecified. This value should never be set.", "If the subscription price is decreasing.", - "If the subscription price is increasing and the user needs to accept it." + "If the subscription price is increasing and the user needs to accept it.", + "If the subscription price is increasing with opt out mode." ], "type": "string" }, @@ -7370,6 +7372,25 @@ }, "type": "object" }, + "SystemApkOptions": { + "description": "Options for system APKs.", + "id": "SystemApkOptions", + "properties": { + "rotated": { + "description": "Whether to use the rotated key for signing the system APK.", + "type": "boolean" + }, + "uncompressedDexFiles": { + "description": "Whether system APK was generated with uncompressed dex files.", + "type": "boolean" + }, + "uncompressedNativeLibraries": { + "description": "Whether system APK was generated with uncompressed native libraries.", + "type": "boolean" + } + }, + "type": "object" + }, "SystemApksListResponse": { "description": "Response to list previously created system APK variants.", "id": "SystemApksListResponse", @@ -7927,6 +7948,10 @@ "$ref": "DeviceSpec", "description": "The device spec used to generate the APK." }, + "options": { + "$ref": "SystemApkOptions", + "description": "Optional. Options applied to the generated APK." + }, "variantId": { "description": "Output only. The ID of a previously created system APK variant.", "format": "uint32", diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index a2e5dcfb677..b0fdc502554 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/android-publisher // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // androidpublisherService, err := androidpublisher.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // androidpublisherService, err := androidpublisher.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // androidpublisherService, err := androidpublisher.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package androidpublisher // import "google.golang.org/api/androidpublisher/v3" import ( @@ -5458,6 +5471,8 @@ type SubscriptionItemPriceChangeDetails struct { // "PRICE_DECREASE" - If the subscription price is decreasing. // "PRICE_INCREASE" - If the subscription price is increasing and the // user needs to accept it. + // "OPT_OUT_PRICE_INCREASE" - If the subscription price is increasing + // with opt out mode. PriceChangeMode string `json:"priceChangeMode,omitempty"` // PriceChangeState: State the price change is currently in. @@ -6253,6 +6268,42 @@ func (s *SubscriptionTaxAndComplianceSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SystemApkOptions: Options for system APKs. +type SystemApkOptions struct { + // Rotated: Whether to use the rotated key for signing the system APK. + Rotated bool `json:"rotated,omitempty"` + + // UncompressedDexFiles: Whether system APK was generated with + // uncompressed dex files. + UncompressedDexFiles bool `json:"uncompressedDexFiles,omitempty"` + + // UncompressedNativeLibraries: Whether system APK was generated with + // uncompressed native libraries. + UncompressedNativeLibraries bool `json:"uncompressedNativeLibraries,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Rotated") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Rotated") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SystemApkOptions) MarshalJSON() ([]byte, error) { + type NoMethod SystemApkOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SystemApksListResponse: Response to list previously created system // APK variants. type SystemApksListResponse struct { @@ -7172,6 +7223,9 @@ type Variant struct { // DeviceSpec: The device spec used to generate the APK. DeviceSpec *DeviceSpec `json:"deviceSpec,omitempty"` + // Options: Optional. Options applied to the generated APK. + Options *SystemApkOptions `json:"options,omitempty"` + // VariantId: Output only. The ID of a previously created system APK // variant. VariantId int64 `json:"variantId,omitempty"` diff --git a/api-list.json b/api-list.json index e766b5b273c..46ad894541c 100644 --- a/api-list.json +++ b/api-list.json @@ -1199,6 +1199,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/cloud-build/docs/", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "cloudbuild:v2", + "name": "cloudbuild", + "version": "v2", + "title": "Cloud Build API", + "description": "Creates and manages builds on Google Cloud Platform.", + "discoveryRestUrl": "https://cloudbuild.googleapis.com/$discovery/rest?version=v2", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/cloud-build/docs/", "preferred": true }, { @@ -4417,6 +4432,21 @@ "documentationLink": "https://developers.google.com/play/developer/reporting", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "playgrouping:v1alpha1", + "name": "playgrouping", + "version": "v1alpha1", + "title": "Google Play Grouping API", + "description": "playgrouping.googleapis.com API.", + "discoveryRestUrl": "https://playgrouping.googleapis.com/$discovery/rest?version=v1alpha1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/playgrouping/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "playintegrity:v1", @@ -6170,6 +6200,21 @@ "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, "documentationLink": "https://cloud.google.com/workstations", + "preferred": false + }, + { + "kind": "discovery#directoryItem", + "id": "workstations:v1", + "name": "workstations", + "version": "v1", + "title": "Cloud Workstations API", + "description": "Allows administrators to create managed developer environments in the cloud.", + "discoveryRestUrl": "https://workstations.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/workstations", "preferred": true }, { diff --git a/apigateway/v1/apigateway-gen.go b/apigateway/v1/apigateway-gen.go index 8a082d079ce..96ce6500ca4 100644 --- a/apigateway/v1/apigateway-gen.go +++ b/apigateway/v1/apigateway-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/api-gateway/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // apigatewayService, err := apigateway.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // apigatewayService, err := apigateway.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // apigatewayService, err := apigateway.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package apigateway // import "google.golang.org/api/apigateway/v1" import ( diff --git a/apigateway/v1beta/apigateway-gen.go b/apigateway/v1beta/apigateway-gen.go index b6f41dc8407..e17b596c643 100644 --- a/apigateway/v1beta/apigateway-gen.go +++ b/apigateway/v1beta/apigateway-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/api-gateway/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // apigatewayService, err := apigateway.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // apigatewayService, err := apigateway.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // apigatewayService, err := apigateway.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package apigateway // import "google.golang.org/api/apigateway/v1beta" import ( diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 401b4e35096..ddb1fed44ca 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/apigee-api-management/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // apigeeService, err := apigee.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // apigeeService, err := apigee.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // apigeeService, err := apigee.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package apigee // import "google.golang.org/api/apigee/v1" import ( diff --git a/apikeys/v2/apikeys-gen.go b/apikeys/v2/apikeys-gen.go index 122b3b708bb..b757660d6ec 100644 --- a/apikeys/v2/apikeys-gen.go +++ b/apikeys/v2/apikeys-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/api-keys/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // apikeysService, err := apikeys.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // apikeysService, err := apikeys.NewService(ctx, option.WithScopes(apikeys.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // apikeysService, err := apikeys.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // apikeysService, err := apikeys.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package apikeys // import "google.golang.org/api/apikeys/v2" import ( diff --git a/appengine/v1/appengine-gen.go b/appengine/v1/appengine-gen.go index 5a8321f180e..69be168a693 100644 --- a/appengine/v1/appengine-gen.go +++ b/appengine/v1/appengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // appengineService, err := appengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package appengine // import "google.golang.org/api/appengine/v1" import ( diff --git a/appengine/v1alpha/appengine-gen.go b/appengine/v1alpha/appengine-gen.go index f4cee10bc03..fa6e43320c2 100644 --- a/appengine/v1alpha/appengine-gen.go +++ b/appengine/v1alpha/appengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // appengineService, err := appengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package appengine // import "google.golang.org/api/appengine/v1alpha" import ( diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go index 1a069e6885c..c41d71a074c 100644 --- a/appengine/v1beta/appengine-gen.go +++ b/appengine/v1beta/appengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // appengineService, err := appengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package appengine // import "google.golang.org/api/appengine/v1beta" import ( diff --git a/area120tables/v1alpha1/area120tables-gen.go b/area120tables/v1alpha1/area120tables-gen.go index ba254621cd6..4c0775c9545 100644 --- a/area120tables/v1alpha1/area120tables-gen.go +++ b/area120tables/v1alpha1/area120tables-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://support.google.com/area120-tables/answer/10011390 // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // area120tablesService, err := area120tables.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // area120tablesService, err := area120tables.NewService(ctx, option.WithScopes(area120tables.TablesScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // area120tablesService, err := area120tables.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // area120tablesService, err := area120tables.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package area120tables // import "google.golang.org/api/area120tables/v1alpha1" import ( diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index 2c3606a6288..16374b51fca 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/artifacts/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // artifactregistryService, err := artifactregistry.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithScopes(artifactregistry.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package artifactregistry // import "google.golang.org/api/artifactregistry/v1" import ( diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 4a9381d7dc7..53f71397066 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/artifacts/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // artifactregistryService, err := artifactregistry.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithScopes(artifactregistry.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package artifactregistry // import "google.golang.org/api/artifactregistry/v1beta1" import ( diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index d7253f23eef..460a95c5916 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/artifacts/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // artifactregistryService, err := artifactregistry.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithScopes(artifactregistry.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // artifactregistryService, err := artifactregistry.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package artifactregistry // import "google.golang.org/api/artifactregistry/v1beta2" import ( diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index a04dd09747b..8f2e62ec759 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -519,7 +519,7 @@ } } }, - "revision": "20230811", + "revision": "20230831", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -567,7 +567,8 @@ "ISR_REGIONS", "ISR_REGIONS_AND_SUPPORT", "CA_PROTECTED_B", - "IL5" + "IL5", + "JP_REGIONS_AND_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -586,7 +587,8 @@ "Assured Workloads for Israel", "Assured Workloads for Israel Regions", "Assured Workloads for Canada Protected B regime", - "Information protection as per DoD IL5 requirements." + "Information protection as per DoD IL5 requirements.", + "Assured Workloads for Japan Regions" ], "type": "string" }, @@ -833,16 +835,14 @@ "REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION", "REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION", "REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION", - "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION", - "REMEDIATION_RESOURCE_VIOLATION" + "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" ], "enumDescriptions": [ "Unspecified remediation type", "Remediation type for boolean org policy", "Remediation type for list org policy which have allowed values in the monitoring rule", "Remediation type for list org policy which have denied values in the monitoring rule", - "Remediation type for gcp.restrictCmekCryptoKeyProjects", - "Remediation type for resource violation." + "Remediation type for gcp.restrictCmekCryptoKeyProjects" ], "readOnly": true, "type": "string" @@ -948,7 +948,8 @@ "ISR_REGIONS", "ISR_REGIONS_AND_SUPPORT", "CA_PROTECTED_B", - "IL5" + "IL5", + "JP_REGIONS_AND_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -967,7 +968,8 @@ "Assured Workloads for Israel", "Assured Workloads for Israel Regions", "Assured Workloads for Canada Protected B regime", - "Information protection as per DoD IL5 requirements." + "Information protection as per DoD IL5 requirements.", + "Assured Workloads for Japan Regions" ], "type": "string" }, diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 974efafa134..c931a915566 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/learnmoreurl // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // assuredworkloadsService, err := assuredworkloads.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // assuredworkloadsService, err := assuredworkloads.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // assuredworkloadsService, err := assuredworkloads.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package assuredworkloads // import "google.golang.org/api/assuredworkloads/v1" import ( @@ -272,6 +285,7 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // "ISR_REGIONS_AND_SUPPORT" - Assured Workloads for Israel Regions // "CA_PROTECTED_B" - Assured Workloads for Canada Protected B regime // "IL5" - Information protection as per DoD IL5 requirements. + // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. @@ -643,8 +657,6 @@ type GoogleCloudAssuredworkloadsV1ViolationRemediation struct { // // "REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION" // - Remediation type for gcp.restrictCmekCryptoKeyProjects - // "REMEDIATION_RESOURCE_VIOLATION" - Remediation type for resource - // violation. RemediationType string `json:"remediationType,omitempty"` // ForceSendFields is a list of field names (e.g. "CompliantValues") to @@ -818,6 +830,7 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "ISR_REGIONS_AND_SUPPORT" - Assured Workloads for Israel Regions // "CA_PROTECTED_B" - Assured Workloads for Canada Protected B regime // "IL5" - Information protection as per DoD IL5 requirements. + // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 929a1fe03bc..369cf1f8cd5 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -182,7 +182,7 @@ "workloads": { "methods": { "analyzeWorkloadMove": { - "description": "Analyzes a hypothetical move of a source resource to a target(destination) folder-based workload to surface compliance risks.", + "description": "Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.", "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", "httpMethod": "GET", "id": "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove", @@ -190,10 +190,11 @@ "target" ], "parameters": { - "analyzeChildAssets": { - "description": "Optional. Indicates if all child assets of the source resource should also be analyzed in addition to the source.", + "assetTypes": { + "description": "Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).", "location": "query", - "type": "boolean" + "repeated": true, + "type": "string" }, "pageSize": { "description": "Optional. Page size. If a value is not specified, the default value of 10 is used.", @@ -211,12 +212,6 @@ "location": "query", "type": "string" }, - "source": { - "deprecated": true, - "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\" This option is now deprecated.", - "location": "query", - "type": "string" - }, "target": { "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", "location": "path", @@ -568,7 +563,7 @@ } } }, - "revision": "20230811", + "revision": "20230831", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -618,14 +613,6 @@ }, "type": "array" }, - "blockers": { - "deprecated": true, - "description": "A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload. This field is now deprecated.", - "items": { - "type": "string" - }, - "type": "array" - }, "nextPageToken": { "description": "The next page token. Is empty if the last page is reached.", "type": "string" @@ -678,7 +665,8 @@ "ISR_REGIONS", "ISR_REGIONS_AND_SUPPORT", "CA_PROTECTED_B", - "IL5" + "IL5", + "JP_REGIONS_AND_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -697,7 +685,8 @@ "Assured Workloads for Israel", "Assured Workloads for Israel Regions", "Assured Workloads for Canada Protected B regime", - "Information protection as per DoD IL5 requirements." + "Information protection as per DoD IL5 requirements.", + "Assured Workloads for Japan Regions" ], "type": "string" }, @@ -1143,7 +1132,8 @@ "ISR_REGIONS", "ISR_REGIONS_AND_SUPPORT", "CA_PROTECTED_B", - "IL5" + "IL5", + "JP_REGIONS_AND_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1162,7 +1152,8 @@ "Assured Workloads for Israel", "Assured Workloads for Israel Regions", "Assured Workloads for Canada Protected B regime", - "Information protection as per DoD IL5 requirements." + "Information protection as per DoD IL5 requirements.", + "Assured Workloads for Japan Regions" ], "type": "string" }, diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index 84eca94cd5e..eceacd76405 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/learnmoreurl // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // assuredworkloadsService, err := assuredworkloads.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // assuredworkloadsService, err := assuredworkloads.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // assuredworkloadsService, err := assuredworkloads.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package assuredworkloads // import "google.golang.org/api/assuredworkloads/v1beta1" import ( @@ -258,11 +271,6 @@ type GoogleCloudAssuredworkloadsV1beta1AnalyzeWorkloadMoveResponse struct { // AssetMoveAnalyses: List of analysis results for each asset in scope. AssetMoveAnalyses []*GoogleCloudAssuredworkloadsV1beta1AssetMoveAnalysis `json:"assetMoveAnalyses,omitempty"` - // Blockers: A list of blockers that should be addressed before moving - // the source project or project-based workload to the destination - // folder-based workload. This field is now deprecated. - Blockers []string `json:"blockers,omitempty"` - // NextPageToken: The next page token. Is empty if the last page is // reached. NextPageToken string `json:"nextPageToken,omitempty"` @@ -366,6 +374,7 @@ type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { // "ISR_REGIONS_AND_SUPPORT" - Assured Workloads for Israel Regions // "CA_PROTECTED_B" - Assured Workloads for Canada Protected B regime // "IL5" - Information protection as per DoD IL5 requirements. + // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. @@ -1019,6 +1028,7 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // "ISR_REGIONS_AND_SUPPORT" - Assured Workloads for Israel Regions // "CA_PROTECTED_B" - Assured Workloads for Canada Protected B regime // "IL5" - Information protection as per DoD IL5 requirements. + // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the @@ -2152,8 +2162,8 @@ type OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall struct { } // AnalyzeWorkloadMove: Analyzes a hypothetical move of a source -// resource to a target(destination) folder-based workload to surface -// compliance risks. +// resource to a target workload to surface compliance risks. The +// analysis is best effort and is not guaranteed to be exhaustive. // // - target: The resource ID of the folder-based destination workload. // This workload is where the source resource will hypothetically be @@ -2168,11 +2178,13 @@ func (r *OrganizationsLocationsWorkloadsService) AnalyzeWorkloadMove(target stri return c } -// AnalyzeChildAssets sets the optional parameter "analyzeChildAssets": -// Indicates if all child assets of the source resource should also be -// analyzed in addition to the source. -func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) AnalyzeChildAssets(analyzeChildAssets bool) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { - c.urlParams_.Set("analyzeChildAssets", fmt.Sprint(analyzeChildAssets)) +// AssetTypes sets the optional parameter "assetTypes": List of asset +// types to be analyzed, including and under the source resource. If +// empty, all assets are analyzed. The complete list of asset types is +// available here +// (https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). +func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) AssetTypes(assetTypes ...string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { + c.urlParams_.SetMulti("assetTypes", append([]string{}, assetTypes...)) return c } @@ -2202,18 +2214,6 @@ func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Project(project return c } -// Source sets the optional parameter "source": The source type is a -// project-based workload. Specify the workloads's relative resource -// name, formatted as: -// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WO -// RKLOAD_ID}" For example: -// "organizations/123/locations/us-east1/workloads/assured-workload-1" -// This option is now deprecated. -func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Source(source string) *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall { - c.urlParams_.Set("source", source) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -2316,7 +2316,7 @@ func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...goog } return ret, nil // { - // "description": "Analyzes a hypothetical move of a source resource to a target(destination) folder-based workload to surface compliance risks.", + // "description": "Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.", // "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", // "httpMethod": "GET", // "id": "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove", @@ -2324,10 +2324,11 @@ func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...goog // "target" // ], // "parameters": { - // "analyzeChildAssets": { - // "description": "Optional. Indicates if all child assets of the source resource should also be analyzed in addition to the source.", + // "assetTypes": { + // "description": "Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).", // "location": "query", - // "type": "boolean" + // "repeated": true, + // "type": "string" // }, // "pageSize": { // "description": "Optional. Page size. If a value is not specified, the default value of 10 is used.", @@ -2345,12 +2346,6 @@ func (c *OrganizationsLocationsWorkloadsAnalyzeWorkloadMoveCall) Do(opts ...goog // "location": "query", // "type": "string" // }, - // "source": { - // "deprecated": true, - // "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\" This option is now deprecated.", - // "location": "query", - // "type": "string" - // }, // "target": { // "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", // "location": "path", diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json index 36633f8423e..768bdeec9dc 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-api.json @@ -1307,7 +1307,7 @@ } } }, - "revision": "20230724", + "revision": "20230907", "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", "schemas": { "AcceptProposalRequest": { @@ -2042,7 +2042,7 @@ "type": "string" }, "name": { - "description": "The resource name of the finalized deal. Format: `buyers/{accountId}/finalizeddeals/{finalizedDealId}`", + "description": "The resource name of the finalized deal. Format: `buyers/{accountId}/finalizedDeals/{finalizedDealId}`", "type": "string" }, "readyToServe": { diff --git a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go index 23d3a0e1dbf..26acb613a8f 100644 --- a/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go +++ b/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package authorizedbuyersmarketplace // import "google.golang.org/api/authorizedbuyersmarketplace/v1" import ( @@ -1235,7 +1248,7 @@ type FinalizedDeal struct { DealServingStatus string `json:"dealServingStatus,omitempty"` // Name: The resource name of the finalized deal. Format: - // `buyers/{accountId}/finalizeddeals/{finalizedDealId}` + // `buyers/{accountId}/finalizedDeals/{finalizedDealId}` Name string `json:"name,omitempty"` // ReadyToServe: Whether the Programmatic Guaranteed deal is ready for diff --git a/baremetalsolution/v2/baremetalsolution-api.json b/baremetalsolution/v2/baremetalsolution-api.json index e75999014e0..3847298b70e 100644 --- a/baremetalsolution/v2/baremetalsolution-api.json +++ b/baremetalsolution/v2/baremetalsolution-api.json @@ -1588,7 +1588,7 @@ } } }, - "revision": "20230807", + "revision": "20230831", "rootUrl": "https://baremetalsolution.googleapis.com/", "schemas": { "AllowedClient": { @@ -1832,7 +1832,7 @@ "type": "string" }, "pod": { - "description": "Immutable. Pod name. Pod is an independent part of infrastructure. Instance can be connected to the assets (networks, volumes) allocated in the same pod only.", + "description": "Immutable. Pod name. Pod is an independent part of infrastructure. Instance can only be connected to the assets (networks, volumes) allocated in the same pod.", "type": "string" }, "state": { @@ -1908,6 +1908,7 @@ "type": "boolean" }, "id": { + "deprecated": true, "description": "A transient unique identifier to idenfity an instance within an ProvisioningConfig request.", "type": "string" }, @@ -1923,8 +1924,7 @@ "type": "array" }, "name": { - "description": "Output only. The name of the instance config.", - "readOnly": true, + "description": "The name of the instance config.", "type": "string" }, "networkConfig": { @@ -1955,7 +1955,7 @@ "description": "Private network address, if any. Filled if InstanceConfig.multivlan_config is false." }, "sshKeyNames": { - "description": "List of names of ssh keys used to provision the instance.", + "description": "Optional. List of names of ssh keys used to provision the instance.", "items": { "type": "string" }, @@ -2486,8 +2486,7 @@ "type": "string" }, "pod": { - "description": "Output only. Pod name.", - "readOnly": true, + "description": "Immutable. Pod name. Pod is an independent part of infrastructure. Network can only be connected to the assets (instances, nfsshares) allocated in the same pod.", "type": "string" }, "reservations": { @@ -2793,6 +2792,10 @@ "readOnly": true, "type": "string" }, + "pod": { + "description": "Immutable. Pod name. Pod is an independent part of infrastructure. NFSShare can only be connected to the assets (networks, instances) allocated in the same pod.", + "type": "string" + }, "requestedSizeGib": { "description": "The requested size, in GiB.", "format": "int64", @@ -2953,6 +2956,10 @@ }, "type": "array" }, + "pod": { + "description": "Optional. Pod name. Pod is an independent part of infrastructure. Instance can be connected to the assets (networks, volumes, nfsshares) allocated in the same pod only.", + "type": "string" + }, "state": { "description": "Output only. State of ProvisioningConfig.", "enum": [ @@ -3460,7 +3467,7 @@ "type": "string" }, "pod": { - "description": "Immutable. Pod name.", + "description": "Immutable. Pod name. Pod is an independent part of infrastructure. Volume can only be connected to the instances allocated in the same pod.", "type": "string" }, "protocol": { @@ -3512,10 +3519,6 @@ "$ref": "SnapshotReservationDetail", "description": "Details about snapshot space reservation and usage on the storage volume." }, - "snapshotSchedulePolicy": { - "description": "The name of the snapshot schedule policy in use for this volume, if any.", - "type": "string" - }, "state": { "description": "The state of this storage volume.", "enum": [ @@ -3536,10 +3539,6 @@ ], "type": "string" }, - "storageAggregatePool": { - "description": "Input only. Name of the storage aggregate pool to allocate the volume in. Can be used only for VOLUME_PERFORMANCE_TIER_ASSIGNED volumes.", - "type": "string" - }, "storageType": { "description": "The storage type for this volume.", "enum": [ @@ -3648,10 +3647,6 @@ "description": "Whether snapshots should be enabled.", "type": "boolean" }, - "storageAggregatePool": { - "description": "Input only. Name of the storage aggregate pool to allocate the volume in. Can be used only for VOLUME_PERFORMANCE_TIER_ASSIGNED volumes.", - "type": "string" - }, "type": { "description": "The type of this Volume.", "enum": [ diff --git a/baremetalsolution/v2/baremetalsolution-gen.go b/baremetalsolution/v2/baremetalsolution-gen.go index 0a8f0051871..c74e0c6b6ab 100644 --- a/baremetalsolution/v2/baremetalsolution-gen.go +++ b/baremetalsolution/v2/baremetalsolution-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bare-metal // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // baremetalsolutionService, err := baremetalsolution.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // baremetalsolutionService, err := baremetalsolution.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // baremetalsolutionService, err := baremetalsolution.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package baremetalsolution // import "google.golang.org/api/baremetalsolution/v2" import ( @@ -570,8 +583,8 @@ type Instance struct { OsImage string `json:"osImage,omitempty"` // Pod: Immutable. Pod name. Pod is an independent part of - // infrastructure. Instance can be connected to the assets (networks, - // volumes) allocated in the same pod only. + // infrastructure. Instance can only be connected to the assets + // (networks, volumes) allocated in the same pod. Pod string `json:"pod,omitempty"` // State: Output only. The state of the server. @@ -658,7 +671,7 @@ type InstanceConfig struct { // InstanceConfig.multivlan_config is true. LogicalInterfaces []*GoogleCloudBaremetalsolutionV2LogicalInterface `json:"logicalInterfaces,omitempty"` - // Name: Output only. The name of the instance config. + // Name: The name of the instance config. Name string `json:"name,omitempty"` // NetworkConfig: The type of network configuration on the instance. @@ -684,8 +697,8 @@ type InstanceConfig struct { // InstanceConfig.multivlan_config is false. PrivateNetwork *NetworkAddress `json:"privateNetwork,omitempty"` - // SshKeyNames: List of names of ssh keys used to provision the - // instance. + // SshKeyNames: Optional. List of names of ssh keys used to provision + // the instance. SshKeyNames []string `json:"sshKeyNames,omitempty"` // UserNote: User note field, it can be used by customers to add @@ -1455,7 +1468,9 @@ type Network struct { // `projects/{project}/locations/{location}/networks/{network}` Name string `json:"name,omitempty"` - // Pod: Output only. Pod name. + // Pod: Immutable. Pod name. Pod is an independent part of + // infrastructure. Network can only be connected to the assets + // (instances, nfsshares) allocated in the same pod. Pod string `json:"pod,omitempty"` // Reservations: List of IP address reservations in this network. When @@ -1823,6 +1838,11 @@ type NfsShare struct { // instead. NfsShareId string `json:"nfsShareId,omitempty"` + // Pod: Immutable. Pod name. Pod is an independent part of + // infrastructure. NFSShare can only be connected to the assets + // (networks, instances) allocated in the same pod. + Pod string `json:"pod,omitempty"` + // RequestedSizeGib: The requested size, in GiB. RequestedSizeGib int64 `json:"requestedSizeGib,omitempty,string"` @@ -2016,6 +2036,11 @@ type ProvisioningConfig struct { // Networks: Networks to be created. Networks []*NetworkConfig `json:"networks,omitempty"` + // Pod: Optional. Pod name. Pod is an independent part of + // infrastructure. Instance can be connected to the assets (networks, + // volumes, nfsshares) allocated in the same pod only. + Pod string `json:"pod,omitempty"` + // State: Output only. State of ProvisioningConfig. // // Possible values: @@ -2749,7 +2774,9 @@ type Volume struct { // "VOLUME_PERFORMANCE_TIER_HT" - High throughput aggregates. PerformanceTier string `json:"performanceTier,omitempty"` - // Pod: Immutable. Pod name. + // Pod: Immutable. Pod name. Pod is an independent part of + // infrastructure. Volume can only be connected to the instances + // allocated in the same pod. Pod string `json:"pod,omitempty"` // Protocol: Output only. Storage protocol for the Volume. @@ -2787,10 +2814,6 @@ type Volume struct { // and usage on the storage volume. SnapshotReservationDetail *SnapshotReservationDetail `json:"snapshotReservationDetail,omitempty"` - // SnapshotSchedulePolicy: The name of the snapshot schedule policy in - // use for this volume, if any. - SnapshotSchedulePolicy string `json:"snapshotSchedulePolicy,omitempty"` - // State: The state of this storage volume. // // Possible values: @@ -2803,11 +2826,6 @@ type Volume struct { // deleted after `expire_time`. State string `json:"state,omitempty"` - // StorageAggregatePool: Input only. Name of the storage aggregate pool - // to allocate the volume in. Can be used only for - // VOLUME_PERFORMANCE_TIER_ASSIGNED volumes. - StorageAggregatePool string `json:"storageAggregatePool,omitempty"` - // StorageType: The storage type for this volume. // // Possible values: @@ -2902,11 +2920,6 @@ type VolumeConfig struct { // SnapshotsEnabled: Whether snapshots should be enabled. SnapshotsEnabled bool `json:"snapshotsEnabled,omitempty"` - // StorageAggregatePool: Input only. Name of the storage aggregate pool - // to allocate the volume in. Can be used only for - // VOLUME_PERFORMANCE_TIER_ASSIGNED volumes. - StorageAggregatePool string `json:"storageAggregatePool,omitempty"` - // Type: The type of this Volume. // // Possible values: diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index b3491a47063..78925b766eb 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/batch/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // batchService, err := batch.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // batchService, err := batch.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // batchService, err := batch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package batch // import "google.golang.org/api/batch/v1" import ( diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index d3289532173..f2ebed1ae0f 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // beyondcorpService, err := beyondcorp.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // beyondcorpService, err := beyondcorp.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // beyondcorpService, err := beyondcorp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package beyondcorp // import "google.golang.org/api/beyondcorp/v1" import ( diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 14e765a4ebb..8bbde01c1c5 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // beyondcorpService, err := beyondcorp.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // beyondcorpService, err := beyondcorp.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // beyondcorpService, err := beyondcorp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package beyondcorp // import "google.golang.org/api/beyondcorp/v1alpha" import ( diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index f7983a610a9..ce16fb648bb 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1681,7 +1681,7 @@ } } }, - "revision": "20230805", + "revision": "20230812", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -2817,6 +2817,10 @@ "description": "[Output-only] A hash of the resource.", "type": "string" }, + "externalDatasetReference": { + "$ref": "ExternalDatasetReference", + "description": "[Optional] Information about the external metadata storage where the dataset is defined. Filled out when the dataset type is EXTERNAL." + }, "friendlyName": { "description": "[Optional] A descriptive name for the dataset.", "type": "string" @@ -3490,6 +3494,20 @@ }, "type": "object" }, + "ExternalDatasetReference": { + "id": "ExternalDatasetReference", + "properties": { + "connection": { + "description": "[Required] The connection id that is used to access the external_source. Format: projects/{project_id}/locations/{location_id}/connections/{connection_id}", + "type": "string" + }, + "externalSource": { + "description": "[Required] External source that backs this dataset.", + "type": "string" + } + }, + "type": "object" + }, "FeatureValue": { "description": "Representative value of a single feature within the cluster.", "id": "FeatureValue", @@ -6896,6 +6914,16 @@ "format": "int64", "type": "string" }, + "rangeElementType": { + "description": "Optional. The subtype of the RANGE, if the type of this field is RANGE. If the type is RANGE, this field is required. Possible values for the field element type of a RANGE include: - DATE - DATETIME - TIMESTAMP", + "properties": { + "type": { + "description": "The field element type of a RANGE", + "type": "string" + } + }, + "type": "object" + }, "roundingMode": { "description": "Optional. Rounding Mode specification of the field. It only can be set on NUMERIC or BIGNUMERIC type fields.", "type": "string" diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 3229f73f1ef..450c2561ff5 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/bigquery/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // bigqueryService, err := bigquery.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // bigqueryService, err := bigquery.NewService(ctx, option.WithScopes(bigquery.DevstorageReadWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bigqueryService, err := bigquery.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bigqueryService, err := bigquery.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package bigquery // import "google.golang.org/api/bigquery/v2" import ( @@ -2206,6 +2220,11 @@ type Dataset struct { // Etag: [Output-only] A hash of the resource. Etag string `json:"etag,omitempty"` + // ExternalDatasetReference: [Optional] Information about the external + // metadata storage where the dataset is defined. Filled out when the + // dataset type is EXTERNAL. + ExternalDatasetReference *ExternalDatasetReference `json:"externalDatasetReference,omitempty"` + // FriendlyName: [Optional] A descriptive name for the dataset. FriendlyName string `json:"friendlyName,omitempty"` @@ -3414,6 +3433,39 @@ func (s *ExternalDataConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ExternalDatasetReference struct { + // Connection: [Required] The connection id that is used to access the + // external_source. Format: + // projects/{project_id}/locations/{location_id}/connections/{connection_ + // id} + Connection string `json:"connection,omitempty"` + + // ExternalSource: [Required] External source that backs this dataset. + ExternalSource string `json:"externalSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Connection") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Connection") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalDatasetReference) MarshalJSON() ([]byte, error) { + type NoMethod ExternalDatasetReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FeatureValue: Representative value of a single feature within the // cluster. type FeatureValue struct { @@ -8794,6 +8846,12 @@ type TableFieldSchema struct { // it is invalid. Precision int64 `json:"precision,omitempty,string"` + // RangeElementType: Optional. The subtype of the RANGE, if the type of + // this field is RANGE. If the type is RANGE, this field is required. + // Possible values for the field element type of a RANGE include: - DATE + // - DATETIME - TIMESTAMP + RangeElementType *TableFieldSchemaRangeElementType `json:"rangeElementType,omitempty"` + // RoundingMode: Optional. Rounding Mode specification of the field. It // only can be set on NUMERIC or BIGNUMERIC type fields. RoundingMode string `json:"roundingMode,omitempty"` @@ -8892,6 +8950,37 @@ func (s *TableFieldSchemaPolicyTags) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TableFieldSchemaRangeElementType: Optional. The subtype of the RANGE, +// if the type of this field is RANGE. If the type is RANGE, this field +// is required. Possible values for the field element type of a RANGE +// include: - DATE - DATETIME - TIMESTAMP +type TableFieldSchemaRangeElementType struct { + // Type: The field element type of a RANGE + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TableFieldSchemaRangeElementType) MarshalJSON() ([]byte, error) { + type NoMethod TableFieldSchemaRangeElementType + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TableList struct { // Etag: A hash of this page of results. Etag string `json:"etag,omitempty"` diff --git a/bigqueryconnection/v1beta1/bigqueryconnection-gen.go b/bigqueryconnection/v1beta1/bigqueryconnection-gen.go index 76ccf68918e..3b7e606e4ef 100644 --- a/bigqueryconnection/v1beta1/bigqueryconnection-gen.go +++ b/bigqueryconnection/v1beta1/bigqueryconnection-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bigquery/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // bigqueryconnectionService, err := bigqueryconnection.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // bigqueryconnectionService, err := bigqueryconnection.NewService(ctx, option.WithScopes(bigqueryconnection.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bigqueryconnectionService, err := bigqueryconnection.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bigqueryconnectionService, err := bigqueryconnection.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package bigqueryconnection // import "google.golang.org/api/bigqueryconnection/v1beta1" import ( diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index a5f8fbdc725..045f3bcc1be 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -602,7 +602,7 @@ "type": "string" }, "name": { - "description": "The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", + "description": "The resource name of the transfer config. Transfer config names have the form either `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", "required": true, @@ -1050,7 +1050,7 @@ "type": "string" }, "name": { - "description": "The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", + "description": "The resource name of the transfer config. Transfer config names have the form either `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", "location": "path", "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", "required": true, @@ -1342,7 +1342,7 @@ } } }, - "revision": "20230722", + "revision": "20230827", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -1922,7 +1922,7 @@ "description": "The encryption configuration part. Currently, it is only used for the optional KMS key name. The BigQuery service account of your project must be granted permissions to use the key. Read methods will return the key name applied in effect. Write methods will apply the key if it is present, or otherwise try to apply project default keys if it is absent." }, "name": { - "description": "The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", + "description": "The resource name of the transfer config. Transfer config names have the form either `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", "type": "string" }, "nextRunTime": { diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index c2cbc67c4fd..15383626c53 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bigquery-transfer/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // bigquerydatatransferService, err := bigquerydatatransfer.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // bigquerydatatransferService, err := bigquerydatatransfer.NewService(ctx, option.WithScopes(bigquerydatatransfer.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bigquerydatatransferService, err := bigquerydatatransfer.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bigquerydatatransferService, err := bigquerydatatransfer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package bigquerydatatransfer // import "google.golang.org/api/bigquerydatatransfer/v1" import ( @@ -1209,11 +1223,11 @@ type TransferConfig struct { EncryptionConfiguration *EncryptionConfiguration `json:"encryptionConfiguration,omitempty"` // Name: The resource name of the transfer config. Transfer config names - // have the form + // have the form either // `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` - // . Where `config_id` is usually a uuid, even though it is not - // guaranteed or required. The name is ignored when creating a transfer - // config. + // or `projects/{project_id}/transferConfigs/{config_id}`, where + // `config_id` is usually a UUID, even though it is not guaranteed or + // required. The name is ignored when creating a transfer config. Name string `json:"name,omitempty"` // NextRunTime: Output only. Next time when data transfer will run. @@ -3858,11 +3872,11 @@ type ProjectsLocationsTransferConfigsPatchCall struct { // even if they are not updated. // // - name: The resource name of the transfer config. Transfer config -// names have the form +// names have the form either // `projects/{project_id}/locations/{region}/transferConfigs/{config_id -// }`. Where `config_id` is usually a uuid, even though it is not -// guaranteed or required. The name is ignored when creating a -// transfer config. +// }` or `projects/{project_id}/transferConfigs/{config_id}`, where +// `config_id` is usually a UUID, even though it is not guaranteed or +// required. The name is ignored when creating a transfer config. func (r *ProjectsLocationsTransferConfigsService) Patch(name string, transferconfig *TransferConfig) *ProjectsLocationsTransferConfigsPatchCall { c := &ProjectsLocationsTransferConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4028,7 +4042,7 @@ func (c *ProjectsLocationsTransferConfigsPatchCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "name": { - // "description": "The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", + // "description": "The resource name of the transfer config. Transfer config names have the form either `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", // "required": true, @@ -5884,11 +5898,11 @@ type ProjectsTransferConfigsPatchCall struct { // even if they are not updated. // // - name: The resource name of the transfer config. Transfer config -// names have the form +// names have the form either // `projects/{project_id}/locations/{region}/transferConfigs/{config_id -// }`. Where `config_id` is usually a uuid, even though it is not -// guaranteed or required. The name is ignored when creating a -// transfer config. +// }` or `projects/{project_id}/transferConfigs/{config_id}`, where +// `config_id` is usually a UUID, even though it is not guaranteed or +// required. The name is ignored when creating a transfer config. func (r *ProjectsTransferConfigsService) Patch(name string, transferconfig *TransferConfig) *ProjectsTransferConfigsPatchCall { c := &ProjectsTransferConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -6054,7 +6068,7 @@ func (c *ProjectsTransferConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Tr // "type": "string" // }, // "name": { - // "description": "The resource name of the transfer config. Transfer config names have the form `projects/{project_id}/locations/{region}/transferConfigs/{config_id}`. Where `config_id` is usually a uuid, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", + // "description": "The resource name of the transfer config. Transfer config names have the form either `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or `projects/{project_id}/transferConfigs/{config_id}`, where `config_id` is usually a UUID, even though it is not guaranteed or required. The name is ignored when creating a transfer config.", // "location": "path", // "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", // "required": true, diff --git a/bigqueryreservation/v1/bigqueryreservation-gen.go b/bigqueryreservation/v1/bigqueryreservation-gen.go index a83f38f0c8a..b2029f7b2a5 100644 --- a/bigqueryreservation/v1/bigqueryreservation-gen.go +++ b/bigqueryreservation/v1/bigqueryreservation-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bigquery/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // bigqueryreservationService, err := bigqueryreservation.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // bigqueryreservationService, err := bigqueryreservation.NewService(ctx, option.WithScopes(bigqueryreservation.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bigqueryreservationService, err := bigqueryreservation.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bigqueryreservationService, err := bigqueryreservation.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package bigqueryreservation // import "google.golang.org/api/bigqueryreservation/v1" import ( diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index bdfb07eacd8..0a52c6ad019 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/bigtable/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // bigtableadminService, err := bigtableadmin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithScopes(bigtableadmin.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bigtableadminService, err := bigtableadmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package bigtableadmin // import "google.golang.org/api/bigtableadmin/v2" import ( diff --git a/billingbudgets/v1/billingbudgets-api.json b/billingbudgets/v1/billingbudgets-api.json index a5c060f1012..0b03e979fa4 100644 --- a/billingbudgets/v1/billingbudgets-api.json +++ b/billingbudgets/v1/billingbudgets-api.json @@ -219,6 +219,11 @@ "pattern": "^billingAccounts/[^/]+$", "required": true, "type": "string" + }, + "scope": { + "description": "Optional. Set the scope of the budgets to be returned, in the format of the resource name. The scope of a budget is the cost that it tracks, such as costs for a single project, or the costs for all projects in a folder. Only project scope (in the format of \"projects/project-id\" or \"projects/123\") is supported in this field. When this field is set to a project's resource name, the budgets returned are tracking the costs for that project.", + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/budgets", @@ -270,7 +275,7 @@ } } }, - "revision": "20230624", + "revision": "20230903", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1Budget": { @@ -462,6 +467,10 @@ "description": "Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.", "type": "boolean" }, + "enableProjectLevelRecipients": { + "description": "Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.", + "type": "boolean" + }, "monitoringNotificationChannels": { "description": "Optional. Email targets to send notifications to when a threshold is exceeded. This is in addition to the `DefaultIamRecipients` who receive alert emails based on their billing account IAM role. The value is the full REST resource name of a Cloud Monitoring email notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 email notifications are allowed. To customize budget alert email recipients with monitoring notification channels, you _must create the monitoring notification channels before you link them to a budget_. For guidance on setting up notification channels to use with budgets, see [Customize budget alert email recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). For Cloud Billing budget alerts, you _must use email notification channels_. The other types of notification channels are _not_ supported, such as Slack, SMS, or PagerDuty. If you want to [send budget notifications to Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), use a pubsubTopic and configure [programmatic notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications).", "items": { diff --git a/billingbudgets/v1/billingbudgets-gen.go b/billingbudgets/v1/billingbudgets-gen.go index 4ebb16d317c..e7f96091fe0 100644 --- a/billingbudgets/v1/billingbudgets-gen.go +++ b/billingbudgets/v1/billingbudgets-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/billing/docs/how-to/budget-api-overview // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // billingbudgetsService, err := billingbudgets.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // billingbudgetsService, err := billingbudgets.NewService(ctx, option.WithScopes(billingbudgets.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // billingbudgetsService, err := billingbudgets.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // billingbudgetsService, err := billingbudgets.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package billingbudgets // import "google.golang.org/api/billingbudgets/v1" import ( @@ -478,6 +492,14 @@ type GoogleCloudBillingBudgetsV1NotificationsRule struct { // and Billing Account User IAM roles for the target account. DisableDefaultIamRecipients bool `json:"disableDefaultIamRecipients,omitempty"` + // EnableProjectLevelRecipients: Optional. When set to true, and when + // the budget has a single project configured, notifications will be + // sent to project level recipients of that project. This field will be + // ignored if the budget has multiple or no project configured. + // Currently, project level recipients are the users with `Owner` role + // on a cloud project. + EnableProjectLevelRecipients bool `json:"enableProjectLevelRecipients,omitempty"` + // MonitoringNotificationChannels: Optional. Email targets to send // notifications to when a threshold is exceeded. This is in addition to // the `DefaultIamRecipients` who receive alert emails based on their @@ -1198,6 +1220,19 @@ func (c *BillingAccountsBudgetsListCall) PageToken(pageToken string) *BillingAcc return c } +// Scope sets the optional parameter "scope": Set the scope of the +// budgets to be returned, in the format of the resource name. The scope +// of a budget is the cost that it tracks, such as costs for a single +// project, or the costs for all projects in a folder. Only project +// scope (in the format of "projects/project-id" or "projects/123") is +// supported in this field. When this field is set to a project's +// resource name, the budgets returned are tracking the costs for that +// project. +func (c *BillingAccountsBudgetsListCall) Scope(scope string) *BillingAccountsBudgetsListCall { + c.urlParams_.Set("scope", scope) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1324,6 +1359,11 @@ func (c *BillingAccountsBudgetsListCall) Do(opts ...googleapi.CallOption) (*Goog // "pattern": "^billingAccounts/[^/]+$", // "required": true, // "type": "string" + // }, + // "scope": { + // "description": "Optional. Set the scope of the budgets to be returned, in the format of the resource name. The scope of a budget is the cost that it tracks, such as costs for a single project, or the costs for all projects in a folder. Only project scope (in the format of \"projects/project-id\" or \"projects/123\") is supported in this field. When this field is set to a project's resource name, the budgets returned are tracking the costs for that project.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+parent}/budgets", diff --git a/billingbudgets/v1beta1/billingbudgets-api.json b/billingbudgets/v1beta1/billingbudgets-api.json index e9dc077dd1b..fde813ff767 100644 --- a/billingbudgets/v1beta1/billingbudgets-api.json +++ b/billingbudgets/v1beta1/billingbudgets-api.json @@ -219,6 +219,11 @@ "pattern": "^billingAccounts/[^/]+$", "required": true, "type": "string" + }, + "scope": { + "description": "Optional. Set the scope of the budgets to be returned, in the format of the resource name. The scope of a budget is the cost that it tracks, such as costs for a single project, or the costs for all projects in a folder. Only project scope (in the format of \"projects/project-id\" or \"projects/123\") is supported in this field. When this field is set to a project's resource name, the budgets returned are tracking the costs for that project.", + "location": "query", + "type": "string" } }, "path": "v1beta1/{+parent}/budgets", @@ -264,7 +269,7 @@ } } }, - "revision": "20230624", + "revision": "20230903", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1beta1AllUpdatesRule": { @@ -275,6 +280,10 @@ "description": "Optional. When set to true, disables default notifications sent when a threshold is exceeded. Default notifications are sent to those with Billing Account Administrator and Billing Account User IAM roles for the target account.", "type": "boolean" }, + "enableProjectLevelRecipients": { + "description": "Optional. When set to true, and when the budget has a single project configured, notifications will be sent to project level recipients of that project. This field will be ignored if the budget has multiple or no project configured. Currently, project level recipients are the users with `Owner` role on a cloud project.", + "type": "boolean" + }, "monitoringNotificationChannels": { "description": "Optional. Targets to send notifications to when a threshold is exceeded. This is in addition to default recipients who have billing account IAM roles. The value is the full REST resource name of a monitoring notification channel with the form `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 channels are allowed. See https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients for more details.", "items": { diff --git a/billingbudgets/v1beta1/billingbudgets-gen.go b/billingbudgets/v1beta1/billingbudgets-gen.go index cdfc53af3ca..9fdc17a245b 100644 --- a/billingbudgets/v1beta1/billingbudgets-gen.go +++ b/billingbudgets/v1beta1/billingbudgets-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/billing/docs/how-to/budget-api-overview // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // billingbudgetsService, err := billingbudgets.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // billingbudgetsService, err := billingbudgets.NewService(ctx, option.WithScopes(billingbudgets.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // billingbudgetsService, err := billingbudgets.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // billingbudgetsService, err := billingbudgets.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package billingbudgets // import "google.golang.org/api/billingbudgets/v1beta1" import ( @@ -177,6 +191,14 @@ type GoogleCloudBillingBudgetsV1beta1AllUpdatesRule struct { // and Billing Account User IAM roles for the target account. DisableDefaultIamRecipients bool `json:"disableDefaultIamRecipients,omitempty"` + // EnableProjectLevelRecipients: Optional. When set to true, and when + // the budget has a single project configured, notifications will be + // sent to project level recipients of that project. This field will be + // ignored if the budget has multiple or no project configured. + // Currently, project level recipients are the users with `Owner` role + // on a cloud project. + EnableProjectLevelRecipients bool `json:"enableProjectLevelRecipients,omitempty"` + // MonitoringNotificationChannels: Optional. Targets to send // notifications to when a threshold is exceeded. This is in addition to // default recipients who have billing account IAM roles. The value is @@ -1248,6 +1270,19 @@ func (c *BillingAccountsBudgetsListCall) PageToken(pageToken string) *BillingAcc return c } +// Scope sets the optional parameter "scope": Set the scope of the +// budgets to be returned, in the format of the resource name. The scope +// of a budget is the cost that it tracks, such as costs for a single +// project, or the costs for all projects in a folder. Only project +// scope (in the format of "projects/project-id" or "projects/123") is +// supported in this field. When this field is set to a project's +// resource name, the budgets returned are tracking the costs for that +// project. +func (c *BillingAccountsBudgetsListCall) Scope(scope string) *BillingAccountsBudgetsListCall { + c.urlParams_.Set("scope", scope) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1374,6 +1409,11 @@ func (c *BillingAccountsBudgetsListCall) Do(opts ...googleapi.CallOption) (*Goog // "pattern": "^billingAccounts/[^/]+$", // "required": true, // "type": "string" + // }, + // "scope": { + // "description": "Optional. Set the scope of the budgets to be returned, in the format of the resource name. The scope of a budget is the cost that it tracks, such as costs for a single project, or the costs for all projects in a folder. Only project scope (in the format of \"projects/project-id\" or \"projects/123\") is supported in this field. When this field is set to a project's resource name, the budgets returned are tracking the costs for that project.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta1/{+parent}/budgets", diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index 1334f412d3c..550ccee1796 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -133,7 +133,7 @@ ] }, "updatePolicy": { - "description": "Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.", + "description": "Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed.", "flatPath": "v1/projects/{projectsId}/policy", "httpMethod": "PUT", "id": "binaryauthorization.projects.updatePolicy", @@ -165,7 +165,7 @@ "attestors": { "methods": { "create": { - "description": "Creates an attestor, and returns a copy of the new attestor. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the attestor already exists.", + "description": "Creates an attestor, and returns a copy of the new attestor. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the attestor already exists.", "flatPath": "v1/projects/{projectsId}/attestors", "httpMethod": "POST", "id": "binaryauthorization.projects.attestors.create", @@ -198,7 +198,7 @@ ] }, "delete": { - "description": "Deletes an attestor. Returns NOT_FOUND if the attestor does not exist.", + "description": "Deletes an attestor. Returns `NOT_FOUND` if the attestor does not exist.", "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}", "httpMethod": "DELETE", "id": "binaryauthorization.projects.attestors.delete", @@ -223,7 +223,7 @@ ] }, "get": { - "description": "Gets an attestor. Returns NOT_FOUND if the attestor does not exist.", + "description": "Gets an attestor. Returns `NOT_FOUND` if the attestor does not exist.", "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}", "httpMethod": "GET", "id": "binaryauthorization.projects.attestors.get", @@ -279,7 +279,7 @@ ] }, "list": { - "description": "Lists attestors. Returns INVALID_ARGUMENT if the project does not exist.", + "description": "Lists attestors. Returns `INVALID_ARGUMENT` if the project does not exist.", "flatPath": "v1/projects/{projectsId}/attestors", "httpMethod": "GET", "id": "binaryauthorization.projects.attestors.list", @@ -371,7 +371,7 @@ ] }, "update": { - "description": "Updates an attestor. Returns NOT_FOUND if the attestor does not exist.", + "description": "Updates an attestor. Returns `NOT_FOUND` if the attestor does not exist.", "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}", "httpMethod": "PUT", "id": "binaryauthorization.projects.attestors.update", @@ -399,7 +399,7 @@ ] }, "validateAttestationOccurrence": { - "description": "Returns whether the given Attestation for the given image URI was signed by the given Attestor", + "description": "Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor`", "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}:validateAttestationOccurrence", "httpMethod": "POST", "id": "binaryauthorization.projects.attestors.validateAttestationOccurrence", @@ -433,7 +433,7 @@ "policies": { "methods": { "create": { - "description": "Creates a platform policy, and returns a copy of it. Returns NOT_FOUND if the project or platform doesn't exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the policy already exists, and INVALID_ARGUMENT if the policy contains a platform-specific policy that does not match the platform value specified in the URL.", + "description": "Creates a platform policy, and returns a copy of it. Returns `NOT_FOUND` if the project or platform doesn't exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the policy already exists, and `INVALID_ARGUMENT` if the policy contains a platform-specific policy that does not match the platform value specified in the URL.", "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies", "httpMethod": "POST", "id": "binaryauthorization.projects.platforms.policies.create", @@ -466,7 +466,7 @@ ] }, "delete": { - "description": "Deletes a platform policy. Returns NOT_FOUND if the policy doesn't exist.", + "description": "Deletes a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.", "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies/{policiesId}", "httpMethod": "DELETE", "id": "binaryauthorization.projects.platforms.policies.delete", @@ -491,7 +491,7 @@ ] }, "get": { - "description": "Gets a platform policy. Returns NOT_FOUND if the policy doesn't exist.", + "description": "Gets a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.", "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies/{policiesId}", "httpMethod": "GET", "id": "binaryauthorization.projects.platforms.policies.get", @@ -516,7 +516,7 @@ ] }, "list": { - "description": "Lists platform policies owned by a project in the specified platform. Returns INVALID_ARGUMENT if the project or the platform doesn't exist.", + "description": "Lists platform policies owned by a project in the specified platform. Returns `INVALID_ARGUMENT` if the project or the platform doesn't exist.", "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies", "httpMethod": "GET", "id": "binaryauthorization.projects.platforms.policies.list", @@ -552,7 +552,7 @@ ] }, "replacePlatformPolicy": { - "description": "Replaces a platform policy. Returns NOT_FOUND if the policy doesn't exist.", + "description": "Replaces a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.", "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies/{policiesId}", "httpMethod": "PUT", "id": "binaryauthorization.projects.platforms.policies.replacePlatformPolicy", @@ -561,7 +561,7 @@ ], "parameters": { "name": { - "description": "Output only. The relative resource name of the BinAuthz platform policy, in the form of `projects/*/platforms/*/policies/*`.", + "description": "Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.", "location": "path", "pattern": "^projects/[^/]+/platforms/[^/]+/policies/[^/]+$", "required": true, @@ -706,7 +706,7 @@ } } }, - "revision": "20230804", + "revision": "20230901", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -737,14 +737,14 @@ ], "enumDescriptions": [ "Do not use.", - "This rule allows all all pod creations.", + "This rule allows all pod creations.", "This rule allows a pod creation if all the attestors listed in `require_attestations_by` have valid attestations for all of the images in the pod spec.", "This rule denies all pod creations." ], "type": "string" }, "requireAttestationsBy": { - "description": "Optional. The resource names of the attestors that must attest to a container image, in the format `projects/*/attestors/*`. Each attestor must exist before a policy can reference it. To add an attestor to a policy the principal issuing the policy change request must be able to read the attestor resource. Note: this field must be non-empty when the evaluation_mode field specifies REQUIRE_ATTESTATION, otherwise it must be empty.", + "description": "Optional. The resource names of the attestors that must attest to a container image, in the format `projects/*/attestors/*`. Each attestor must exist before a policy can reference it. To add an attestor to a policy the principal issuing the policy change request must be able to read the attestor resource. Note: this field must be non-empty when the `evaluation_mode` field specifies `REQUIRE_ATTESTATION`, otherwise it must be empty.", "items": { "type": "string" }, @@ -769,7 +769,7 @@ "id": "AttestationAuthenticator", "properties": { "displayName": { - "description": "Optional. A user-provided name for this AttestationAuthenticator. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", + "description": "Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", "type": "string" }, "pkixPublicKeySet": { @@ -810,7 +810,7 @@ "id": "AttestationSource", "properties": { "containerAnalysisAttestationProjects": { - "description": "The ids of the GCP projects storing the SLSA attestations as container analysis Occurrences.", + "description": "The IDs of the GCP projects storing the SLSA attestations as Container Analysis Occurrences.", "items": { "type": "string" }, @@ -853,7 +853,7 @@ "id": "AttestorPublicKey", "properties": { "asciiArmoredPgpPublicKey": { - "description": "ASCII-armored representation of a PGP public key, as the entire output by the command `gpg --export --armor foo@example.com` (either LF or CRLF line endings). When using this field, `id` should be left blank. The BinAuthz API handlers will calculate the ID and fill it in automatically. BinAuthz computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as upper-case hex. If `id` is provided by the caller, it will be overwritten by the API-calculated ID.", + "description": "ASCII-armored representation of a PGP public key, as the entire output by the command `gpg --export --armor foo@example.com` (either LF or CRLF line endings). When using this field, `id` should be left blank. The Binary Authorization API handlers will calculate the ID and fill it in automatically. Binary Authorization computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as upper-case hex. If `id` is provided by the caller, it will be overwritten by the API-calculated ID.", "type": "string" }, "comment": { @@ -861,7 +861,7 @@ "type": "string" }, "id": { - "description": "The ID of this public key. Signatures verified by BinAuthz must include the ID of the public key that can be used to verify them, and that ID must match the contents of this field exactly. Additional restrictions on this field can be imposed based on which public key type is encapsulated. See the documentation on `public_key` cases below for details.", + "description": "The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them, and that ID must match the contents of this field exactly. Additional restrictions on this field can be imposed based on which public key type is encapsulated. See the documentation on `public_key` cases below for details.", "type": "string" }, "pkixPublicKey": { @@ -894,20 +894,20 @@ "type": "object" }, "Check": { - "description": "A single check to perform against a Pod. Checks are grouped into CheckSets, which are defined by the top-level policy.", + "description": "A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.", "id": "Check", "properties": { "alwaysDeny": { - "description": "Optional. A special-case check that always denies. Note that this still only applies when the scope of the CheckSet applies and the image isn't exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to \"deny\".", + "description": "Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn't exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to \"deny\".", "type": "boolean" }, "displayName": { - "description": "Optional. A user-provided name for this Check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", + "description": "Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", "type": "string" }, "imageAllowlist": { "$ref": "ImageAllowlist", - "description": "Optional. Images exempted from this Check. If any of the patterns match the image url, the check will not be evaluated." + "description": "Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated." }, "imageFreshnessCheck": { "$ref": "ImageFreshnessCheck", @@ -919,7 +919,7 @@ }, "slsaCheck": { "$ref": "SlsaCheck", - "description": "Optional. Require that an image was built by a trusted builder (such as Google Cloud Build or GitHub), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory." + "description": "Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory." }, "trustedDirectoryCheck": { "$ref": "TrustedDirectoryCheck", @@ -933,27 +933,27 @@ "type": "object" }, "CheckSet": { - "description": "A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a CheckSet to return \"allowed\" for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to \"allowed\".", + "description": "A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return \"allowed\" for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to \"allowed\".", "id": "CheckSet", "properties": { "checks": { - "description": "Optional. The checks to apply. The ultimate result of evaluating the check set will be \"allow\" if and only if every check in 'checks' evaluates to \"allow\". If `checks` is empty, the default behavior is \"always allow\".", + "description": "Optional. The checks to apply. The ultimate result of evaluating the check set will be \"allow\" if and only if every check in `checks` evaluates to \"allow\". If `checks` is empty, the default behavior is \"always allow\".", "items": { "$ref": "Check" }, "type": "array" }, "displayName": { - "description": "Optional. A user-provided name for this CheckSet. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", + "description": "Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.", "type": "string" }, "imageAllowlist": { "$ref": "ImageAllowlist", - "description": "Optional. Images exempted from this CheckSet. If any of the patterns match the image being evaluated, no checks in the CheckSet will be evaluated." + "description": "Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated." }, "scope": { "$ref": "Scope", - "description": "Optional. The scope to which this CheckSet applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the Scope message documentation for details on scoping rules." + "description": "Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules." } }, "type": "object" @@ -992,7 +992,7 @@ "id": "GkePolicy", "properties": { "checkSets": { - "description": "Optional. The CheckSets to apply, scoped by namespace or namespace and service account. Exactly one CheckSet will be evaluated for a given Pod (unless the list is empty, in which case the behavior is \"always allow\"). If multiple CheckSets have scopes that match the namespace and service account of the Pod being evaluated, only the CheckSet with the MOST SPECIFIC scope will match. CheckSets must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a CheckSet with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one CheckSet matches a given Pod, the CheckSet that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a CheckSet with no scope set, i.e. a catchall to handle any situation not caught by the preceding CheckSets.", + "description": "Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is \"always allow\"). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.", "items": { "$ref": "CheckSet" }, @@ -1066,7 +1066,7 @@ "type": "object" }, "ListAttestorsResponse": { - "description": "Response message for BinauthzManagementService.ListAttestors.", + "description": "Response message for BinauthzManagementServiceV1.ListAttestors.", "id": "ListAttestorsResponse", "properties": { "attestors": { @@ -1102,7 +1102,7 @@ "type": "object" }, "PkixPublicKey": { - "description": "A public key in the PkixPublicKey format (see https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). Public keys of this type are typically textually encoded using the PEM format.", + "description": "A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.", "id": "PkixPublicKey", "properties": { "publicKeyPem": { @@ -1159,7 +1159,7 @@ "type": "object" }, "PkixPublicKeySet": { - "description": "A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a PkixPublicKeySet if any of the public keys verify it (i.e. it is an \"OR\" of the keys).", + "description": "A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an \"OR\" of the keys).", "id": "PkixPublicKeySet", "properties": { "pkixPublicKeys": { @@ -1185,7 +1185,7 @@ "description": "Optional. GKE platform-specific policy." }, "name": { - "description": "Output only. The relative resource name of the BinAuthz platform policy, in the form of `projects/*/platforms/*/policies/*`.", + "description": "Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.", "readOnly": true, "type": "string" }, @@ -1236,7 +1236,7 @@ "DISABLE" ], "enumDescriptions": [ - "Not specified: DISABLE is assumed.", + "Not specified: `DISABLE` is assumed.", "Enables system policy evaluation.", "Disables system policy evaluation." ], @@ -1278,7 +1278,7 @@ "type": "object" }, "Scope": { - "description": "A scope specifier for CheckSets.", + "description": "A scope specifier for `CheckSet` objects.", "id": "Scope", "properties": { "kubernetesNamespace": { @@ -1286,7 +1286,7 @@ "type": "string" }, "kubernetesServiceAccount": { - "description": "Optional. Matches a single Kubernetes service account, e.g. 'my-namespace:my-service-account'. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.", + "description": "Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.", "type": "string" } }, @@ -1387,7 +1387,7 @@ "id": "TrustedDirectoryCheck", "properties": { "trustedDirPatterns": { - "description": "Required. List of trusted directory patterns. A pattern is in the form \"registry/path/to/directory\". The registry domain part is defined as two or more dot-separated words, e.g., us.pkg.dev, or gcr.io. Additionally, * can be used in three ways as wildcards: 1. leading * to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing * after registry/ to match varying endings; 3. trailing ** after registry/ to match \"/\" as well. For example: -- gcr.io/my-project/my-repo is valid to match a single directory -- *-docker.pkg.dev/my-project/my-repo or *.gcr.io/my-project are valid to match varying prefixes -- gcr.io/my-project/* will match all direct directories in my-project -- gcr.io/my-project/** would match all directories in my-project -- gcr.i* is not allowed since the registry is not completely specified -- sub*domain.gcr.io/nginx is not valid because only leading * or trailing * are allowed. -- *pkg.dev/my-project/my-repo is not valid because leading * can only match subdomain -- **-docker.pkg.dev is not valid because one leading * is allowed, and that it cannot match \"/\"", + "description": "Required. List of trusted directory patterns. A pattern is in the form \"registry/path/to/directory\". The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match \"/\" as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`", "items": { "type": "string" }, @@ -1401,7 +1401,7 @@ "id": "UserOwnedGrafeasNote", "properties": { "delegationServiceAccountEmail": { - "description": "Output only. This field will contain the service account email address that this Attestor will use as the principal when querying Container Analysis. Attestor administrators must grant this service account the IAM role needed to read attestations from the note_reference in Container Analysis (`containeranalysis.notes.occurrences.viewer`). This email address is fixed for the lifetime of the Attestor, but callers should not make any other assumptions about the service account email; future versions may use an email based on a different naming pattern.", + "description": "Output only. This field will contain the service account email address that this attestor will use as the principal when querying Container Analysis. Attestor administrators must grant this service account the IAM role needed to read attestations from the note_reference in Container Analysis (`containeranalysis.notes.occurrences.viewer`). This email address is fixed for the lifetime of the attestor, but callers should not make any other assumptions about the service account email; future versions may use an email based on a different naming pattern.", "readOnly": true, "type": "string" }, @@ -1425,7 +1425,7 @@ "properties": { "attestation": { "$ref": "AttestationOccurrence", - "description": "Required. An AttestationOccurrence to be checked that it can be verified by the Attestor. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid AttestationOccurrence." + "description": "Required. An AttestationOccurrence to be checked that it can be verified by the `Attestor`. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid `AttestationOccurrence`." }, "occurrenceNote": { "description": "Required. The resource name of the Note to which the containing Occurrence is associated.", @@ -1472,7 +1472,7 @@ "description": "Specifies where to fetch the provenances attestations generated by the builder (group)." }, "configBasedBuildRequired": { - "description": "If true, require the image to be built from a top-level configuration. trusted_source_repo patterns specifies the repositories containing this configuration.", + "description": "If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.", "type": "boolean" }, "trustedBuilder": { @@ -1488,7 +1488,7 @@ "type": "string" }, "trustedSourceRepoPatterns": { - "description": "List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. \"https://\"). The patterns must not include schemes. For example, the pattern \"source.cloud.google.com/my-project/my-repo-name\" matches the following URLs: - \"source.cloud.google.com/my-project/my-repo-name\" - \"git+ssh://source.cloud.google.com/my-project/my-repo-name\" - \"https://source.cloud.google.com/my-project/my-repo-name\" A pattern matches a URL either exactly or with * wildcards. * can be used in only two ways: 1. trailing * after hosturi/ to match varying endings; 2. trailing ** after hosturi/ to match \"/\" as well. * and ** can only be used as wildcards and can only occur at the end of the pattern after a /. (So it's not possible to match a URL that contains literal *.) For example: - \"github.com/my-project/my-repo\" is valid to match a single repo - \"github.com/my-project/*\" will match all direct repos in my-project - \"github.com/**\" matches all repos in GitHub", + "description": "List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it's not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub", "items": { "type": "string" }, @@ -1502,21 +1502,21 @@ "id": "VulnerabilityCheck", "properties": { "allowedCves": { - "description": "Optional. A list of specific CVEs to ignore even if the vulnerability level violates maximumUnfixableSeverity or maximumFixableSeverity. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.", + "description": "Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.", "items": { "type": "string" }, "type": "array" }, "blockedCves": { - "description": "Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets maximumUnfixableSeverity or maximumFixableSeverity. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.", + "description": "Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.", "items": { "type": "string" }, "type": "array" }, "containerAnalysisVulnerabilityProjects": { - "description": "Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., projects/my-gcp-project. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check.", + "description": "Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check.", "items": { "type": "string" }, diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index f3a497a1872..ed42c671495 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/binary-authorization/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // binaryauthorizationService, err := binaryauthorization.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // binaryauthorizationService, err := binaryauthorization.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // binaryauthorizationService, err := binaryauthorization.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package binaryauthorization // import "google.golang.org/api/binaryauthorization/v1" import ( @@ -230,7 +243,7 @@ type AdmissionRule struct { // // Possible values: // "EVALUATION_MODE_UNSPECIFIED" - Do not use. - // "ALWAYS_ALLOW" - This rule allows all all pod creations. + // "ALWAYS_ALLOW" - This rule allows all pod creations. // "REQUIRE_ATTESTATION" - This rule allows a pod creation if all the // attestors listed in `require_attestations_by` have valid attestations // for all of the images in the pod spec. @@ -242,8 +255,9 @@ type AdmissionRule struct { // `projects/*/attestors/*`. Each attestor must exist before a policy // can reference it. To add an attestor to a policy the principal // issuing the policy change request must be able to read the attestor - // resource. Note: this field must be non-empty when the evaluation_mode - // field specifies REQUIRE_ATTESTATION, otherwise it must be empty. + // resource. Note: this field must be non-empty when the + // `evaluation_mode` field specifies `REQUIRE_ATTESTATION`, otherwise it + // must be empty. RequireAttestationsBy []string `json:"requireAttestationsBy,omitempty"` // ForceSendFields is a list of field names (e.g. "EnforcementMode") to @@ -313,7 +327,7 @@ func (s *AdmissionWhitelistPattern) MarshalJSON() ([]byte, error) { // the type of 'authenticator' that this message wraps. type AttestationAuthenticator struct { // DisplayName: Optional. A user-provided name for this - // AttestationAuthenticator. This field has no effect on the policy + // `AttestationAuthenticator`. This field has no effect on the policy // evaluation behavior except to improve readability of messages in // evaluation results. DisplayName string `json:"displayName,omitempty"` @@ -404,8 +418,8 @@ func (s *AttestationOccurrence) MarshalJSON() ([]byte, error) { // AttestationSource: Specifies the locations for fetching the // provenance attestations. type AttestationSource struct { - // ContainerAnalysisAttestationProjects: The ids of the GCP projects - // storing the SLSA attestations as container analysis Occurrences. + // ContainerAnalysisAttestationProjects: The IDs of the GCP projects + // storing the SLSA attestations as Container Analysis Occurrences. ContainerAnalysisAttestationProjects []string `json:"containerAnalysisAttestationProjects,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -489,22 +503,22 @@ type AttestorPublicKey struct { // AsciiArmoredPgpPublicKey: ASCII-armored representation of a PGP // public key, as the entire output by the command `gpg --export --armor // foo@example.com` (either LF or CRLF line endings). When using this - // field, `id` should be left blank. The BinAuthz API handlers will - // calculate the ID and fill it in automatically. BinAuthz computes this - // ID as the OpenPGP RFC4880 V4 fingerprint, represented as upper-case - // hex. If `id` is provided by the caller, it will be overwritten by the - // API-calculated ID. + // field, `id` should be left blank. The Binary Authorization API + // handlers will calculate the ID and fill it in automatically. Binary + // Authorization computes this ID as the OpenPGP RFC4880 V4 fingerprint, + // represented as upper-case hex. If `id` is provided by the caller, it + // will be overwritten by the API-calculated ID. AsciiArmoredPgpPublicKey string `json:"asciiArmoredPgpPublicKey,omitempty"` // Comment: Optional. A descriptive comment. This field may be updated. Comment string `json:"comment,omitempty"` - // Id: The ID of this public key. Signatures verified by BinAuthz must - // include the ID of the public key that can be used to verify them, and - // that ID must match the contents of this field exactly. Additional - // restrictions on this field can be imposed based on which public key - // type is encapsulated. See the documentation on `public_key` cases - // below for details. + // Id: The ID of this public key. Signatures verified by Binary + // Authorization must include the ID of the public key that can be used + // to verify them, and that ID must match the contents of this field + // exactly. Additional restrictions on this field can be imposed based + // on which public key type is encapsulated. See the documentation on + // `public_key` cases below for details. Id string `json:"id,omitempty"` // PkixPublicKey: A raw PKIX SubjectPublicKeyInfo format public key. @@ -618,21 +632,21 @@ func (s *Binding) MarshalJSON() ([]byte, error) { } // Check: A single check to perform against a Pod. Checks are grouped -// into CheckSets, which are defined by the top-level policy. +// into `CheckSet` objects, which are defined by the top-level policy. type Check struct { // AlwaysDeny: Optional. A special-case check that always denies. Note - // that this still only applies when the scope of the CheckSet applies + // that this still only applies when the scope of the `CheckSet` applies // and the image isn't exempted by an image allowlist. This check is // primarily useful for testing, or to set the default behavior for all // unmatched scopes to "deny". AlwaysDeny bool `json:"alwaysDeny,omitempty"` - // DisplayName: Optional. A user-provided name for this Check. This + // DisplayName: Optional. A user-provided name for this check. This // field has no effect on the policy evaluation behavior except to // improve readability of messages in evaluation results. DisplayName string `json:"displayName,omitempty"` - // ImageAllowlist: Optional. Images exempted from this Check. If any of + // ImageAllowlist: Optional. Images exempted from this check. If any of // the patterns match the image url, the check will not be evaluated. ImageAllowlist *ImageAllowlist `json:"imageAllowlist,omitempty"` @@ -646,9 +660,9 @@ type Check struct { SimpleSigningAttestationCheck *SimpleSigningAttestationCheck `json:"simpleSigningAttestationCheck,omitempty"` // SlsaCheck: Optional. Require that an image was built by a trusted - // builder (such as Google Cloud Build or GitHub), meets requirements - // for Supply chain Levels for Software Artifacts (SLSA), and was built - // from a trusted source code repostitory. + // builder (such as Google Cloud Build), meets requirements for Supply + // chain Levels for Software Artifacts (SLSA), and was built from a + // trusted source code repostitory. SlsaCheck *SlsaCheck `json:"slsaCheck,omitempty"` // TrustedDirectoryCheck: Optional. Require that an image lives in a @@ -685,31 +699,31 @@ func (s *Check) MarshalJSON() ([]byte, error) { // CheckSet: A conjunction of policy checks, scoped to a particular // namespace or Kubernetes service account. In order for evaluation of a -// CheckSet to return "allowed" for a given image in a given Pod, one of -// the following conditions must be satisfied: * The image is explicitly -// exempted by an entry in `image_allowlist`, OR * ALL of the `checks` -// evaluate to "allowed". +// `CheckSet` to return "allowed" for a given image in a given Pod, one +// of the following conditions must be satisfied: * The image is +// explicitly exempted by an entry in `image_allowlist`, OR * ALL of the +// `checks` evaluate to "allowed". type CheckSet struct { // Checks: Optional. The checks to apply. The ultimate result of // evaluating the check set will be "allow" if and only if every check - // in 'checks' evaluates to "allow". If `checks` is empty, the default + // in `checks` evaluates to "allow". If `checks` is empty, the default // behavior is "always allow". Checks []*Check `json:"checks,omitempty"` - // DisplayName: Optional. A user-provided name for this CheckSet. This + // DisplayName: Optional. A user-provided name for this `CheckSet`. This // field has no effect on the policy evaluation behavior except to // improve readability of messages in evaluation results. DisplayName string `json:"displayName,omitempty"` - // ImageAllowlist: Optional. Images exempted from this CheckSet. If any - // of the patterns match the image being evaluated, no checks in the - // CheckSet will be evaluated. + // ImageAllowlist: Optional. Images exempted from this `CheckSet`. If + // any of the patterns match the image being evaluated, no checks in the + // `CheckSet` will be evaluated. ImageAllowlist *ImageAllowlist `json:"imageAllowlist,omitempty"` - // Scope: Optional. The scope to which this CheckSet applies. If unset + // Scope: Optional. The scope to which this `CheckSet` applies. If unset // or an empty string (the default), applies to all namespaces and - // service accounts. See the Scope message documentation for details on - // scoping rules. + // service accounts. See the `Scope` message documentation for details + // on scoping rules. Scope *Scope `json:"scope,omitempty"` // ForceSendFields is a list of field names (e.g. "Checks") to @@ -809,23 +823,24 @@ func (s *Expr) MarshalJSON() ([]byte, error) { // GkePolicy: A Binary Authorization policy for a GKE cluster. This is // one type of policy that can occur as a `PlatformPolicy`. type GkePolicy struct { - // CheckSets: Optional. The CheckSets to apply, scoped by namespace or - // namespace and service account. Exactly one CheckSet will be evaluated - // for a given Pod (unless the list is empty, in which case the behavior - // is "always allow"). If multiple CheckSets have scopes that match the - // namespace and service account of the Pod being evaluated, only the - // CheckSet with the MOST SPECIFIC scope will match. CheckSets must be - // listed in order of decreasing specificity, i.e. if a scope matches a - // given service account (which must include the namespace), it must - // come before a CheckSet with a scope matching just that namespace. - // This property is enforced by server-side validation. The purpose of - // this restriction is to ensure that if more than one CheckSet matches - // a given Pod, the CheckSet that will be evaluated will always be the - // first in the list to match (because if any other matches, it must be - // less specific). If `check_sets` is empty, the default behavior is to - // allow all images. If `check_sets` is non-empty, the last `check_sets` - // entry must always be a CheckSet with no scope set, i.e. a catchall to - // handle any situation not caught by the preceding CheckSets. + // CheckSets: Optional. The `CheckSet` objects to apply, scoped by + // namespace or namespace and service account. Exactly one `CheckSet` + // will be evaluated for a given Pod (unless the list is empty, in which + // case the behavior is "always allow"). If multiple `CheckSet` objects + // have scopes that match the namespace and service account of the Pod + // being evaluated, only the `CheckSet` with the MOST SPECIFIC scope + // will match. `CheckSet` objects must be listed in order of decreasing + // specificity, i.e. if a scope matches a given service account (which + // must include the namespace), it must come before a `CheckSet` with a + // scope matching just that namespace. This property is enforced by + // server-side validation. The purpose of this restriction is to ensure + // that if more than one `CheckSet` matches a given Pod, the `CheckSet` + // that will be evaluated will always be the first in the list to match + // (because if any other matches, it must be less specific). If + // `check_sets` is empty, the default behavior is to allow all images. + // If `check_sets` is non-empty, the last `check_sets` entry must always + // be a `CheckSet` with no scope set, i.e. a catchall to handle any + // situation not caught by the preceding `CheckSet` objects. CheckSets []*CheckSet `json:"checkSets,omitempty"` // ImageAllowlist: Optional. Images exempted from this policy. If any of @@ -1055,7 +1070,7 @@ func (s *Jwt) MarshalJSON() ([]byte, error) { } // ListAttestorsResponse: Response message for -// BinauthzManagementService.ListAttestors. +// BinauthzManagementServiceV1.ListAttestors. type ListAttestorsResponse struct { // Attestors: The list of attestors. Attestors []*Attestor `json:"attestors,omitempty"` @@ -1132,10 +1147,9 @@ func (s *ListPlatformPoliciesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PkixPublicKey: A public key in the PkixPublicKey format (see -// https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). -// Public keys of this type are typically textually encoded using the -// PEM format. +// PkixPublicKey: A public key in the PkixPublicKey format +// (https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of +// this type are typically textually encoded using the PEM format. type PkixPublicKey struct { // PublicKeyPem: A PEM-encoded public key, as described in // https://tools.ietf.org/html/rfc7468#section-13 @@ -1212,8 +1226,8 @@ func (s *PkixPublicKey) MarshalJSON() ([]byte, error) { // PkixPublicKeySet: A bundle of PKIX public keys, used to authenticate // attestation signatures. Generally, a signature is considered to be -// authenticated by a PkixPublicKeySet if any of the public keys verify -// it (i.e. it is an "OR" of the keys). +// authenticated by a `PkixPublicKeySet` if any of the public keys +// verify it (i.e. it is an "OR" of the keys). type PkixPublicKeySet struct { // PkixPublicKeys: Required. `pkix_public_keys` must have at least one // entry. @@ -1252,8 +1266,9 @@ type PlatformPolicy struct { // GkePolicy: Optional. GKE platform-specific policy. GkePolicy *GkePolicy `json:"gkePolicy,omitempty"` - // Name: Output only. The relative resource name of the BinAuthz - // platform policy, in the form of `projects/*/platforms/*/policies/*`. + // Name: Output only. The relative resource name of the Binary + // Authorization platform policy, in the form of + // `projects/*/platforms/*/policies/*`. Name string `json:"name,omitempty"` // UpdateTime: Output only. Time when the policy was last updated. @@ -1323,7 +1338,7 @@ type Policy struct { // // Possible values: // "GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED" - Not specified: - // DISABLE is assumed. + // `DISABLE` is assumed. // "ENABLE" - Enables system policy evaluation. // "DISABLE" - Disables system policy evaluation. GlobalPolicyEvaluationMode string `json:"globalPolicyEvaluationMode,omitempty"` @@ -1380,7 +1395,7 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Scope: A scope specifier for CheckSets. +// Scope: A scope specifier for `CheckSet` objects. type Scope struct { // KubernetesNamespace: Optional. Matches all Kubernetes service // accounts in the provided namespace, unless a more specific @@ -1388,7 +1403,7 @@ type Scope struct { KubernetesNamespace string `json:"kubernetesNamespace,omitempty"` // KubernetesServiceAccount: Optional. Matches a single Kubernetes - // service account, e.g. 'my-namespace:my-service-account'. + // service account, e.g. `my-namespace:my-service-account`. // `kubernetes_service_account` scope is always more specific than // `kubernetes_namespace` scope for the same namespace. KubernetesServiceAccount string `json:"kubernetesServiceAccount,omitempty"` @@ -1668,21 +1683,22 @@ type TrustedDirectoryCheck struct { // TrustedDirPatterns: Required. List of trusted directory patterns. A // pattern is in the form "registry/path/to/directory". The registry // domain part is defined as two or more dot-separated words, e.g., - // us.pkg.dev, or gcr.io. Additionally, * can be used in three ways as - // wildcards: 1. leading * to match varying prefixes in registry - // subdomain (useful for location prefixes); 2. trailing * after - // registry/ to match varying endings; 3. trailing ** after registry/ to - // match "/" as well. For example: -- gcr.io/my-project/my-repo is valid - // to match a single directory -- *-docker.pkg.dev/my-project/my-repo or - // *.gcr.io/my-project are valid to match varying prefixes -- - // gcr.io/my-project/* will match all direct directories in my-project - // -- gcr.io/my-project/** would match all directories in my-project -- - // gcr.i* is not allowed since the registry is not completely specified - // -- sub*domain.gcr.io/nginx is not valid because only leading * or - // trailing * are allowed. -- *pkg.dev/my-project/my-repo is not valid - // because leading * can only match subdomain -- **-docker.pkg.dev is - // not valid because one leading * is allowed, and that it cannot match - // "/" + // `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three + // ways as wildcards: 1. leading `*` to match varying prefixes in + // registry subdomain (useful for location prefixes); 2. trailing `*` + // after registry/ to match varying endings; 3. trailing `**` after + // registry/ to match "/" as well. For example: -- + // `gcr.io/my-project/my-repo` is valid to match a single directory -- + // `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are + // valid to match varying prefixes -- `gcr.io/my-project/*` will match + // all direct directories in `my-project` -- `gcr.io/my-project/**` + // would match all directories in `my-project` -- `gcr.i*` is not + // allowed since the registry is not completely specified -- + // `sub*domain.gcr.io/nginx` is not valid because only leading `*` or + // trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not + // valid because leading `*` can only match subdomain -- + // `**-docker.pkg.dev` is not valid because one leading `*` is allowed, + // and that it cannot match `/` TrustedDirPatterns []string `json:"trustedDirPatterns,omitempty"` // ForceSendFields is a list of field names (e.g. "TrustedDirPatterns") @@ -1713,12 +1729,12 @@ func (s *TrustedDirectoryCheck) MarshalJSON() ([]byte, error) { // Attestation.Authority Note created by the user. type UserOwnedGrafeasNote struct { // DelegationServiceAccountEmail: Output only. This field will contain - // the service account email address that this Attestor will use as the + // the service account email address that this attestor will use as the // principal when querying Container Analysis. Attestor administrators // must grant this service account the IAM role needed to read // attestations from the note_reference in Container Analysis // (`containeranalysis.notes.occurrences.viewer`). This email address is - // fixed for the lifetime of the Attestor, but callers should not make + // fixed for the lifetime of the attestor, but callers should not make // any other assumptions about the service account email; future // versions may use an email based on a different naming pattern. DelegationServiceAccountEmail string `json:"delegationServiceAccountEmail,omitempty"` @@ -1768,9 +1784,9 @@ func (s *UserOwnedGrafeasNote) MarshalJSON() ([]byte, error) { // ValidationHelperV1.ValidateAttestationOccurrence. type ValidateAttestationOccurrenceRequest struct { // Attestation: Required. An AttestationOccurrence to be checked that it - // can be verified by the Attestor. It does not have to be an existing + // can be verified by the `Attestor`. It does not have to be an existing // entity in Container Analysis. It must otherwise be a valid - // AttestationOccurrence. + // `AttestationOccurrence`. Attestation *AttestationOccurrence `json:"attestation,omitempty"` // OccurrenceNote: Required. The resource name of the Note to which the @@ -1859,8 +1875,8 @@ type VerificationRule struct { AttestationSource *AttestationSource `json:"attestationSource,omitempty"` // ConfigBasedBuildRequired: If true, require the image to be built from - // a top-level configuration. trusted_source_repo patterns specifies the - // repositories containing this configuration. + // a top-level configuration. `trusted_source_repo_patterns` specifies + // the repositories containing this configuration. ConfigBasedBuildRequired bool `json:"configBasedBuildRequired,omitempty"` // TrustedBuilder: Each verification rule is used for evaluation against @@ -1878,20 +1894,21 @@ type VerificationRule struct { // TrustedSourceRepoPatterns: List of trusted source code repository URL // patterns. These patterns match the full repository URL without its - // scheme (e.g. "https://"). The patterns must not include schemes. For + // scheme (e.g. `https://`). The patterns must not include schemes. For // example, the pattern - // "source.cloud.google.com/my-project/my-repo-name" matches the - // following URLs: - "source.cloud.google.com/my-project/my-repo-name" - - // "git+ssh://source.cloud.google.com/my-project/my-repo-name" - - // "https://source.cloud.google.com/my-project/my-repo-name" A pattern - // matches a URL either exactly or with * wildcards. * can be used in - // only two ways: 1. trailing * after hosturi/ to match varying endings; - // 2. trailing ** after hosturi/ to match "/" as well. * and ** can only - // be used as wildcards and can only occur at the end of the pattern - // after a /. (So it's not possible to match a URL that contains literal - // *.) For example: - "github.com/my-project/my-repo" is valid to match - // a single repo - "github.com/my-project/*" will match all direct repos - // in my-project - "github.com/**" matches all repos in GitHub + // `source.cloud.google.com/my-project/my-repo-name` matches the + // following URLs: - `source.cloud.google.com/my-project/my-repo-name` - + // `git+ssh://source.cloud.google.com/my-project/my-repo-name` - + // `https://source.cloud.google.com/my-project/my-repo-name` A pattern + // matches a URL either exactly or with `*` wildcards. `*` can be used + // in only two ways: 1. trailing `*` after hosturi/ to match varying + // endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` + // and `**` can only be used as wildcards and can only occur at the end + // of the pattern after a `/`. (So it's not possible to match a URL that + // contains literal `*`.) For example: - `github.com/my-project/my-repo` + // is valid to match a single repo - `github.com/my-project/*` will + // match all direct repos in `my-project` - `github.com/**` matches all + // repos in GitHub TrustedSourceRepoPatterns []string `json:"trustedSourceRepoPatterns,omitempty"` // ForceSendFields is a list of field names (e.g. "AttestationSource") @@ -1922,8 +1939,8 @@ func (s *VerificationRule) MarshalJSON() ([]byte, error) { // images that violate the configured vulnerability rules. type VulnerabilityCheck struct { // AllowedCves: Optional. A list of specific CVEs to ignore even if the - // vulnerability level violates maximumUnfixableSeverity or - // maximumFixableSeverity. CVEs are listed in the format of Container + // vulnerability level violates `maximumUnfixableSeverity` or + // `maximumFixableSeverity`. CVEs are listed in the format of Container // Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The // CVEs are applicable regardless of note provider project, e.g., an // entry of `CVE-2021-20305` will allow vulnerabilities with a note name @@ -1933,8 +1950,8 @@ type VulnerabilityCheck struct { // BlockedCves: Optional. A list of specific CVEs to always raise // warnings about even if the vulnerability level meets - // maximumUnfixableSeverity or maximumFixableSeverity. CVEs are listed - // in the format of Container Analysis note id. For example: - + // `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are + // listed in the format of Container Analysis note id. For example: - // CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of // note provider project, e.g., an entry of `CVE-2021-20305` will block // vulnerabilities with a note name of either @@ -1945,7 +1962,7 @@ type VulnerabilityCheck struct { // ContainerAnalysisVulnerabilityProjects: Optional. The projects where // vulnerabilities are stored as Container Analysis Occurrences. Each // project is expressed in the resource format of - // `projects/[PROJECT_ID]`, e.g., projects/my-gcp-project. An attempt + // `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt // will be made for each project to fetch vulnerabilities, and all valid // vulnerabilities will be used to check against the vulnerability // policy. If no valid scan is found in all projects configured here, an @@ -2172,8 +2189,8 @@ type ProjectsUpdatePolicyCall struct { // UpdatePolicy: Creates or updates a project's policy, and returns a // copy of the new policy. A policy is always updated as a whole, to // avoid race conditions with concurrent policy enforcement (or -// management!) requests. Returns NOT_FOUND if the project does not -// exist, INVALID_ARGUMENT if the request is malformed. +// management!) requests. Returns `NOT_FOUND` if the project does not +// exist, `INVALID_ARGUMENT` if the request is malformed. // // - name: Output only. The resource name, in the format // `projects/*/policy`. There is at most one policy per project. @@ -2275,7 +2292,7 @@ func (c *ProjectsUpdatePolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er } return ret, nil // { - // "description": "Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.", + // "description": "Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed.", // "flatPath": "v1/projects/{projectsId}/policy", // "httpMethod": "PUT", // "id": "binaryauthorization.projects.updatePolicy", @@ -2317,8 +2334,8 @@ type ProjectsAttestorsCreateCall struct { } // Create: Creates an attestor, and returns a copy of the new attestor. -// Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if -// the request is malformed, ALREADY_EXISTS if the attestor already +// Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` +// if the request is malformed, `ALREADY_EXISTS` if the attestor already // exists. // // - parent: The parent of this attestor. @@ -2427,7 +2444,7 @@ func (c *ProjectsAttestorsCreateCall) Do(opts ...googleapi.CallOption) (*Attesto } return ret, nil // { - // "description": "Creates an attestor, and returns a copy of the new attestor. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the attestor already exists.", + // "description": "Creates an attestor, and returns a copy of the new attestor. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the attestor already exists.", // "flatPath": "v1/projects/{projectsId}/attestors", // "httpMethod": "POST", // "id": "binaryauthorization.projects.attestors.create", @@ -2472,7 +2489,7 @@ type ProjectsAttestorsDeleteCall struct { header_ http.Header } -// Delete: Deletes an attestor. Returns NOT_FOUND if the attestor does +// Delete: Deletes an attestor. Returns `NOT_FOUND` if the attestor does // not exist. // // - name: The name of the attestors to delete, in the format @@ -2569,7 +2586,7 @@ func (c *ProjectsAttestorsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, } return ret, nil // { - // "description": "Deletes an attestor. Returns NOT_FOUND if the attestor does not exist.", + // "description": "Deletes an attestor. Returns `NOT_FOUND` if the attestor does not exist.", // "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}", // "httpMethod": "DELETE", // "id": "binaryauthorization.projects.attestors.delete", @@ -2607,7 +2624,7 @@ type ProjectsAttestorsGetCall struct { header_ http.Header } -// Get: Gets an attestor. Returns NOT_FOUND if the attestor does not +// Get: Gets an attestor. Returns `NOT_FOUND` if the attestor does not // exist. // // - name: The name of the attestor to retrieve, in the format @@ -2717,7 +2734,7 @@ func (c *ProjectsAttestorsGetCall) Do(opts ...googleapi.CallOption) (*Attestor, } return ret, nil // { - // "description": "Gets an attestor. Returns NOT_FOUND if the attestor does not exist.", + // "description": "Gets an attestor. Returns `NOT_FOUND` if the attestor does not exist.", // "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}", // "httpMethod": "GET", // "id": "binaryauthorization.projects.attestors.get", @@ -2930,7 +2947,7 @@ type ProjectsAttestorsListCall struct { header_ http.Header } -// List: Lists attestors. Returns INVALID_ARGUMENT if the project does +// List: Lists attestors. Returns `INVALID_ARGUMENT` if the project does // not exist. // // - parent: The resource name of the project associated with the @@ -3057,7 +3074,7 @@ func (c *ProjectsAttestorsListCall) Do(opts ...googleapi.CallOption) (*ListAttes } return ret, nil // { - // "description": "Lists attestors. Returns INVALID_ARGUMENT if the project does not exist.", + // "description": "Lists attestors. Returns `INVALID_ARGUMENT` if the project does not exist.", // "flatPath": "v1/projects/{projectsId}/attestors", // "httpMethod": "GET", // "id": "binaryauthorization.projects.attestors.list", @@ -3424,7 +3441,7 @@ type ProjectsAttestorsUpdateCall struct { header_ http.Header } -// Update: Updates an attestor. Returns NOT_FOUND if the attestor does +// Update: Updates an attestor. Returns `NOT_FOUND` if the attestor does // not exist. // // - name: The resource name, in the format: `projects/*/attestors/*`. @@ -3527,7 +3544,7 @@ func (c *ProjectsAttestorsUpdateCall) Do(opts ...googleapi.CallOption) (*Attesto } return ret, nil // { - // "description": "Updates an attestor. Returns NOT_FOUND if the attestor does not exist.", + // "description": "Updates an attestor. Returns `NOT_FOUND` if the attestor does not exist.", // "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}", // "httpMethod": "PUT", // "id": "binaryauthorization.projects.attestors.update", @@ -3568,8 +3585,9 @@ type ProjectsAttestorsValidateAttestationOccurrenceCall struct { header_ http.Header } -// ValidateAttestationOccurrence: Returns whether the given Attestation -// for the given image URI was signed by the given Attestor +// ValidateAttestationOccurrence: Returns whether the given +// `Attestation` for the given image URI was signed by the given +// `Attestor` // // - attestor: The resource name of the Attestor of the occurrence, in // the format `projects/*/attestors/*`. @@ -3672,7 +3690,7 @@ func (c *ProjectsAttestorsValidateAttestationOccurrenceCall) Do(opts ...googleap } return ret, nil // { - // "description": "Returns whether the given Attestation for the given image URI was signed by the given Attestor", + // "description": "Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor`", // "flatPath": "v1/projects/{projectsId}/attestors/{attestorsId}:validateAttestationOccurrence", // "httpMethod": "POST", // "id": "binaryauthorization.projects.attestors.validateAttestationOccurrence", @@ -3714,11 +3732,11 @@ type ProjectsPlatformsPoliciesCreateCall struct { } // Create: Creates a platform policy, and returns a copy of it. Returns -// NOT_FOUND if the project or platform doesn't exist, INVALID_ARGUMENT -// if the request is malformed, ALREADY_EXISTS if the policy already -// exists, and INVALID_ARGUMENT if the policy contains a -// platform-specific policy that does not match the platform value -// specified in the URL. +// `NOT_FOUND` if the project or platform doesn't exist, +// `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if +// the policy already exists, and `INVALID_ARGUMENT` if the policy +// contains a platform-specific policy that does not match the platform +// value specified in the URL. // // - parent: The parent of this platform policy. func (r *ProjectsPlatformsPoliciesService) Create(parent string, platformpolicy *PlatformPolicy) *ProjectsPlatformsPoliciesCreateCall { @@ -3826,7 +3844,7 @@ func (c *ProjectsPlatformsPoliciesCreateCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Creates a platform policy, and returns a copy of it. Returns NOT_FOUND if the project or platform doesn't exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the policy already exists, and INVALID_ARGUMENT if the policy contains a platform-specific policy that does not match the platform value specified in the URL.", + // "description": "Creates a platform policy, and returns a copy of it. Returns `NOT_FOUND` if the project or platform doesn't exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the policy already exists, and `INVALID_ARGUMENT` if the policy contains a platform-specific policy that does not match the platform value specified in the URL.", // "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies", // "httpMethod": "POST", // "id": "binaryauthorization.projects.platforms.policies.create", @@ -3871,7 +3889,7 @@ type ProjectsPlatformsPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes a platform policy. Returns NOT_FOUND if the policy +// Delete: Deletes a platform policy. Returns `NOT_FOUND` if the policy // doesn't exist. // // - name: The name of the platform policy to delete, in the format @@ -3968,7 +3986,7 @@ func (c *ProjectsPlatformsPoliciesDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes a platform policy. Returns NOT_FOUND if the policy doesn't exist.", + // "description": "Deletes a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.", // "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies/{policiesId}", // "httpMethod": "DELETE", // "id": "binaryauthorization.projects.platforms.policies.delete", @@ -4006,8 +4024,8 @@ type ProjectsPlatformsPoliciesGetCall struct { header_ http.Header } -// Get: Gets a platform policy. Returns NOT_FOUND if the policy doesn't -// exist. +// Get: Gets a platform policy. Returns `NOT_FOUND` if the policy +// doesn't exist. // // - name: The name of the platform policy to retrieve in the format // `projects/*/platforms/*/policies/*`. @@ -4116,7 +4134,7 @@ func (c *ProjectsPlatformsPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Pl } return ret, nil // { - // "description": "Gets a platform policy. Returns NOT_FOUND if the policy doesn't exist.", + // "description": "Gets a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.", // "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies/{policiesId}", // "httpMethod": "GET", // "id": "binaryauthorization.projects.platforms.policies.get", @@ -4155,7 +4173,7 @@ type ProjectsPlatformsPoliciesListCall struct { } // List: Lists platform policies owned by a project in the specified -// platform. Returns INVALID_ARGUMENT if the project or the platform +// platform. Returns `INVALID_ARGUMENT` if the project or the platform // doesn't exist. // // - parent: The resource name of the platform associated with the @@ -4282,7 +4300,7 @@ func (c *ProjectsPlatformsPoliciesListCall) Do(opts ...googleapi.CallOption) (*L } return ret, nil // { - // "description": "Lists platform policies owned by a project in the specified platform. Returns INVALID_ARGUMENT if the project or the platform doesn't exist.", + // "description": "Lists platform policies owned by a project in the specified platform. Returns `INVALID_ARGUMENT` if the project or the platform doesn't exist.", // "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies", // "httpMethod": "GET", // "id": "binaryauthorization.projects.platforms.policies.list", @@ -4352,11 +4370,11 @@ type ProjectsPlatformsPoliciesReplacePlatformPolicyCall struct { header_ http.Header } -// ReplacePlatformPolicy: Replaces a platform policy. Returns NOT_FOUND -// if the policy doesn't exist. +// ReplacePlatformPolicy: Replaces a platform policy. Returns +// `NOT_FOUND` if the policy doesn't exist. // -// - name: Output only. The relative resource name of the BinAuthz -// platform policy, in the form of +// - name: Output only. The relative resource name of the Binary +// Authorization platform policy, in the form of // `projects/*/platforms/*/policies/*`. func (r *ProjectsPlatformsPoliciesService) ReplacePlatformPolicy(name string, platformpolicy *PlatformPolicy) *ProjectsPlatformsPoliciesReplacePlatformPolicyCall { c := &ProjectsPlatformsPoliciesReplacePlatformPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -4456,7 +4474,7 @@ func (c *ProjectsPlatformsPoliciesReplacePlatformPolicyCall) Do(opts ...googleap } return ret, nil // { - // "description": "Replaces a platform policy. Returns NOT_FOUND if the policy doesn't exist.", + // "description": "Replaces a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.", // "flatPath": "v1/projects/{projectsId}/platforms/{platformsId}/policies/{policiesId}", // "httpMethod": "PUT", // "id": "binaryauthorization.projects.platforms.policies.replacePlatformPolicy", @@ -4465,7 +4483,7 @@ func (c *ProjectsPlatformsPoliciesReplacePlatformPolicyCall) Do(opts ...googleap // ], // "parameters": { // "name": { - // "description": "Output only. The relative resource name of the BinAuthz platform policy, in the form of `projects/*/platforms/*/policies/*`.", + // "description": "Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.", // "location": "path", // "pattern": "^projects/[^/]+/platforms/[^/]+/policies/[^/]+$", // "required": true, diff --git a/binaryauthorization/v1beta1/binaryauthorization-api.json b/binaryauthorization/v1beta1/binaryauthorization-api.json index 596bb29db32..9d841acdbcb 100644 --- a/binaryauthorization/v1beta1/binaryauthorization-api.json +++ b/binaryauthorization/v1beta1/binaryauthorization-api.json @@ -399,7 +399,7 @@ ] }, "validateAttestationOccurrence": { - "description": "Returns whether the given Attestation for the given image URI was signed by the given Attestor", + "description": "Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor`", "flatPath": "v1beta1/projects/{projectsId}/attestors/{attestorsId}:validateAttestationOccurrence", "httpMethod": "POST", "id": "binaryauthorization.projects.attestors.validateAttestationOccurrence", @@ -551,7 +551,7 @@ } } }, - "revision": "20230804", + "revision": "20230901", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -1010,7 +1010,7 @@ "properties": { "attestation": { "$ref": "AttestationOccurrence", - "description": "Required. An AttestationOccurrence to be checked that it can be verified by the Attestor. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid AttestationOccurrence." + "description": "Required. An AttestationOccurrence to be checked that it can be verified by the `Attestor`. It does not have to be an existing entity in Container Analysis. It must otherwise be a valid `AttestationOccurrence`." }, "occurrenceNote": { "description": "Required. The resource name of the Note to which the containing Occurrence is associated.", diff --git a/binaryauthorization/v1beta1/binaryauthorization-gen.go b/binaryauthorization/v1beta1/binaryauthorization-gen.go index 1c6a38535ea..892ff832a49 100644 --- a/binaryauthorization/v1beta1/binaryauthorization-gen.go +++ b/binaryauthorization/v1beta1/binaryauthorization-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/binary-authorization/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // binaryauthorizationService, err := binaryauthorization.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // binaryauthorizationService, err := binaryauthorization.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // binaryauthorizationService, err := binaryauthorization.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package binaryauthorization // import "google.golang.org/api/binaryauthorization/v1beta1" import ( @@ -1159,9 +1172,9 @@ func (s *UserOwnedDrydockNote) MarshalJSON() ([]byte, error) { // ValidationHelperV1.ValidateAttestationOccurrence. type ValidateAttestationOccurrenceRequest struct { // Attestation: Required. An AttestationOccurrence to be checked that it - // can be verified by the Attestor. It does not have to be an existing + // can be verified by the `Attestor`. It does not have to be an existing // entity in Container Analysis. It must otherwise be a valid - // AttestationOccurrence. + // `AttestationOccurrence`. Attestation *AttestationOccurrence `json:"attestation,omitempty"` // OccurrenceNote: Required. The resource name of the Note to which the @@ -2799,8 +2812,9 @@ type ProjectsAttestorsValidateAttestationOccurrenceCall struct { header_ http.Header } -// ValidateAttestationOccurrence: Returns whether the given Attestation -// for the given image URI was signed by the given Attestor +// ValidateAttestationOccurrence: Returns whether the given +// `Attestation` for the given image URI was signed by the given +// `Attestor` // // - attestor: The resource name of the Attestor of the occurrence, in // the format `projects/*/attestors/*`. @@ -2903,7 +2917,7 @@ func (c *ProjectsAttestorsValidateAttestationOccurrenceCall) Do(opts ...googleap } return ret, nil // { - // "description": "Returns whether the given Attestation for the given image URI was signed by the given Attestor", + // "description": "Returns whether the given `Attestation` for the given image URI was signed by the given `Attestor`", // "flatPath": "v1beta1/projects/{projectsId}/attestors/{attestorsId}:validateAttestationOccurrence", // "httpMethod": "POST", // "id": "binaryauthorization.projects.attestors.validateAttestationOccurrence", diff --git a/blockchainnodeengine/v1/blockchainnodeengine-gen.go b/blockchainnodeengine/v1/blockchainnodeengine-gen.go index 9839b93b442..4ce2db1bb49 100644 --- a/blockchainnodeengine/v1/blockchainnodeengine-gen.go +++ b/blockchainnodeengine/v1/blockchainnodeengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/blockchain-node-engine // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // blockchainnodeengineService, err := blockchainnodeengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // blockchainnodeengineService, err := blockchainnodeengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // blockchainnodeengineService, err := blockchainnodeengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package blockchainnodeengine // import "google.golang.org/api/blockchainnodeengine/v1" import ( diff --git a/blogger/v2/blogger-gen.go b/blogger/v2/blogger-gen.go index 53744165640..9df5c319c81 100644 --- a/blogger/v2/blogger-gen.go +++ b/blogger/v2/blogger-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/blogger/docs/3.0/getting_started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // bloggerService, err := blogger.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bloggerService, err := blogger.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bloggerService, err := blogger.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package blogger // import "google.golang.org/api/blogger/v2" import ( diff --git a/blogger/v3/blogger-gen.go b/blogger/v3/blogger-gen.go index 0ca2c5ab940..aec4c4d83f8 100644 --- a/blogger/v3/blogger-gen.go +++ b/blogger/v3/blogger-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/blogger/docs/3.0/getting_started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // bloggerService, err := blogger.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // bloggerService, err := blogger.NewService(ctx, option.WithScopes(blogger.BloggerReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // bloggerService, err := blogger.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // bloggerService, err := blogger.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package blogger // import "google.golang.org/api/blogger/v3" import ( diff --git a/books/v1/books-gen.go b/books/v1/books-gen.go index 230bf2faa02..471eb5c252e 100644 --- a/books/v1/books-gen.go +++ b/books/v1/books-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://code.google.com/apis/books/docs/v1/getting_started.html // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // booksService, err := books.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // booksService, err := books.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // booksService, err := books.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package books // import "google.golang.org/api/books/v1" import ( diff --git a/businessprofileperformance/v1/businessprofileperformance-gen.go b/businessprofileperformance/v1/businessprofileperformance-gen.go index 7606b7bf17b..7127e4ee427 100644 --- a/businessprofileperformance/v1/businessprofileperformance-gen.go +++ b/businessprofileperformance/v1/businessprofileperformance-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // businessprofileperformanceService, err := businessprofileperformance.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // businessprofileperformanceService, err := businessprofileperformance.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // businessprofileperformanceService, err := businessprofileperformance.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package businessprofileperformance // import "google.golang.org/api/businessprofileperformance/v1" import ( diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go index b3bc355b648..ff70e771682 100644 --- a/calendar/v3/calendar-gen.go +++ b/calendar/v3/calendar-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/google-apps/calendar/firstapp // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // calendarService, err := calendar.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // calendarService, err := calendar.NewService(ctx, option.WithScopes(calendar.CalendarSettingsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // calendarService, err := calendar.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // calendarService, err := calendar.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package calendar // import "google.golang.org/api/calendar/v3" import ( diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 8912badeddf..2f813c7fd53 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -1122,7 +1122,7 @@ "type": "string" }, "trustConfigId": { - "description": "Required. A user-provided name of the TrustConfig.", + "description": "Required. A user-provided name of the TrustConfig. Must match the regexp `[a-z0-9-]{1,63}`.", "location": "query", "type": "string" } @@ -1280,7 +1280,7 @@ } } }, - "revision": "20230802", + "revision": "20230809", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index 2846be11692..5276c29768f 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/certificate-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // certificatemanagerService, err := certificatemanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // certificatemanagerService, err := certificatemanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // certificatemanagerService, err := certificatemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package certificatemanager // import "google.golang.org/api/certificatemanager/v1" import ( @@ -6634,7 +6647,8 @@ func (r *ProjectsLocationsTrustConfigsService) Create(parent string, trustconfig } // TrustConfigId sets the optional parameter "trustConfigId": Required. -// A user-provided name of the TrustConfig. +// A user-provided name of the TrustConfig. Must match the regexp +// `[a-z0-9-]{1,63}`. func (c *ProjectsLocationsTrustConfigsCreateCall) TrustConfigId(trustConfigId string) *ProjectsLocationsTrustConfigsCreateCall { c.urlParams_.Set("trustConfigId", trustConfigId) return c @@ -6747,7 +6761,7 @@ func (c *ProjectsLocationsTrustConfigsCreateCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "trustConfigId": { - // "description": "Required. A user-provided name of the TrustConfig.", + // "description": "Required. A user-provided name of the TrustConfig. Must match the regexp `[a-z0-9-]{1,63}`.", // "location": "query", // "type": "string" // } diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 5f1312104f3..d2332e5d058 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -178,7 +178,7 @@ "supportsMediaDownload": true }, "upload": { - "description": "Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload). Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.create` authorization scope. You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?\u0026co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).", + "description": "Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload). Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?\u0026co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).", "flatPath": "v1/spaces/{spacesId}/attachments:upload", "httpMethod": "POST", "id": "chat.media.upload", @@ -229,7 +229,7 @@ "spaces": { "methods": { "create": { - "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces", "httpMethod": "POST", "id": "chat.spaces.create", @@ -255,7 +255,7 @@ ] }, "delete": { - "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/chat/api/guides/v1/spaces/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who has permission to delete the space, and the `chat.delete` scope.", + "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/chat/api/guides/v1/spaces/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who has permission to delete the space.", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "DELETE", "id": "chat.spaces.delete", @@ -304,7 +304,7 @@ ] }, "get": { - "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope.", + "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "GET", "id": "chat.spaces.get", @@ -331,7 +331,7 @@ ] }, "list": { - "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/chat/api/guides/v1/spaces/list). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", + "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/chat/api/guides/v1/spaces/list). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", "flatPath": "v1/spaces", "httpMethod": "GET", "id": "chat.spaces.list", @@ -365,7 +365,7 @@ ] }, "patch": { - "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/chat/api/guides/v1/spaces/update). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces` scope.", + "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/chat/api/guides/v1/spaces/update). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}", "httpMethod": "PATCH", "id": "chat.spaces.patch", @@ -400,7 +400,7 @@ ] }, "setup": { - "description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + "description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces:setup", "httpMethod": "POST", "id": "chat.spaces.setup", @@ -423,7 +423,7 @@ "members": { "methods": { "create": { - "description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [ Create a membership](https://developers.google.com/chat/api/guides/v1/members/create). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for app membership) scope. To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.", + "description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [ Create a membership](https://developers.google.com/chat/api/guides/v1/members/create). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.", "flatPath": "v1/spaces/{spacesId}/members", "httpMethod": "POST", "id": "chat.spaces.members.create", @@ -453,7 +453,7 @@ ] }, "delete": { - "description": "Deletes a membership. For an example, see [Delete a membership](https://developers.google.com/chat/api/guides/v1/members/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` or `chat.memberships.app` authorization scope.", + "description": "Deletes a membership. For an example, see [Delete a membership](https://developers.google.com/chat/api/guides/v1/members/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}/members/{membersId}", "httpMethod": "DELETE", "id": "chat.spaces.members.delete", @@ -479,7 +479,7 @@ ] }, "get": { - "description": "Returns details about a membership. For an example, see [Get a membership](https://developers.google.com/chat/api/guides/v1/members/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", + "description": "Returns details about a membership. For an example, see [Get a membership](https://developers.google.com/chat/api/guides/v1/members/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}/members/{membersId}", "httpMethod": "GET", "id": "chat.spaces.members.get", @@ -506,7 +506,7 @@ ] }, "list": { - "description": "Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", + "description": "Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}/members", "httpMethod": "GET", "id": "chat.spaces.members.list", @@ -558,7 +558,7 @@ "messages": { "methods": { "create": { - "description": "Creates a message. For an example, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Creating a text message supports both [user authentication](https://developers.google.com/chat/api/guides/auth/users) and [app authentication] (https://developers.google.com/chat/api/guides/auth/service-accounts). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Creating a card message only supports and requires [app authentication] (https://developers.google.com/chat/api/guides/auth/service-accounts). Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.", + "description": "Creates a message in a Google Chat space. For an example, see [Create a message](https://developers.google.com/chat/api/guides/v1/messages/create). Calling this method requires [authentication](https://developers.google.com/chat/api/guides/auth) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)", "flatPath": "v1/spaces/{spacesId}/messages", "httpMethod": "POST", "id": "chat.spaces.messages.create", @@ -620,7 +620,7 @@ ] }, "delete": { - "description": "Deletes a message. For an example, see [Delete a message](https://developers.google.com/chat/api/guides/v1/messages/delete). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only delete messages created by the calling Chat app.", + "description": "Deletes a message. For an example, see [Delete a message](https://developers.google.com/chat/api/guides/v1/messages/delete). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Requests authenticated with service accounts can only delete messages created by the calling Chat app.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "DELETE", "id": "chat.spaces.messages.delete", @@ -652,7 +652,7 @@ ] }, "get": { - "description": "Returns details about a message. For an example, see [Read a message](https://developers.google.com/chat/api/guides/v1/messages/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.readonly` authorization scope. Note: Might return a message from a blocked member or space.", + "description": "Returns details about a message. For an example, see [Read a message](https://developers.google.com/chat/api/guides/v1/messages/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Note: Might return a message from a blocked member or space.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "GET", "id": "chat.spaces.messages.get", @@ -679,7 +679,7 @@ ] }, "list": { - "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope.", + "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}/messages", "httpMethod": "GET", "id": "chat.spaces.messages.list", @@ -732,7 +732,7 @@ ] }, "patch": { - "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only update messages created by the calling Chat app.", + "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Requests authenticated with service accounts can only update messages created by the calling Chat app.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "PATCH", "id": "chat.spaces.messages.patch", @@ -773,7 +773,7 @@ ] }, "update": { - "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only update messages created by the calling Chat app.", + "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Requests authenticated with service accounts can only update messages created by the calling Chat app.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "PUT", "id": "chat.spaces.messages.update", @@ -847,7 +847,7 @@ "reactions": { "methods": { "create": { - "description": "Creates a reaction and adds it to a message. For an example, see [Create a reaction](https://developers.google.com/chat/api/guides/v1/reactions/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages`, `chat.messages.reactions`, or `chat.messages.reactions.create` scope. Only unicode emoji are supported.", + "description": "Creates a reaction and adds it to a message. For an example, see [Create a reaction](https://developers.google.com/chat/api/guides/v1/reactions/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). Only unicode emoji are supported.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", "httpMethod": "POST", "id": "chat.spaces.messages.reactions.create", @@ -878,7 +878,7 @@ ] }, "delete": { - "description": "Deletes a reaction to a message. For an example, see [Delete a reaction](https://developers.google.com/chat/api/guides/v1/reactions/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.reactions` scope.", + "description": "Deletes a reaction to a message. For an example, see [Delete a reaction](https://developers.google.com/chat/api/guides/v1/reactions/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions/{reactionsId}", "httpMethod": "DELETE", "id": "chat.spaces.messages.reactions.delete", @@ -905,7 +905,7 @@ ] }, "list": { - "description": "Lists reactions to a message. For an example, see [List reactions](https://developers.google.com/chat/api/guides/v1/reactions/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, or `chat.messages.reactions.readonly` scope.", + "description": "Lists reactions to a message. For an example, see [List reactions](https://developers.google.com/chat/api/guides/v1/reactions/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", "httpMethod": "GET", "id": "chat.spaces.messages.reactions.list", @@ -955,7 +955,7 @@ } } }, - "revision": "20230816", + "revision": "20230905", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -1062,7 +1062,7 @@ "type": "object" }, "Annotation": { - "description": "Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```", + "description": "Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see [Format text messages](https://developers.google.com/chat/api/guides/message-formats/text#format-texts). Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```", "id": "Annotation", "properties": { "length": { @@ -1273,15 +1273,15 @@ "type": "object" }, "CardWithId": { - "description": "Widgets for Chat apps to specify.", + "description": "A [card](https://developers.google.com/chat/api/reference/rest/v1/cards) in a Google Chat message. Only Chat apps can create cards. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the message can't contain cards.", "id": "CardWithId", "properties": { "card": { "$ref": "GoogleAppsCardV1Card", - "description": "Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use this card to present detailed information, gather information from users, and guide users to take a next step." + "description": "A card. Maximum size is 32 KB." }, "cardId": { - "description": "Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message.", + "description": "Required if the message contains multiple cards. A unique identifier for a card in a message.", "type": "string" } }, @@ -1496,12 +1496,12 @@ "type": "object" }, "DeprecatedEvent": { - "description": "Google Chat app interaction events. To learn about interaction events, see [Receive and respond to Google Chat app interaction events](https://developers.google.com/chat/api/guides/message-formats).", + "description": "A Google Chat app interaction event. To learn about interaction events, see [Receive and respond to interactions with your Google Chat app](https://developers.google.com/chat/api/guides/message-formats). To learn about event types and for example event payloads, see [Types of Google Chat app interaction events](https://developers.google.com/chat/api/guides/message-formats/events).", "id": "DeprecatedEvent", "properties": { "action": { "$ref": "FormAction", - "description": "The form action data associated with an interactive card that was clicked. Only populated for CARD_CLICKED events. See the [Interactive Cards guide](/chat/how-tos/cards-onclick) for more information." + "description": "For `CARD_CLICKED` interaction events, the form action data associated when a user clicks a card or dialog. To learn more, see [Read form data input by users on cards](https://developers.google.com/chat/ui/read-form-data)." }, "common": { "$ref": "CommonEventObject", @@ -1520,10 +1520,10 @@ "CANCEL_DIALOG" ], "enumDescriptions": [ - "This could be used when the corresponding interaction event is not dialog related. For example an @mention.", - "Any user action that opens a [dialog](https://developers.google.com/chat/how-tos/dialogs).", - "A card click interaction event from a [dialog](https://developers.google.com/chat/how-tos/dialogs).", - "The [dialog](https://developers.google.com/chat/how-tos/dialogs) was cancelled." + "Default value. Unspecified.", + "A user opens a dialog.", + "A user clicks an interactive element of a dialog. For example, a user fills out information in a dialog and clicks a button to submit the information.", + "A user closes a dialog without submitting information, or the dialog is canceled." ], "type": "string" }, @@ -1533,7 +1533,7 @@ "type": "string" }, "isDialogEvent": { - "description": "True when the interaction event is related to [dialogs](https://developers.google.com/chat/how-tos/dialogs).", + "description": "For `CARD_CLICKED` interaction events, whether the user interacted with a [dialog](https://developers.google.com/chat/how-tos/dialogs).", "type": "boolean" }, "message": { @@ -1553,7 +1553,7 @@ "type": "string" }, "type": { - "description": "The type of the interaction event.", + "description": "The type of interaction event. For details, see [Types of Google Chat app interaction events](https://developers.google.com/chat/api/guides/message-formats/events).", "enum": [ "UNSPECIFIED", "MESSAGE", @@ -1563,10 +1563,10 @@ ], "enumDescriptions": [ "Default value for the enum. DO NOT USE.", - "A message was sent in a space.", - "The Chat app was added to a space by a Chat user or Workspace administrator.", - "The Chat app was removed from a space by a Chat user or Workspace administrator.", - "The Chat app's interactive card was clicked." + "A user sends the Chat app a message, or invokes the Chat app in a space.", + "A user adds the Chat app to a space, or a Google Workspace administrator installs the Chat app in direct message spaces for users in their organization.", + "A user removes the Chat app from a space.", + "A user clicks an interactive element of a card or dialog from a Chat app, such as a button. If a user interacts with a dialog, the `CARD_CLICKED` interaction event's `isDialogEvent` field is set to `true` and includes a [`DialogEventType`](https://developers.google.com/chat/api/reference/rest/v1/DialogEventType)." ], "type": "string" }, @@ -1807,7 +1807,7 @@ "type": "object" }, "GoogleAppsCardV1Card": { - "description": "Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. In Google Chat, cards appear in several places: - As stand-alone messages. - Accompanying a text message, just beneath the text message. - As a [dialog](https://developers.google.com/chat/how-tos/dialogs). Only Google Chat apps can create card messages in Google Chat. If your Chat app uses [user authentication](https://developers.google.com/chat/api/guides/auth/users) to send messages on behalf of users, the messages can't contain cards. The following example JSON creates a \"contact card\" that features: - A header with the contact's name, job title, and avatar picture. - A section with the contact information, including formatted text. - Buttons that users can click to share the contact, or see more or less information. For more examples, see [Design dynamic, interactive, and consistent UIs with cards](https://developers.google.com/chat/ui). ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) ``` { \"cardsV2\": [ { \"cardId\": \"unique-card-id\", \"card\": { \"header\": { \"title\": \"Sasha\", \"subtitle\": \"Software Engineer\", \"imageUrl\": \"https://developers.google.com/chat/images/quickstart-app-avatar.png\", \"imageType\": \"CIRCLE\", \"imageAltText\": \"Avatar for Sasha\", }, \"sections\": [ { \"header\": \"Contact Info\", \"collapsible\": true, \"uncollapsibleWidgetsCount\": 1, \"widgets\": [ { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"EMAIL\", }, \"text\": \"sasha@example.com\", } }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PERSON\", }, \"text\": \"Online\", }, }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PHONE\", }, \"text\": \"+1 (555) 555-1234\", } }, { \"buttonList\": { \"buttons\": [ { \"text\": \"Share\", \"onClick\": { \"openLink\": { \"url\": \"https://example.com/share\", } } }, { \"text\": \"Edit\", \"onClick\": { \"action\": { \"function\": \"goToView\", \"parameters\": [ { \"key\": \"viewType\", \"value\": \"EDIT\", } ], } } }, ], } }, ], }, ], }, } ], } ```", + "description": "A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design dynamic, interactive, and consistent UIs with cards](https://developers.google.com/chat/ui). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { \"cardsV2\": [ { \"cardId\": \"unique-card-id\", \"card\": { \"header\": { \"title\": \"Sasha\", \"subtitle\": \"Software Engineer\", \"imageUrl\": \"https://developers.google.com/chat/images/quickstart-app-avatar.png\", \"imageType\": \"CIRCLE\", \"imageAltText\": \"Avatar for Sasha\", }, \"sections\": [ { \"header\": \"Contact Info\", \"collapsible\": true, \"uncollapsibleWidgetsCount\": 1, \"widgets\": [ { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"EMAIL\", }, \"text\": \"sasha@example.com\", } }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PERSON\", }, \"text\": \"Online\", }, }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PHONE\", }, \"text\": \"+1 (555) 555-1234\", } }, { \"buttonList\": { \"buttons\": [ { \"text\": \"Share\", \"onClick\": { \"openLink\": { \"url\": \"https://example.com/share\", } } }, { \"text\": \"Edit\", \"onClick\": { \"action\": { \"function\": \"goToView\", \"parameters\": [ { \"key\": \"viewType\", \"value\": \"EDIT\", } ], } } }, ], } }, ], }, ], }, } ], } ```", "id": "GoogleAppsCardV1Card", "properties": { "cardActions": { @@ -2814,7 +2814,7 @@ "type": "object" }, "Inputs": { - "description": "Types of data inputs for widgets. Users enter data with these inputs.", + "description": "Types of data that users can enter on cards or dialogs. To learn how to process information from users, see [Read form data input by users on cards](https://developers.google.com/chat/ui/read-form-data).", "id": "Inputs", "properties": { "dateInput": { @@ -3074,10 +3074,10 @@ "NOT_A_MEMBER" ], "enumDescriptions": [ - "Default, don't use.", - "The user has joined the space.", - "The user has been invited, is able to join the space, but currently hasn't joined.", - "The user isn't a member of the space, hasn't been invited and isn't able to join the space." + "Default value. Don't use.", + "The user is added to the space, and can participate in the space.", + "The user is invited to join the space, but hasn't joined it.", + "The user doesn't belong to the space and doesn't have a pending invitation to join the space." ], "readOnly": true, "type": "string" @@ -3086,7 +3086,7 @@ "type": "object" }, "Message": { - "description": "A message in Google Chat.", + "description": "A message in a Google Chat space.", "id": "Message", "properties": { "actionResponse": { @@ -3130,7 +3130,7 @@ "type": "array" }, "cardsV2": { - "description": "Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input widgets. Cards are usually displayed below the text body of a Chat message, but can situationally appear other places, such as [dialogs](https://developers.google.com/chat/how-tos/dialogs). Each card can have a maximum size of 32 KB. The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList` - `Divider` - `TextInput` - `SelectionInput` - `Grid`", + "description": "An array of [cards](https://developers.google.com/chat/api/reference/rest/v1/cards). Only Chat apps can create cards. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the messages can't contain cards. To learn about cards and how to create them, see [Design dynamic, interactive, and consistent UIs with cards](https://developers.google.com/chat/ui).", "items": { "$ref": "CardWithId" }, @@ -3203,7 +3203,7 @@ "description": "If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [space](https://developers.google.com/chat/api/reference/rest/v1/spaces) `name`." }, "text": { - "description": "Plain-text body of the message. The first link to an image, video, or web page generates a preview chip. You can also @mention a Google Chat user, or everyone in the space. To learn about creating text messages, see [Create a text message](https://developers.google.com/chat/api/guides/message-formats/text).", + "description": "Plain-text body of the message. The first link to an image, video, or web page generates a [preview chip](https://developers.google.com/chat/how-tos/preview-links). You can also [@mention a Google Chat user](https://developers.google.com/chat/api/guides/message-formats/text#messages-@mention), or everyone in the space. To learn about creating text messages, see [Create a text message](https://developers.google.com/chat/api/guides/message-formats/text).", "type": "string" }, "thread": { @@ -3565,15 +3565,15 @@ "type": "object" }, "Thread": { - "description": "A thread in a Google Chat space. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", + "description": "A thread in a Google Chat space. For example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread). If you specify a thread when creating a message, you can set the [`messageReplyOption`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) field to determine what happens if no matching thread is found.", "id": "Thread", "properties": { "name": { - "description": "Resource name of the thread. Example: `spaces/{space}/threads/{thread}`", + "description": "Output only. Resource name of the thread. Example: `spaces/{space}/threads/{thread}`", "type": "string" }, "threadKey": { - "description": "Optional. ID for the thread. Supports up to 4000 characters. Input for creating or updating a thread. Otherwise, output only.", + "description": "Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread `name` field instead.", "type": "string" } }, diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index bf80c6a70b5..9c7017fc383 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/hangouts/chat // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // chatService, err := chat.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // chatService, err := chat.NewService(ctx, option.WithScopes(chat.ChatSpacesReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // chatService, err := chat.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // chatService, err := chat.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package chat // import "google.golang.org/api/chat/v1" import ( @@ -480,13 +494,16 @@ func (s *ActionStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Annotation: Annotations associated with the plain-text body of the -// message. Example plain-text message body: ``` Hello @FooBot how are -// you!" ``` The corresponding annotations metadata: ``` -// "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, -// "userMention": { "user": { "name":"users/{user}", -// "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", -// "type":"BOT" }, "type":"MENTION" } }] ``` +// Annotation: Output only. Annotations associated with the plain-text +// body of the message. To add basic formatting to a text message, see +// Format text messages +// (https://developers.google.com/chat/api/guides/message-formats/text#format-texts). +// Example plain-text message body: ``` Hello @FooBot how are you!" ``` +// The corresponding annotations metadata: ``` "annotations":[{ +// "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { +// "user": { "name":"users/{user}", "displayName":"FooBot", +// "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" +// } }] ``` type Annotation struct { // Length: Length of the substring in the plain-text message body this // annotation corresponds to. @@ -812,16 +829,18 @@ func (s *CardHeader) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CardWithId: Widgets for Chat apps to specify. +// CardWithId: A card +// (https://developers.google.com/chat/api/reference/rest/v1/cards) in a +// Google Chat message. Only Chat apps can create cards. If your Chat +// app authenticates as a user +// (https://developers.google.com/chat/api/guides/auth/users), the +// message can't contain cards. type CardWithId struct { - // Card: Cards support a defined layout, interactive UI elements like - // buttons, and rich media like images. Use this card to present - // detailed information, gather information from users, and guide users - // to take a next step. + // Card: A card. Maximum size is 32 KB. Card *GoogleAppsCardV1Card `json:"card,omitempty"` - // CardId: Required for `cardsV2` messages. Chat app-specified - // identifier for this widget. Scoped within a message. + // CardId: Required if the message contains multiple cards. A unique + // identifier for a card in a message. CardId string `json:"cardId,omitempty"` // ForceSendFields is a list of field names (e.g. "Card") to @@ -1260,15 +1279,18 @@ func (s *DeletionMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// DeprecatedEvent: Google Chat app interaction events. To learn about -// interaction events, see Receive and respond to Google Chat app -// interaction events -// (https://developers.google.com/chat/api/guides/message-formats). +// DeprecatedEvent: A Google Chat app interaction event. To learn about +// interaction events, see Receive and respond to interactions with your +// Google Chat app +// (https://developers.google.com/chat/api/guides/message-formats). To +// learn about event types and for example event payloads, see Types of +// Google Chat app interaction events +// (https://developers.google.com/chat/api/guides/message-formats/events). type DeprecatedEvent struct { - // Action: The form action data associated with an interactive card that - // was clicked. Only populated for CARD_CLICKED events. See the - // Interactive Cards guide (/chat/how-tos/cards-onclick) for more - // information. + // Action: For `CARD_CLICKED` interaction events, the form action data + // associated when a user clicks a card or dialog. To learn more, see + // Read form data input by users on cards + // (https://developers.google.com/chat/ui/read-form-data). Action *FormAction `json:"action,omitempty"` // Common: Represents information about the user's client, such as @@ -1290,22 +1312,21 @@ type DeprecatedEvent struct { // event received. // // Possible values: - // "TYPE_UNSPECIFIED" - This could be used when the corresponding - // interaction event is not dialog related. For example an @mention. - // "REQUEST_DIALOG" - Any user action that opens a - // [dialog](https://developers.google.com/chat/how-tos/dialogs). - // "SUBMIT_DIALOG" - A card click interaction event from a - // [dialog](https://developers.google.com/chat/how-tos/dialogs). - // "CANCEL_DIALOG" - The - // [dialog](https://developers.google.com/chat/how-tos/dialogs) was - // cancelled. + // "TYPE_UNSPECIFIED" - Default value. Unspecified. + // "REQUEST_DIALOG" - A user opens a dialog. + // "SUBMIT_DIALOG" - A user clicks an interactive element of a dialog. + // For example, a user fills out information in a dialog and clicks a + // button to submit the information. + // "CANCEL_DIALOG" - A user closes a dialog without submitting + // information, or the dialog is canceled. DialogEventType string `json:"dialogEventType,omitempty"` // EventTime: The timestamp indicating when the interaction event // occurred. EventTime string `json:"eventTime,omitempty"` - // IsDialogEvent: True when the interaction event is related to dialogs + // IsDialogEvent: For `CARD_CLICKED` interaction events, whether the + // user interacted with a dialog // (https://developers.google.com/chat/how-tos/dialogs). IsDialogEvent bool `json:"isDialogEvent,omitempty"` @@ -1332,16 +1353,24 @@ type DeprecatedEvent struct { // (https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat). Token string `json:"token,omitempty"` - // Type: The type of the interaction event. + // Type: The type of interaction event. For details, see Types of Google + // Chat app interaction events + // (https://developers.google.com/chat/api/guides/message-formats/events). // // Possible values: // "UNSPECIFIED" - Default value for the enum. DO NOT USE. - // "MESSAGE" - A message was sent in a space. - // "ADDED_TO_SPACE" - The Chat app was added to a space by a Chat user - // or Workspace administrator. - // "REMOVED_FROM_SPACE" - The Chat app was removed from a space by a - // Chat user or Workspace administrator. - // "CARD_CLICKED" - The Chat app's interactive card was clicked. + // "MESSAGE" - A user sends the Chat app a message, or invokes the + // Chat app in a space. + // "ADDED_TO_SPACE" - A user adds the Chat app to a space, or a Google + // Workspace administrator installs the Chat app in direct message + // spaces for users in their organization. + // "REMOVED_FROM_SPACE" - A user removes the Chat app from a space. + // "CARD_CLICKED" - A user clicks an interactive element of a card or + // dialog from a Chat app, such as a button. If a user interacts with a + // dialog, the `CARD_CLICKED` interaction event's `isDialogEvent` field + // is set to `true` and includes a + // [`DialogEventType`](https://developers.google.com/chat/api/reference/r + // est/v1/DialogEventType). Type string `json:"type,omitempty"` // User: The user that triggered the interaction event. @@ -1842,27 +1871,22 @@ func (s *GoogleAppsCardV1ButtonList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAppsCardV1Card: Cards support a defined layout, interactive UI -// elements like buttons, and rich media like images. Use cards to -// present detailed information, gather information from users, and -// guide users to take a next step. In Google Chat, cards appear in -// several places: - As stand-alone messages. - Accompanying a text -// message, just beneath the text message. - As a dialog -// (https://developers.google.com/chat/how-tos/dialogs). Only Google -// Chat apps can create card messages in Google Chat. If your Chat app -// uses user authentication -// (https://developers.google.com/chat/api/guides/auth/users) to send -// messages on behalf of users, the messages can't contain cards. The -// following example JSON creates a "contact card" that features: - A -// header with the contact's name, job title, and avatar picture. - A -// section with the contact information, including formatted text. - -// Buttons that users can click to share the contact, or see more or -// less information. For more examples, see Design dynamic, interactive, -// and consistent UIs with cards -// (https://developers.google.com/chat/ui). !Example contact card -// (https://developers.google.com/chat/images/card_api_reference.png) -// ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": -// { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": +// GoogleAppsCardV1Card: A card interface displayed in a Google Chat +// message or Google Workspace Add-on. Cards support a defined layout, +// interactive UI elements like buttons, and rich media like images. Use +// cards to present detailed information, gather information from users, +// and guide users to take a next step. To learn how to build cards, see +// the following documentation: * For Google Chat apps, see Design +// dynamic, interactive, and consistent UIs with cards +// (https://developers.google.com/chat/ui). * For Google Workspace +// Add-ons, see Card-based interfaces +// (https://developers.google.com/apps-script/add-ons/concepts/cards). +// **Example: Card message for a Google Chat app** !Example contact card +// (https://developers.google.com/chat/images/card_api_reference.png) To +// create the sample card message in Google Chat, use the following +// JSON: ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { +// "header": { "title": "Sasha", "subtitle": "Software Engineer", +// "imageUrl": // "https://developers.google.com/chat/images/quickstart-app-avatar.png", // // "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha", }, @@ -3631,8 +3655,10 @@ func (s *ImageButton) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Inputs: Types of data inputs for widgets. Users enter data with these -// inputs. +// Inputs: Types of data that users can enter on cards or dialogs. To +// learn how to process information from users, see Read form data input +// by users on cards +// (https://developers.google.com/chat/ui/read-form-data). type Inputs struct { // DateInput: Date input values. DateInput *DateInput `json:"dateInput,omitempty"` @@ -4013,12 +4039,13 @@ type Membership struct { // State: Output only. State of the membership. // // Possible values: - // "MEMBERSHIP_STATE_UNSPECIFIED" - Default, don't use. - // "JOINED" - The user has joined the space. - // "INVITED" - The user has been invited, is able to join the space, - // but currently hasn't joined. - // "NOT_A_MEMBER" - The user isn't a member of the space, hasn't been - // invited and isn't able to join the space. + // "MEMBERSHIP_STATE_UNSPECIFIED" - Default value. Don't use. + // "JOINED" - The user is added to the space, and can participate in + // the space. + // "INVITED" - The user is invited to join the space, but hasn't + // joined it. + // "NOT_A_MEMBER" - The user doesn't belong to the space and doesn't + // have a pending invitation to join the space. State string `json:"state,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4048,7 +4075,7 @@ func (s *Membership) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Message: A message in Google Chat. +// Message: A message in a Google Chat space. type Message struct { // ActionResponse: Input only. Parameters that a Chat app can use to // configure how its response is posted. @@ -4076,17 +4103,13 @@ type Message struct { // `cards_v2` can have a maximum size of 32 KB. Cards []*Card `json:"cards,omitempty"` - // CardsV2: Richly formatted and interactive cards that display UI - // elements and editable widgets, such as: - Formatted text - Buttons - - // Clickable images - Checkboxes - Radio buttons - Input widgets. Cards - // are usually displayed below the text body of a Chat message, but can - // situationally appear other places, such as dialogs - // (https://developers.google.com/chat/how-tos/dialogs). Each card can - // have a maximum size of 32 KB. The `cardId` is a unique identifier - // among cards in the same message and for identifying user input - // values. Currently supported widgets include: - `TextParagraph` - - // `DecoratedText` - `Image` - `ButtonList` - `Divider` - `TextInput` - - // `SelectionInput` - `Grid` + // CardsV2: An array of cards + // (https://developers.google.com/chat/api/reference/rest/v1/cards). + // Only Chat apps can create cards. If your Chat app authenticates as a + // user (https://developers.google.com/chat/api/guides/auth/users), the + // messages can't contain cards. To learn about cards and how to create + // them, see Design dynamic, interactive, and consistent UIs with cards + // (https://developers.google.com/chat/ui). CardsV2 []*CardWithId `json:"cardsV2,omitempty"` // ClientAssignedMessageId: A custom name for a Chat message assigned at @@ -4169,9 +4192,12 @@ type Message struct { Space *Space `json:"space,omitempty"` // Text: Plain-text body of the message. The first link to an image, - // video, or web page generates a preview chip. You can also @mention a - // Google Chat user, or everyone in the space. To learn about creating - // text messages, see Create a text message + // video, or web page generates a preview chip + // (https://developers.google.com/chat/how-tos/preview-links). You can + // also @mention a Google Chat user + // (https://developers.google.com/chat/api/guides/message-formats/text#messages-@mention), + // or everyone in the space. To learn about creating text messages, see + // Create a text message // (https://developers.google.com/chat/api/guides/message-formats/text). Text string `json:"text,omitempty"` @@ -4859,15 +4885,23 @@ func (s *TextParagraph) MarshalJSON() ([]byte, error) { // Thread: A thread in a Google Chat space. For example usage, see Start // or reply to a message thread -// (https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). +// (https://developers.google.com/chat/api/guides/v1/messages/create#create-message-thread). +// If you specify a thread when creating a message, you can set the +// `messageReplyOption` +// (https://developers.google.com/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) +// field to determine what happens if no matching thread is found. type Thread struct { - // Name: Resource name of the thread. Example: + // Name: Output only. Resource name of the thread. Example: // `spaces/{space}/threads/{thread}` Name string `json:"name,omitempty"` - // ThreadKey: Optional. ID for the thread. Supports up to 4000 - // characters. Input for creating or updating a thread. Otherwise, - // output only. + // ThreadKey: Optional. Input for creating or updating a thread. + // Otherwise, output only. ID for the thread. Supports up to 4000 + // characters. This ID is unique to the Chat app that sets it. For + // example, if multiple Chat apps create a message using the same thread + // key, the messages are posted in different threads. To reply in a + // thread created by a person or another Chat app, specify the thread + // `name` field instead. ThreadKey string `json:"threadKey,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to @@ -5338,10 +5372,9 @@ type MediaUploadCall struct { // file attachment // (https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload). // Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.messages` or `chat.messages.create` authorization scope. You -// can upload attachments up to 200 MB. Certain file types aren't -// supported. For details, see File types blocked by Google Chat +// (https://developers.google.com/chat/api/guides/auth/users). You can +// upload attachments up to 200 MB. Certain file types aren't supported. +// For details, see File types blocked by Google Chat // (https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat). // // - parent: Resource name of the Chat space in which the attachment is @@ -5511,7 +5544,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*UploadAttachmentRes } return ret, nil // { - // "description": "Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload). Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.create` authorization scope. You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?\u0026co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).", + // "description": "Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/chat/api/guides/v1/media-and-attachments/upload). Requires user [authentication](https://developers.google.com/chat/api/guides/auth/users). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?\u0026co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).", // "flatPath": "v1/spaces/{spacesId}/attachments:upload", // "httpMethod": "POST", // "id": "chat.media.upload", @@ -5577,8 +5610,7 @@ type SpacesCreateCall struct { // try a different `displayName`. An existing space within the Google // Workspace organization might already use this display name. Requires // user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.spaces.create` or `chat.spaces` scope. +// (https://developers.google.com/chat/api/guides/auth/users). func (r *SpacesService) Create(space *Space) *SpacesCreateCall { c := &SpacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.space = space @@ -5683,7 +5715,7 @@ func (c *SpacesCreateCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + // "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces", // "httpMethod": "POST", // "id": "chat.spaces.create", @@ -5728,8 +5760,7 @@ type SpacesDeleteCall struct { // (https://developers.google.com/chat/api/guides/v1/spaces/delete). // Requires user authentication // (https://developers.google.com/chat/api/guides/auth/users) from a -// user who has permission to delete the space, and the `chat.delete` -// scope. +// user who has permission to delete the space. // // - name: Resource name of the space to delete. Format: // `spaces/{space}`. @@ -5825,7 +5856,7 @@ func (c *SpacesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { } return ret, nil // { - // "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/chat/api/guides/v1/spaces/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who has permission to delete the space, and the `chat.delete` scope.", + // "description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see [Delete a space](https://developers.google.com/chat/api/guides/v1/spaces/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) from a user who has permission to delete the space.", // "flatPath": "v1/spaces/{spacesId}", // "httpMethod": "DELETE", // "id": "chat.spaces.delete", @@ -6042,8 +6073,7 @@ type SpacesGetCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.spaces` or `chat.spaces.readonly` authorization scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - name: Resource name of the space, in the form "spaces/*". Format: // `spaces/{space}`. @@ -6152,7 +6182,7 @@ func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope.", + // "description": "Returns details about a space. For an example, see [Get a space](https://developers.google.com/chat/api/guides/v1/spaces/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}", // "httpMethod": "GET", // "id": "chat.spaces.get", @@ -6200,10 +6230,9 @@ type SpacesListCall struct { // service account authentication // (https://developers.google.com/chat/api/guides/auth/service-accounts) // and user authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.spaces` or `chat.spaces.readonly` authorization scope. -// Lists spaces visible to the caller or authenticated user. Group chats -// and DMs aren't listed until the first message is sent. +// (https://developers.google.com/chat/api/guides/auth/users). Lists +// spaces visible to the caller or authenticated user. Group chats and +// DMs aren't listed until the first message is sent. func (r *SpacesService) List() *SpacesListCall { c := &SpacesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -6346,7 +6375,7 @@ func (c *SpacesListCall) Do(opts ...googleapi.CallOption) (*ListSpacesResponse, } return ret, nil // { - // "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/chat/api/guides/v1/spaces/list). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.spaces` or `chat.spaces.readonly` authorization scope. Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", + // "description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/chat/api/guides/v1/spaces/list). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.", // "flatPath": "v1/spaces", // "httpMethod": "GET", // "id": "chat.spaces.list", @@ -6420,8 +6449,7 @@ type SpacesPatchCall struct { // `ALREADY_EXISTS`, try a different display name.. An existing space // within the Google Workspace organization might already use this // display name. Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.spaces` scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - name: Resource name of the space. Format: `spaces/{space}`. func (r *SpacesService) Patch(name string, space *Space) *SpacesPatchCall { @@ -6550,7 +6578,7 @@ func (c *SpacesPatchCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/chat/api/guides/v1/spaces/update). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces` scope.", + // "description": "Updates a space. For an example, see [Update a space](https://developers.google.com/chat/api/guides/v1/spaces/update). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}", // "httpMethod": "PATCH", // "id": "chat.spaces.patch", @@ -6629,8 +6657,7 @@ type SpacesSetupCall struct { // try a different `displayName`. An existing space within the Google // Workspace organization might already use this display name. Requires // user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.spaces.create` or `chat.spaces` scope. +// (https://developers.google.com/chat/api/guides/auth/users). func (r *SpacesService) Setup(setupspacerequest *SetUpSpaceRequest) *SpacesSetupCall { c := &SpacesSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.setupspacerequest = setupspacerequest @@ -6725,7 +6752,7 @@ func (c *SpacesSetupCall) Do(opts ...googleapi.CallOption) (*Space, error) { } return ret, nil // { - // "description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.", + // "description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces:setup", // "httpMethod": "POST", // "id": "chat.spaces.setup", @@ -6766,20 +6793,18 @@ type SpacesMembersCreateCall struct { // the space invitation before joining. Otherwise, creating a membership // adds the member directly to the specified space. Requires user // authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.memberships` (for human membership) or `chat.memberships.app` -// (for app membership) scope. To specify the member to add, set the -// `membership.member.name` in the `CreateMembershipRequest`: - To add -// the calling app to a space or a direct message between two human -// users, use `users/app`. Unable to add other apps to the space. - To -// add a human user, use `users/{user}`, where `{user}` can be the email -// address for the user. For users in the same Workspace organization -// `{user}` can also be the `{person_id}` for the person from the People -// API, or the `id` for the user in the Directory API. For example, if -// the People API Person `resourceName` for `user@example.com` is -// `people/123456789`, you can add the user to the space by setting the -// `membership.member.name` to `users/user@example.com` or -// `users/123456789`. +// (https://developers.google.com/chat/api/guides/auth/users). To +// specify the member to add, set the `membership.member.name` in the +// `CreateMembershipRequest`: - To add the calling app to a space or a +// direct message between two human users, use `users/app`. Unable to +// add other apps to the space. - To add a human user, use +// `users/{user}`, where `{user}` can be the email address for the user. +// For users in the same Workspace organization `{user}` can also be the +// `{person_id}` for the person from the People API, or the `id` for the +// user in the Directory API. For example, if the People API Person +// `resourceName` for `user@example.com` is `people/123456789`, you can +// add the user to the space by setting the `membership.member.name` to +// `users/user@example.com` or `users/123456789`. // // - parent: The resource name of the space for which to create the // membership. Format: spaces/{space}. @@ -6881,7 +6906,7 @@ func (c *SpacesMembersCreateCall) Do(opts ...googleapi.CallOption) (*Membership, } return ret, nil // { - // "description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [ Create a membership](https://developers.google.com/chat/api/guides/v1/members/create). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for app membership) scope. To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.", + // "description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [ Create a membership](https://developers.google.com/chat/api/guides/v1/members/create). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.", // "flatPath": "v1/spaces/{spacesId}/members", // "httpMethod": "POST", // "id": "chat.spaces.members.create", @@ -6926,8 +6951,7 @@ type SpacesMembersDeleteCall struct { // Delete: Deletes a membership. For an example, see Delete a membership // (https://developers.google.com/chat/api/guides/v1/members/delete). // Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.memberships` or `chat.memberships.app` authorization scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - name: Resource name of the membership to delete. Chat apps can // delete human users' or their own memberships. Chat apps can't @@ -7032,7 +7056,7 @@ func (c *SpacesMembersDeleteCall) Do(opts ...googleapi.CallOption) (*Membership, } return ret, nil // { - // "description": "Deletes a membership. For an example, see [Delete a membership](https://developers.google.com/chat/api/guides/v1/members/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` or `chat.memberships.app` authorization scope.", + // "description": "Deletes a membership. For an example, see [Delete a membership](https://developers.google.com/chat/api/guides/v1/members/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}/members/{membersId}", // "httpMethod": "DELETE", // "id": "chat.spaces.members.delete", @@ -7081,9 +7105,7 @@ type SpacesMembersGetCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.memberships` or `chat.memberships.readonly` authorization -// scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - name: Resource name of the membership to retrieve. To get the app's // own membership, you can optionally use @@ -7199,7 +7221,7 @@ func (c *SpacesMembersGetCall) Do(opts ...googleapi.CallOption) (*Membership, er } return ret, nil // { - // "description": "Returns details about a membership. For an example, see [Get a membership](https://developers.google.com/chat/api/guides/v1/members/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", + // "description": "Returns details about a membership. For an example, see [Get a membership](https://developers.google.com/chat/api/guides/v1/members/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}/members/{membersId}", // "httpMethod": "GET", // "id": "chat.spaces.members.get", @@ -7256,9 +7278,7 @@ type SpacesMembersListCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.memberships` or `chat.memberships.readonly` authorization -// scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - parent: The resource name of the space for which to fetch a // membership list. Format: spaces/{space}. @@ -7419,7 +7439,7 @@ func (c *SpacesMembersListCall) Do(opts ...googleapi.CallOption) (*ListMembershi } return ret, nil // { - // "description": "Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.memberships` or `chat.memberships.readonly` authorization scope.", + // "description": "Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}/members", // "httpMethod": "GET", // "id": "chat.spaces.members.list", @@ -7501,24 +7521,15 @@ type SpacesMessagesCreateCall struct { header_ http.Header } -// Create: Creates a message. For an example, see Create a message -// (https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). -// Requires authentication -// (https://developers.google.com/chat/api/guides/auth). Creating a text -// message supports both user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and [app -// authentication] -// (https://developers.google.com/chat/api/guides/auth/service-accounts). -// User authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` or `chat.messages.create` authorization scope. -// Creating a card message only supports and requires [app -// authentication] -// (https://developers.google.com/chat/api/guides/auth/service-accounts). -// Because Chat provides authentication for webhooks -// (https://developers.google.com/chat/how-tos/webhooks) as part of the -// URL that's generated when a webhook is registered, webhooks can -// create messages without a service account or user authentication. +// Create: Creates a message in a Google Chat space. For an example, see +// Create a message +// (https://developers.google.com/chat/api/guides/v1/messages/create). +// Calling this method requires authentication +// (https://developers.google.com/chat/api/guides/auth) and supports the +// following authentication types: - For text messages, user +// authentication or app authentication are supported. - For card +// messages, only app authentication is supported. (Only Chat apps can +// create card messages.) // // - parent: The resource name of the space in which to create a // message. Format: `spaces/{space}`. @@ -7680,7 +7691,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Creates a message. For an example, see [Create a message](https://developers.google.com/chat/api/guides/crudl/messages#create_a_message). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Creating a text message supports both [user authentication](https://developers.google.com/chat/api/guides/auth/users) and [app authentication] (https://developers.google.com/chat/api/guides/auth/service-accounts). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.create` authorization scope. Creating a card message only supports and requires [app authentication] (https://developers.google.com/chat/api/guides/auth/service-accounts). Because Chat provides authentication for [webhooks](https://developers.google.com/chat/how-tos/webhooks) as part of the URL that's generated when a webhook is registered, webhooks can create messages without a service account or user authentication.", + // "description": "Creates a message in a Google Chat space. For an example, see [Create a message](https://developers.google.com/chat/api/guides/v1/messages/create). Calling this method requires [authentication](https://developers.google.com/chat/api/guides/auth) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)", // "flatPath": "v1/spaces/{spacesId}/messages", // "httpMethod": "POST", // "id": "chat.spaces.messages.create", @@ -7763,10 +7774,9 @@ type SpacesMessagesDeleteCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` authorization scope. Requests authenticated with -// service accounts can only delete messages created by the calling Chat -// app. +// (https://developers.google.com/chat/api/guides/auth/users). Requests +// authenticated with service accounts can only delete messages created +// by the calling Chat app. // // - name: Resource name of the message that you want to delete, in the // form `spaces/*/messages/*` Example: @@ -7875,7 +7885,7 @@ func (c *SpacesMessagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, err } return ret, nil // { - // "description": "Deletes a message. For an example, see [Delete a message](https://developers.google.com/chat/api/guides/v1/messages/delete). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only delete messages created by the calling Chat app.", + // "description": "Deletes a message. For an example, see [Delete a message](https://developers.google.com/chat/api/guides/v1/messages/delete). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Requests authenticated with service accounts can only delete messages created by the calling Chat app.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "DELETE", // "id": "chat.spaces.messages.delete", @@ -7930,9 +7940,8 @@ type SpacesMessagesGetCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` or `chat.messages.readonly` authorization scope. -// Note: Might return a message from a blocked member or space. +// (https://developers.google.com/chat/api/guides/auth/users). Note: +// Might return a message from a blocked member or space. // // - name: Resource name of the message to retrieve. Format: // `spaces/{space}/messages/{message}` If the message begins with @@ -8046,7 +8055,7 @@ func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, erro } return ret, nil // { - // "description": "Returns details about a message. For an example, see [Read a message](https://developers.google.com/chat/api/guides/v1/messages/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` or `chat.messages.readonly` authorization scope. Note: Might return a message from a blocked member or space.", + // "description": "Returns details about a message. For an example, see [Read a message](https://developers.google.com/chat/api/guides/v1/messages/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Note: Might return a message from a blocked member or space.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "GET", // "id": "chat.spaces.messages.get", @@ -8090,8 +8099,7 @@ type SpacesMessagesListCall struct { // including messages from blocked members and spaces. For an example, // see List messages (/chat/api/guides/v1/messages/list). Requires user // authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.messages` or `chat.messages.readonly` authorization scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - parent: The resource name of the space to list messages from. // Format: `spaces/{space}`. @@ -8267,7 +8275,7 @@ func (c *SpacesMessagesListCall) Do(opts ...googleapi.CallOption) (*ListMessages } return ret, nil // { - // "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope.", + // "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}/messages", // "httpMethod": "GET", // "id": "chat.spaces.messages.list", @@ -8366,10 +8374,9 @@ type SpacesMessagesPatchCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` authorization scope. Requests authenticated with -// service accounts can only update messages created by the calling Chat -// app. +// (https://developers.google.com/chat/api/guides/auth/users). Requests +// authenticated with service accounts can only update messages created +// by the calling Chat app. // // - name: Resource name in the form `spaces/*/messages/*`. Example: // `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. @@ -8494,7 +8501,7 @@ func (c *SpacesMessagesPatchCall) Do(opts ...googleapi.CallOption) (*Message, er } return ret, nil // { - // "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only update messages created by the calling Chat app.", + // "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Requests authenticated with service accounts can only update messages created by the calling Chat app.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "PATCH", // "id": "chat.spaces.messages.patch", @@ -8560,10 +8567,9 @@ type SpacesMessagesUpdateCall struct { // and user authentication // (https://developers.google.com/chat/api/guides/auth/users). User // authentication -// (https://developers.google.com/chat/api/guides/auth/users) requires -// the `chat.messages` authorization scope. Requests authenticated with -// service accounts can only update messages created by the calling Chat -// app. +// (https://developers.google.com/chat/api/guides/auth/users). Requests +// authenticated with service accounts can only update messages created +// by the calling Chat app. // // - name: Resource name in the form `spaces/*/messages/*`. Example: // `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. @@ -8688,7 +8694,7 @@ func (c *SpacesMessagesUpdateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only update messages created by the calling Chat app.", + // "description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User authentication](https://developers.google.com/chat/api/guides/auth/users). Requests authenticated with service accounts can only update messages created by the calling Chat app.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "PUT", // "id": "chat.spaces.messages.update", @@ -8899,10 +8905,8 @@ type SpacesMessagesReactionsCreateCall struct { // see Create a reaction // (https://developers.google.com/chat/api/guides/v1/reactions/create). // Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.messages`, `chat.messages.reactions`, or -// `chat.messages.reactions.create` scope. Only unicode emoji are -// supported. +// (https://developers.google.com/chat/api/guides/auth/users). Only +// unicode emoji are supported. // // - parent: The message where the reaction is created. Format: // `spaces/{space}/messages/{message}`. @@ -9004,7 +9008,7 @@ func (c *SpacesMessagesReactionsCreateCall) Do(opts ...googleapi.CallOption) (*R } return ret, nil // { - // "description": "Creates a reaction and adds it to a message. For an example, see [Create a reaction](https://developers.google.com/chat/api/guides/v1/reactions/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages`, `chat.messages.reactions`, or `chat.messages.reactions.create` scope. Only unicode emoji are supported.", + // "description": "Creates a reaction and adds it to a message. For an example, see [Create a reaction](https://developers.google.com/chat/api/guides/v1/reactions/create). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). Only unicode emoji are supported.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", // "httpMethod": "POST", // "id": "chat.spaces.messages.reactions.create", @@ -9051,8 +9055,7 @@ type SpacesMessagesReactionsDeleteCall struct { // reaction // (https://developers.google.com/chat/api/guides/v1/reactions/delete). // Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and the -// `chat.messages` or `chat.messages.reactions` scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - name: Name of the reaction to delete. Format: // `spaces/{space}/messages/{message}/reactions/{reaction}`. @@ -9148,7 +9151,7 @@ func (c *SpacesMessagesReactionsDeleteCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "Deletes a reaction to a message. For an example, see [Delete a reaction](https://developers.google.com/chat/api/guides/v1/reactions/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.reactions` scope.", + // "description": "Deletes a reaction to a message. For an example, see [Delete a reaction](https://developers.google.com/chat/api/guides/v1/reactions/delete). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions/{reactionsId}", // "httpMethod": "DELETE", // "id": "chat.spaces.messages.reactions.delete", @@ -9192,9 +9195,7 @@ type SpacesMessagesReactionsListCall struct { // reactions // (https://developers.google.com/chat/api/guides/v1/reactions/list). // Requires user authentication -// (https://developers.google.com/chat/api/guides/auth/users) and -// `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, -// or `chat.messages.reactions.readonly` scope. +// (https://developers.google.com/chat/api/guides/auth/users). // // - parent: The message users reacted to. Format: // `spaces/{space}/messages/{message}`. @@ -9353,7 +9354,7 @@ func (c *SpacesMessagesReactionsListCall) Do(opts ...googleapi.CallOption) (*Lis } return ret, nil // { - // "description": "Lists reactions to a message. For an example, see [List reactions](https://developers.google.com/chat/api/guides/v1/reactions/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and `chat.messages`, `chat.messages.readonly`, `chat.messages.reactions`, or `chat.messages.reactions.readonly` scope.", + // "description": "Lists reactions to a message. For an example, see [List reactions](https://developers.google.com/chat/api/guides/v1/reactions/list). Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions", // "httpMethod": "GET", // "id": "chat.spaces.messages.reactions.list", diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json index 0588abb3072..77211359ae3 100644 --- a/checks/v1alpha/checks-api.json +++ b/checks/v1alpha/checks-api.json @@ -99,6 +99,63 @@ "accounts": { "resources": { "apps": { + "methods": { + "get": { + "description": "Gets an app.", + "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}", + "httpMethod": "GET", + "id": "checks.accounts.apps.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the app. Example: `accounts/123/apps/456`", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleChecksAccountV1alphaApp" + } + }, + "list": { + "description": "Lists the apps under the given account.", + "flatPath": "v1alpha/accounts/{accountsId}/apps", + "httpMethod": "GET", + "id": "checks.accounts.apps.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of results to return. The server may further constrain the maximum number of results returned in a single page. If unspecified, the server will decide the number of results to be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token received from a previous `ListApps` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent account. Example: `accounts/123`", + "location": "path", + "pattern": "^accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/apps", + "response": { + "$ref": "GoogleChecksAccountV1alphaListAppsResponse" + } + } + }, "resources": { "operations": { "methods": { @@ -235,15 +292,131 @@ } } } + }, + "reports": { + "methods": { + "get": { + "description": "Gets a report. By default, only the name and results_uri fields are returned. You can include other fields by listing them in the `fields` URL query parameter. For example, `?fields=name,checks` will return the name and checks fields.", + "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/reports/{reportsId}", + "httpMethod": "GET", + "id": "checks.accounts.apps.reports.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "checksFilter": { + "description": "Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter checks within the report. Only checks that match the filter string are included in the response. Example: `state = FAILED`", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Resource name of the report. Example: `accounts/123/apps/456/reports/789`", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+/reports/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleChecksReportV1alphaReport" + } + }, + "list": { + "description": "Lists reports for the specified app. By default, only the name and results_uri fields are returned. You can include other fields by listing them in the `fields` URL query parameter. For example, `?fields=reports(name,checks)` will return the name and checks fields.", + "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/reports", + "httpMethod": "GET", + "id": "checks.accounts.apps.reports.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "checksFilter": { + "description": "Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter checks within reports. Only checks that match the filter string are included in the response. Example: `state = FAILED`", + "location": "query", + "type": "string" + }, + "filter": { + "description": "Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter reports. Example: `appBundle.releaseType = PRE_RELEASE`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of reports to return. If unspecified, at most 10 reports will be returned. The maximum value is 50; values above 50 will be coerced to 50.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token received from a previous `ListReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReports` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the app. Example: `accounts/123/apps/456`", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/reports", + "response": { + "$ref": "GoogleChecksReportV1alphaListReportsResponse" + } + } + } } } } } }, + "media": { + "methods": { + "upload": { + "description": "Analyzes the uploaded app bundle and returns a google.longrunning.Operation containing the generated Report. ## Example (upload only) Send a regular POST request with the header `X-Goog-Upload-Protocol: raw`. ``` POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1 X-Goog-Upload-Protocol: raw Content-Length: Content-Type: application/octet-stream ``` ## Example (upload with metadata) Send a multipart POST request where the first body part contains the metadata JSON and the second body part contains the binary upload. Include the header `X-Goog-Upload-Protocol: multipart`. ``` POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1 X-Goog-Upload-Protocol: multipart Content-Length: ? Content-Type: multipart/related; boundary=BOUNDARY --BOUNDARY Content-Type: application/json {\"code_reference_id\":\"db5bcc20f94055fb5bc08cbb9b0e7a5530308786\"} --BOUNDARY --BOUNDARY-- ``` *Note:* Metadata-only requests are not supported. ", + "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/reports:analyzeUpload", + "httpMethod": "POST", + "id": "checks.media.upload", + "mediaUpload": { + "accept": [ + "*/*" + ], + "maxSize": "10737418240", + "protocols": { + "simple": { + "multipart": true, + "path": "/upload/v1alpha/{+parent}/reports:analyzeUpload" + } + } + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of the app. Example: `accounts/123/apps/456`", + "location": "path", + "pattern": "^accounts/[^/]+/apps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/reports:analyzeUpload", + "request": { + "$ref": "GoogleChecksReportV1alphaAnalyzeUploadRequest" + }, + "response": { + "$ref": "Operation" + }, + "supportsMediaUpload": true + } + } + }, "privacypolicy": { "methods": { "analyze": { - "description": "Analyzes the privacy policy of the given policy URL or content.", + "description": "Performs a synchronous analysis of a privacy policy, where the policy content is mapped to privacy categories, data types, and purposes.", "flatPath": "v1alpha/privacypolicy:analyze", "httpMethod": "POST", "id": "checks.privacypolicy.analyze", @@ -404,44 +577,44 @@ } } }, - "revision": "20230801", + "revision": "20230906", "rootUrl": "https://checks.googleapis.com/", "schemas": { "AnalyzePrivacyPolicyRequest": { - "description": "The request proto for AnalyzePrivacyPolicy method.", + "description": "Request for the AnalyzePrivacyPolicy method.", "id": "AnalyzePrivacyPolicyRequest", "properties": { "privacyPolicyPageContent": { - "description": "Web page raw HTML content for the privacy policy page to be analyzed. Useful when the client wants to analyze a privacy policy already fetched.", + "description": "The HTML content of the privacy policy. This is useful if you'd like to manage the crawling and rendering of the privacy policy.", "type": "string" }, "privacyPolicyUri": { - "description": "URL for the privacy policy page to be analyzed. https://linter.aip.dev/140/uri (Use `uri` instead of `url` in field name)", + "description": "The URI that points to the web page for the privacy policy.", "type": "string" } }, "type": "object" }, "AnalyzePrivacyPolicyResponse": { - "description": "The response proto for AnalyzePrivacyPolicy method.", + "description": "Response containing the analyzed privacy policy for the AnalyzePrivacyPolicy method.", "id": "AnalyzePrivacyPolicyResponse", "properties": { "dataPurposeAnnotations": { - "description": "List of all data types in the privacy policy.", + "description": "A list of detected purposes in the privacy policy.", "items": { "$ref": "PolicyPurposeOfUseAnnotation" }, "type": "array" }, "dataTypeAnnotations": { - "description": "List of all data types in the privacy policy.", + "description": "A list of detected data types in the privacy policy.", "items": { "$ref": "PolicyDataTypeAnnotation" }, "type": "array" }, "htmlContent": { - "description": "HTML content for the privacy policy page.", + "description": "HTML content for the privacy policy page. The byte offsets in each annotated section will match this content.", "type": "string" }, "lastUpdatedDateInfo": { @@ -449,7 +622,7 @@ "description": "Information about the date when the privacy policy was last updated." }, "sectionAnnotations": { - "description": "List of all sections in the privacy policy.", + "description": "A list of detected topics in the privacy policy.", "items": { "$ref": "PolicySectionAnnotation" }, @@ -493,7 +666,7 @@ "type": "object" }, "FindPrivacyPolicyResponse": { - "description": "Operation response for `FindPrivacyPolicy`.", + "description": "Response containing the analyzed privacy policy for the FindPrivacyPolicy method.", "id": "FindPrivacyPolicyResponse", "properties": { "privacyPolicy": { @@ -503,6 +676,1208 @@ }, "type": "object" }, + "GoogleChecksAccountV1alphaApp": { + "description": "Represents an app in Checks.", + "id": "GoogleChecksAccountV1alphaApp", + "properties": { + "name": { + "description": "The resource name of the app. Example: `accounts/123/apps/456`", + "type": "string" + }, + "title": { + "description": "The app's title.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksAccountV1alphaListAppsResponse": { + "description": "The response message for AccountService.ListApps.", + "id": "GoogleChecksAccountV1alphaListAppsResponse", + "properties": { + "apps": { + "description": "The apps.", + "items": { + "$ref": "GoogleChecksAccountV1alphaApp" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaAnalyzeUploadRequest": { + "description": "The request message for ReportService.AnalyzeUpload.", + "id": "GoogleChecksReportV1alphaAnalyzeUploadRequest", + "properties": { + "codeReferenceId": { + "description": "Optional. Git commit hash or changelist number associated with the upload.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaAppBundle": { + "description": "Information about the analyzed app bundle.", + "id": "GoogleChecksReportV1alphaAppBundle", + "properties": { + "bundleId": { + "description": "Unique id of the bundle. For example: \"com.google.Gmail\".", + "type": "string" + }, + "codeReferenceId": { + "description": "Git commit hash or changelist number associated with the release.", + "type": "string" + }, + "releaseType": { + "description": "Identifies the type of release.", + "enum": [ + "APP_BUNDLE_RELEASE_TYPE_UNSPECIFIED", + "PUBLIC", + "PRE_RELEASE" + ], + "enumDescriptions": [ + "Not specified.", + "Published production bundle.", + "Pre-release bundle." + ], + "type": "string" + }, + "version": { + "description": "The user-visible version of the bundle such as the Android `versionName` or iOS `CFBundleShortVersionString`. For example: \"7.21.1\".", + "type": "string" + }, + "versionId": { + "description": "The version used throughout the operating system and store to identify the build such as the Android `versionCode` or iOS `CFBundleVersion`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheck": { + "description": "A check that was run on your app.", + "id": "GoogleChecksReportV1alphaCheck", + "properties": { + "citations": { + "description": "Regulations and policies that serve as the legal basis for the check.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckCitation" + }, + "type": "array" + }, + "evidence": { + "$ref": "GoogleChecksReportV1alphaCheckEvidence", + "description": "Evidence that substantiates the check result." + }, + "regionCodes": { + "description": "Regions that are impacted by the check. For more info, see https://google.aip.dev/143#countries-and-regions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "severity": { + "description": "The urgency or risk level of the check.", + "enum": [ + "CHECK_SEVERITY_UNSPECIFIED", + "PRIORITY", + "POTENTIAL", + "OPPORTUNITY" + ], + "enumDescriptions": [ + "Not specified.", + "Important privacy issue.", + "Potential privacy issue.", + "Opportunity to improve privacy coverage." + ], + "type": "string" + }, + "state": { + "description": "The result after running the check.", + "enum": [ + "CHECK_STATE_UNSPECIFIED", + "PASSED", + "FAILED", + "UNCHECKED" + ], + "enumDescriptions": [ + "Not specified.", + "The check passed.", + "The check failed.", + "The check was not run." + ], + "type": "string" + }, + "stateMetadata": { + "$ref": "GoogleChecksReportV1alphaCheckStateMetadata", + "description": "Additional information about the check state in relation to past reports." + }, + "type": { + "description": "The type of check that was run. A type will only appear once in a report's list of checks.", + "enum": [ + "CHECK_TYPE_UNSPECIFIED", + "STORE_LISTING_PRIVACY_POLICY_LINK_PRESENT", + "PRIVACY_POLICY_UPDATE_DATE_RECENT", + "PRIVACY_POLICY_GDPR_GENERAL_RULES", + "PRIVACY_POLICY_CCPA_GENERAL_RULES", + "PRIVACY_POLICY_COLLECTION_CATEGORIES_DATA_NOTICE", + "PRIVACY_POLICY_PROCESSING_PURPOSE_DATA_NOTICE", + "PRIVACY_POLICY_SHARING_CATEGORIES_DATA_NOTICE", + "PRIVACY_POLICY_DATA_RETENTION_NOTICE", + "PRIVACY_POLICY_CONTACT_DETAILS_NOTICE", + "PRIVACY_POLICY_CHILDREN_GENERAL_RULES", + "PRIVACY_POLICY_DATA_TYPE_PHONE_NUMBER", + "PRIVACY_POLICY_DATA_TYPE_USER_ACCOUNT_INFO", + "PRIVACY_POLICY_DATA_TYPE_PRECISE_LOCATION", + "PRIVACY_POLICY_DATA_TYPE_DEVICE_ID", + "PRIVACY_POLICY_DATA_TYPE_APPS_ON_DEVICE", + "PRIVACY_POLICY_DATA_TYPE_CONTACTS", + "PRIVACY_POLICY_DATA_TYPE_TEXT_MESSAGES", + "PRIVACY_POLICY_DATA_TYPE_PII", + "PRIVACY_POLICY_DATA_TYPE_PII_CATEGORIES", + "PRIVACY_POLICY_DATA_TYPE_HEALTH_AND_BIOMETRIC", + "PRIVACY_POLICY_BRAZIL_LGPD_GENERAL_RULES", + "PRIVACY_POLICY_VIRGINIA_VCDPA_GENERAL_RULES", + "PRIVACY_POLICY_AFFILIATION_MENTION", + "PRIVACY_POLICY_RIGHT_TO_DELETE_NOTICE", + "PRIVACY_POLICY_RIGHT_TO_ACCESS_NOTICE", + "PRIVACY_POLICY_RIGHT_TO_RECTIFICATION_NOTICE", + "PRIVACY_POLICY_RIGHT_TO_KNOW_ABOUT_SELLING_NOTICE", + "PRIVACY_POLICY_RIGHT_TO_KNOW_ABOUT_SHARING_NOTICE", + "PRIVACY_POLICY_RIGHT_TO_OPT_OUT_FROM_SELLING_NOTICE", + "PRIVACY_POLICY_METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING_NOTICE", + "PRIVACY_POLICY_DATA_CONTROLLER_IDENTITY", + "PRIVACY_POLICY_DPO_CONTACT_DETAILS", + "PRIVACY_POLICY_RIGHT_TO_LODGE_A_COMPLAINT", + "PRIVACY_POLICY_LEGAL_BASIS", + "PRIVACY_POLICY_CHILDREN_INFO_COLLECTION", + "PRIVACY_POLICY_CHILDREN_INFO_USAGE_PURPOSES", + "PRIVACY_POLICY_CHILDREN_INFO_DISCLOSURE_PRACTICES", + "PRIVACY_POLICY_CHILDREN_INFO_PUBLICITY", + "PRIVACY_POLICY_PARENTS_METHOD_OF_INFO_DELETION", + "PRIVACY_POLICY_PARENTS_METHOD_TO_INFO_REVIEW", + "PRIVACY_POLICY_PARENTS_METHOD_TO_STOP_FURTHER_INFO_COLLECTION_USE", + "PRIVACY_POLICY_PARENTS_RIGHT_TO_INFO_DELETION", + "PRIVACY_POLICY_PARENTS_RIGHT_TO_INFO_REVIEW", + "PRIVACY_POLICY_PARENTS_RIGHT_TO_STOP_FURTHER_INFO_COLLECTION_USE", + "PRIVACY_POLICY_PSL_APPROXIMATE_LOCATION", + "PRIVACY_POLICY_PSL_PRECISE_LOCATION", + "PRIVACY_POLICY_PSL_NAME", + "PRIVACY_POLICY_PSL_EMAIL_ADDRESS", + "PRIVACY_POLICY_PSL_USER_IDENTIFIERS", + "PRIVACY_POLICY_PSL_ADDRESS", + "PRIVACY_POLICY_PSL_PHONE_NUMBER", + "PRIVACY_POLICY_PSL_RACE_AND_ETHNICITY", + "PRIVACY_POLICY_PSL_CREDIT_SCORE", + "PRIVACY_POLICY_PSL_PURCHASE_HISTORY", + "PRIVACY_POLICY_PSL_HEALTH_INFO", + "PRIVACY_POLICY_PSL_FITNESS_INFO", + "PRIVACY_POLICY_PSL_EMAIL_MESSAGES", + "PRIVACY_POLICY_PSL_TEXT_MESSAGES", + "PRIVACY_POLICY_PSL_PHOTOS", + "PRIVACY_POLICY_PSL_VIDEOS", + "PRIVACY_POLICY_PSL_MUSIC_FILES", + "PRIVACY_POLICY_PSL_VOICE_OR_SOUND_RECORDINGS", + "PRIVACY_POLICY_PSL_FILES_AND_DOCS", + "PRIVACY_POLICY_PSL_CALENDAR_EVENTS", + "PRIVACY_POLICY_PSL_CONTACTS", + "PRIVACY_POLICY_PSL_APP_INTERACTIONS", + "PRIVACY_POLICY_PSL_IN_APP_SEARCH_HISTORY", + "PRIVACY_POLICY_PSL_WEB_BROWSING_HISTORY", + "PRIVACY_POLICY_PSL_INSTALLED_APPS", + "PRIVACY_POLICY_PSL_CRASH_LOGS", + "PRIVACY_POLICY_PSL_DIAGNOSTICS", + "PRIVACY_POLICY_PSL_DEVICE_OR_OTHER_IDS", + "DATA_MONITORING_NEW_ENDPOINT", + "DATA_MONITORING_NEW_PERMISSION", + "DATA_MONITORING_NEW_DATA_TYPE", + "DATA_MONITORING_NEW_SDK", + "DATA_MONITORING_ENCRYPTION", + "DATA_MONITORING_NEW_DATA_TYPE_VERSION_DIFF", + "DATA_MONITORING_NEW_ENDPOINT_VERSION_DIFF", + "DATA_MONITORING_NEW_PERMISSION_VERSION_DIFF", + "DATA_MONITORING_NEW_SDK_VERSION_DIFF", + "DATA_MONITORING_SDKS_DENYLIST_VIOLATION", + "DATA_MONITORING_PERMISSIONS_DENYLIST_VIOLATION", + "DATA_MONITORING_ENDPOINTS_DENYLIST_VIOLATION", + "DATA_MONITORING_OUTDATED_SDK_VERSION", + "DATA_MONITORING_CRITICAL_SDK_ISSUE" + ], + "enumDescriptions": [ + "Not specified.", + "Checks that your store listing includes a working link to your privacy policy.", + "Checks that your privacy policy has been updated recently.", + "Checks if your privacy policy references rights under GDPR for users in the EU.", + "Checks if your privacy policy references rights under the CCPA.", + "Checks if your privacy policy mentions the categories of personal data that are collected.", + "Checks if your privacy policy explains why personal data is processed.", + "Checks if your privacy policy includes information about third-party sharing of personal data.", + "Checks if your privacy policy describes your data retention practices.", + "Checks if contact information is included in your privacy policy.", + "Checks if information about requirements related to children is included in your privacy policy.", + "Checks if the Phone Number data type declaration in your privacy policy matches usage.", + "Checks if the User Account Info data type declaration in your privacy policy matches usage.", + "Checks if the Precise Location data type declaration in your privacy policy matches usage.", + "Checks if the Device ID data type declaration in your privacy policy matches usage.", + "Checks if the Apps on Device data type declaration in your privacy policy matches usage.", + "Checks if the Contacts data type declaration in your privacy policy matches usage.", + "Checks if the Text Messages data type declaration in your privacy policy matches usage.", + "Checks if the PII data type declaration in your privacy policy matches usage.", + "Checks if the PII Categories data type declaration in your privacy policy matches usage.", + "Checks if the Health and Biometric data type declaration in your privacy policy matches usage.", + "Checks if your privacy policy references rights under LGPD for users in Brazil.", + "Checks if your privacy policy references rights under VCDPA for users in Virginia.", + "Checks if your privacy policy identifies your company or app name(s).", + "Checks if your privacy policy mentions your users' right to delete their data.", + "Checks if your privacy policy mentions your users' right to access the data held about them.", + "Checks if your privacy policy mentions your users' right to correct inaccuracies within their data.", + "Checks if your privacy policy mentions your users' right to know about information selling.", + "Checks if your privacy policy mentions your users' right to know about information sharing.", + "Checks if your privacy policy mentions your users' right to opt out from information selling.", + "Checks if your privacy policy explains how your users opt out from the selling or sharing of their data.", + "Checks if your privacy policy provides the name and contact information for your data controller.", + "Checks if your privacy policy provides the name and contact information for your Data Protection Officer.", + "Checks if your privacy policy mentions your users' right to lodge a complaint with a supervisory authority.", + "Checks if your privacy policy mentions the legal basis you rely on for processing your users' data.", + "Checks if your privacy policy mentions what personal information is collected from children.", + "Checks if your privacy policy mentions why you collect personal information from children.", + "Checks if your privacy policy mentions what personal information from children is shared with third parties.", + "Checks if your privacy policy mentions whether your app allows children to make their personal information publicly available.", + "Checks if your privacy policy mentions how parents/caregivers/guardians can request the deletion of their child's personal information.", + "Checks if your privacy policy mentions how parents/caregivers/guardians can review their child's personal information.", + "Checks if your privacy policy explains how a parent/caregiver/guardian can stop the collection/use from their child's personal information.", + "Checks if your privacy policy mentions the right of a parent/caregiver/guardian to request the deletion of their child's personal information.", + "Checks if your privacy policy mentions the right of a parent/caregiver/guardian to review their child's personal information.", + "Checks if your privacy policy mentions the right of a parent/caregiver/guardian to stop collection/use from their child's personal information.", + "Checks if your privacy policy mentions collection of your users' approximate location if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' precise location if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' personal names if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' email addresses if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' user IDs if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' physical addresses if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' phone numbers if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' race or ethnicity if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' credit score if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' purchase history if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' health info if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' fitness info if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' emails if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' text messages if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' photos if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' videos if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' music files if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' voice or sound recordings if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' files or documents if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' calendar events if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' contacts if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' app interactions if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' in-app search history if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' web browsing history if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' installed apps if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' crash logs if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' performance diagnostics if this data type is declared in your Play Data Safety Section.", + "Checks if your privacy policy mentions collection of your users' device or other IDs if this data type is declared in your Play Data Safety Section.", + "Checks if there is a new endpoint we've recently detected. Because this check accounts for flakiness, it may fail for several weeks even if the endpoint is not detected in the current report.", + "Checks if there is a new permission we've recently detected. Because this check accounts for flakiness, it may fail for several weeks even if the permission is not detected in the current report.", + "Checks if there is a new data type we've recently detected. Because this check accounts for flakiness, it may fail for several weeks even if the data type is not detected in the current report.", + "Checks if there is a new SDK we've recently detected. Because this check accounts for flakiness, it may fail for several weeks even if the SDK is not detected in the current report.", + "Checks if there is any endpoint contacted using HTTP protocol instead of HTTPS. If no protocol is found in the URL, the endpoint is not considered for analysis.", + "Checks if new data types have been detected since a specific app version.", + "Checks if new endpoints have been detected since a specific app version.", + "Checks if new permissions have been detected since a specific app version.", + "Checks if new SDKs have been detected since a specific app version.", + "Checks if any SDKs were detected that are specified in the denylist.", + "Checks if any permissions were detected that are specified in the denylist.", + "Checks if any endpoints were detected that are specified in the denylist.", + "Checks if there are any outdated SDKs.", + "Checks if there are any SDKs with critical issues." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckCitation": { + "description": "Regulation or policy that serves as the legal basis for the check.", + "id": "GoogleChecksReportV1alphaCheckCitation", + "properties": { + "type": { + "description": "Citation type.", + "enum": [ + "CITATION_TYPE_UNSPECIFIED", + "COPPA", + "GDPR", + "FERPA", + "CAL_OPPA", + "CCPA", + "SOPIPA", + "LGPD", + "CPRA", + "VCDPA", + "GOOGLE_PLAY_POLICY", + "APP_STORE_POLICY", + "CPA", + "CTDPA", + "UCPA", + "PIPEDA", + "ALBERTA_PIPA", + "QUEBEC_ACT", + "QUEBEC_BILL_64", + "CHINA_PIPL" + ], + "enumDescriptions": [ + "Not specified.", + "Children's Online Privacy Protection Act.", + "General Data Protection Regulation.", + "Family Educational Rights and Privacy Act.", + "The California Online Privacy Protection Act.", + "California Consumer Privacy Act.", + "Student Online Personal Information Protection Act.", + "Lei Geral de Proteção de Dados.", + "California Consumer Privacy Act.", + "Virginia Consumer Data Protection Act.", + "Google Play Policy.", + "App Store Policy.", + "Colorado Privacy Act.", + "Connecticut Data Privacy Act.", + "Utah Consumer Privacy Act.", + "Personal Information Protection and Electronic Documents Act.", + "Alberta (Canada) Personal Information Protection Act.", + "Quebec: Act Respecting the Protection of Personal Information in the Private Sector.", + "Quebec Bill 64: An Act to Modernize Legislative Provisions as Regards the Protection of Personal Information.", + "China Personal Information Protection Law." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckDataSecurityEvidence": { + "description": "Evidence concerning data security.", + "id": "GoogleChecksReportV1alphaCheckDataSecurityEvidence", + "properties": { + "dataInTransitInfo": { + "description": "Evidence related to data in transit.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo": { + "description": "Evidence related to data in transit detected in your app.", + "id": "GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo", + "properties": { + "uri": { + "description": "The URL contacted by your app. This includes the protocol, domain, and URL parameters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckDataTypeEvidence": { + "description": "Evidence concerning a data type that was found in your app.", + "id": "GoogleChecksReportV1alphaCheckDataTypeEvidence", + "properties": { + "dataType": { + "description": "The data type that was found in your app.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "DATA_TYPE_APPROXIMATE_LOCATION", + "DATA_TYPE_PRECISE_LOCATION", + "DATA_TYPE_PERSONAL_NAME", + "DATA_TYPE_EMAIL_ADDRESS", + "DATA_TYPE_USER_IDS", + "DATA_TYPE_PHYSICAL_ADDRESS", + "DATA_TYPE_PHONE_NUMBER", + "DATA_TYPE_RACE_AND_ETHNICITY", + "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS", + "DATA_TYPE_SEXUAL_ORIENTATION", + "DATA_TYPE_OTHER_PERSONAL_INFO", + "DATA_TYPE_PAYMENT_INFO", + "DATA_TYPE_PURCHASE_HISTORY", + "DATA_TYPE_CREDIT_SCORE", + "DATA_TYPE_OTHER_FINANCIAL_INFO", + "DATA_TYPE_HEALTH_INFO", + "DATA_TYPE_FITNESS_INFO", + "DATA_TYPE_EMAILS", + "DATA_TYPE_TEXT_MESSAGES", + "DATA_TYPE_PHOTOS", + "DATA_TYPE_VIDEOS", + "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS", + "DATA_TYPE_MUSIC_FILES", + "DATA_TYPE_OTHER_AUDIO_FILES", + "DATA_TYPE_FILES_AND_DOCS", + "DATA_TYPE_CALENDAR_EVENTS", + "DATA_TYPE_CONTACTS", + "DATA_TYPE_APP_INTERACTIONS", + "DATA_TYPE_IN_APP_SEARCH_HISTORY", + "DATA_TYPE_INSTALLED_APPS", + "DATA_TYPE_OTHER_USER_GENERATED_CONTENT", + "DATA_TYPE_OTHER_ACTIONS", + "DATA_TYPE_WEB_BROWSING_HISTORY", + "DATA_TYPE_CRASH_LOGS", + "DATA_TYPE_PERFORMANCE_DIAGNOSTICS", + "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA", + "DATA_TYPE_DEVICE_OR_OTHER_IDS" + ], + "enumDescriptions": [ + "Not specified.", + "User or device physical location to an area greater than or equal to 3 square kilometers, such as the city a user is in, or location provided by Android's ACCESS_COARSE_LOCATION permission.", + "User or device physical location within an area less than 3 square kilometers, such as location provided by Android's ACCESS_FINE_LOCATION permission.", + "How a user refers to themselves, such as their first or last name, or nickname.", + "A user's email address.", + "Identifiers that relate to an identifiable person. For example, an account ID, account number, or account name.", + "A user's address, such as a mailing or home address.", + "A user's phone number.", + "Information about a user's race or ethnicity.", + "Information about a user's political or religious beliefs.", + "Information about a user's sexual orientation.", + "Any other personal information such as date of birth, gender identity, veteran status, etc.", + "Information about a user's financial accounts such as credit card number.", + "Information about purchases or transactions a user has made.", + "Information about a user's credit score.", + "Any other financial information such as user salary or debts.", + "Information about a user's health, such as medical records or symptoms.", + "Information about a user's fitness, such as exercise or other physical activity.", + "A user's emails including the email subject line, sender, recipients, and the content of the email.", + "A user's text messages including the sender, recipients, and the content of the message.", + "A user's photos.", + "A user's videos.", + "A user's voice such as a voicemail or a sound recording.", + "A user's music files.", + "Any other user-created or user-provided audio files.", + "A user's files or documents, or information about their files or documents such as file names.", + "Information from a user's calendar such as events, event notes, and attendees.", + "Information about the user’s contacts such as contact names, message history, and social graph information like usernames, contact recency, contact frequency, interaction duration and call history.", + "Information about how a user interacts with your app, such as the number of page views or taps.", + "Information about what a user has searched for in your app.", + "Inventory of apps or packages installed on the user’s device.", + "Any other user-generated content not listed here, or in any other section. For example, user bios, notes, or open-ended responses.", + "Any other user activity or actions in-app not listed here such as gameplay, likes, and dialog options.", + "Information about the websites a user has visited.", + "Crash log data from your app. For example, the number of times your app has crashed, stack traces, or other information directly related to a crash.", + "Information about the performance of your app. For example battery life, loading time, latency, framerate, or any technical diagnostics.", + "Any other app performance data not listed here.", + "Identifiers that relate to an individual device, browser or app. For example, an IMEI number, MAC address, Widevine Device ID, Firebase installation ID, or advertising identifier." + ], + "type": "string" + }, + "dataTypeEvidence": { + "$ref": "GoogleChecksReportV1alphaDataTypeEvidence", + "description": "Evidence collected about the data type." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckEndpointEvidence": { + "description": "Evidence concerning an endpoint that was contacted by your app.", + "id": "GoogleChecksReportV1alphaCheckEndpointEvidence", + "properties": { + "endpoint": { + "$ref": "GoogleChecksReportV1alphaEndpoint", + "description": "The endpoint that was contacted by your app." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence": { + "description": "Evidence collected from endpoint restriction violation analysis.", + "id": "GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence", + "properties": { + "endpointDetails": { + "description": "Endpoints in violation.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails": { + "description": "Details of the endpoint in violation.", + "id": "GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails", + "properties": { + "endpoint": { + "$ref": "GoogleChecksReportV1alphaEndpoint", + "description": "The endpoint in violation." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckEvidence": { + "description": "Evidence for a check.", + "id": "GoogleChecksReportV1alphaCheckEvidence", + "properties": { + "dataSecurity": { + "$ref": "GoogleChecksReportV1alphaCheckDataSecurityEvidence", + "description": "Evidence concerning data security." + }, + "dataTypes": { + "description": "Evidence concerning data types found in your app.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckDataTypeEvidence" + }, + "type": "array" + }, + "endpointRestrictionViolations": { + "description": "Evidence collected from endpoint restriction violation analysis.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence" + }, + "type": "array" + }, + "endpoints": { + "description": "Evidence concerning endpoints that were contacted by your app.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckEndpointEvidence" + }, + "type": "array" + }, + "permissionRestrictionViolations": { + "description": "Evidence collected from permission restriction violation analysis.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence" + }, + "type": "array" + }, + "permissions": { + "description": "Evidence concerning permissions that were found in your app.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckPermissionEvidence" + }, + "type": "array" + }, + "privacyPolicyTexts": { + "description": "Evidence collected from your privacy policy(s).", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence" + }, + "type": "array" + }, + "sdkIssues": { + "description": "Evidence concerning SDK issues.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckSdkIssueEvidence" + }, + "type": "array" + }, + "sdkRestrictionViolations": { + "description": "Evidence collected from SDK restriction violation analysis.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence" + }, + "type": "array" + }, + "sdks": { + "description": "Evidence concerning SDKs that were found in your app.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckSdkEvidence" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckPermissionEvidence": { + "description": "Evidence concerning a permission that was found in your app.", + "id": "GoogleChecksReportV1alphaCheckPermissionEvidence", + "properties": { + "permission": { + "$ref": "GoogleChecksReportV1alphaPermission", + "description": "The permission that was found in your app." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence": { + "description": "Evidence collected from permission restriction violation analysis.", + "id": "GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence", + "properties": { + "permissionDetails": { + "description": "Permissions in violation.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails": { + "description": "Details of the permission in violation.", + "id": "GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails", + "properties": { + "permission": { + "$ref": "GoogleChecksReportV1alphaPermission", + "description": "The permission in violation." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence": { + "description": "Evidence collected from your privacy policy(s).", + "id": "GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence", + "properties": { + "policyFragment": { + "$ref": "GoogleChecksReportV1alphaPolicyFragment", + "description": "The privacy policy fragment that was used during the check." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckSdkEvidence": { + "description": "Evidence conerning an SDK that was found in your app.", + "id": "GoogleChecksReportV1alphaCheckSdkEvidence", + "properties": { + "sdk": { + "$ref": "GoogleChecksReportV1alphaSdk", + "description": "The SDK that was found in your app." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckSdkIssueEvidence": { + "description": "Evidence concerning an SDK issue.", + "id": "GoogleChecksReportV1alphaCheckSdkIssueEvidence", + "properties": { + "sdk": { + "$ref": "GoogleChecksReportV1alphaSdk", + "description": "The SDK with an issue." + }, + "sdkVersion": { + "description": "The SDK version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence": { + "description": "Evidence collected from SDK restriction violation analysis.", + "id": "GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence", + "properties": { + "sdkDetails": { + "description": "SDKs in violation.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails": { + "description": "Details of the SDK in violation.", + "id": "GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails", + "properties": { + "sdk": { + "$ref": "GoogleChecksReportV1alphaSdk", + "description": "The SDK in violation." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaCheckStateMetadata": { + "description": "Additional information about the check state in relation to past reports.", + "id": "GoogleChecksReportV1alphaCheckStateMetadata", + "properties": { + "badges": { + "description": "Indicators related to the check state.", + "items": { + "enum": [ + "CHECK_STATE_BADGE_UNSPECIFIED", + "NEWLY_FAILING", + "RECENTLY_FAILING", + "RESOLVED" + ], + "enumDescriptions": [ + "Not specified.", + "The check is newly failing, i.e. now failing but previously passing.", + "The check is currently failing and first started failing continuously within the last 28 days.", + "The check is newly passing, i.e. now passing but previously failing." + ], + "type": "string" + }, + "type": "array" + }, + "firstFailingTime": { + "description": "The time when the check first started failing.", + "format": "google-datetime", + "type": "string" + }, + "lastFailingTime": { + "description": "The last time the check failed.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataMonitoring": { + "description": "Represents the data monitoring section of the report.", + "id": "GoogleChecksReportV1alphaDataMonitoring", + "properties": { + "dataTypes": { + "description": "Data types that your app shares or collects.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringDataTypeResult" + }, + "type": "array" + }, + "endpoints": { + "description": "Endpoints that were found by dynamic analysis of your app.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringEndpointResult" + }, + "type": "array" + }, + "permissions": { + "description": "Permissions that your app uses.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringPermissionResult" + }, + "type": "array" + }, + "sdks": { + "description": "SDKs that your app uses.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringSdkResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataMonitoringDataTypeResult": { + "description": "Information about a data type that was found in your app.", + "id": "GoogleChecksReportV1alphaDataMonitoringDataTypeResult", + "properties": { + "dataType": { + "description": "The data type that was shared or collected by your app.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "DATA_TYPE_APPROXIMATE_LOCATION", + "DATA_TYPE_PRECISE_LOCATION", + "DATA_TYPE_PERSONAL_NAME", + "DATA_TYPE_EMAIL_ADDRESS", + "DATA_TYPE_USER_IDS", + "DATA_TYPE_PHYSICAL_ADDRESS", + "DATA_TYPE_PHONE_NUMBER", + "DATA_TYPE_RACE_AND_ETHNICITY", + "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS", + "DATA_TYPE_SEXUAL_ORIENTATION", + "DATA_TYPE_OTHER_PERSONAL_INFO", + "DATA_TYPE_PAYMENT_INFO", + "DATA_TYPE_PURCHASE_HISTORY", + "DATA_TYPE_CREDIT_SCORE", + "DATA_TYPE_OTHER_FINANCIAL_INFO", + "DATA_TYPE_HEALTH_INFO", + "DATA_TYPE_FITNESS_INFO", + "DATA_TYPE_EMAILS", + "DATA_TYPE_TEXT_MESSAGES", + "DATA_TYPE_PHOTOS", + "DATA_TYPE_VIDEOS", + "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS", + "DATA_TYPE_MUSIC_FILES", + "DATA_TYPE_OTHER_AUDIO_FILES", + "DATA_TYPE_FILES_AND_DOCS", + "DATA_TYPE_CALENDAR_EVENTS", + "DATA_TYPE_CONTACTS", + "DATA_TYPE_APP_INTERACTIONS", + "DATA_TYPE_IN_APP_SEARCH_HISTORY", + "DATA_TYPE_INSTALLED_APPS", + "DATA_TYPE_OTHER_USER_GENERATED_CONTENT", + "DATA_TYPE_OTHER_ACTIONS", + "DATA_TYPE_WEB_BROWSING_HISTORY", + "DATA_TYPE_CRASH_LOGS", + "DATA_TYPE_PERFORMANCE_DIAGNOSTICS", + "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA", + "DATA_TYPE_DEVICE_OR_OTHER_IDS" + ], + "enumDescriptions": [ + "Not specified.", + "User or device physical location to an area greater than or equal to 3 square kilometers, such as the city a user is in, or location provided by Android's ACCESS_COARSE_LOCATION permission.", + "User or device physical location within an area less than 3 square kilometers, such as location provided by Android's ACCESS_FINE_LOCATION permission.", + "How a user refers to themselves, such as their first or last name, or nickname.", + "A user's email address.", + "Identifiers that relate to an identifiable person. For example, an account ID, account number, or account name.", + "A user's address, such as a mailing or home address.", + "A user's phone number.", + "Information about a user's race or ethnicity.", + "Information about a user's political or religious beliefs.", + "Information about a user's sexual orientation.", + "Any other personal information such as date of birth, gender identity, veteran status, etc.", + "Information about a user's financial accounts such as credit card number.", + "Information about purchases or transactions a user has made.", + "Information about a user's credit score.", + "Any other financial information such as user salary or debts.", + "Information about a user's health, such as medical records or symptoms.", + "Information about a user's fitness, such as exercise or other physical activity.", + "A user's emails including the email subject line, sender, recipients, and the content of the email.", + "A user's text messages including the sender, recipients, and the content of the message.", + "A user's photos.", + "A user's videos.", + "A user's voice such as a voicemail or a sound recording.", + "A user's music files.", + "Any other user-created or user-provided audio files.", + "A user's files or documents, or information about their files or documents such as file names.", + "Information from a user's calendar such as events, event notes, and attendees.", + "Information about the user’s contacts such as contact names, message history, and social graph information like usernames, contact recency, contact frequency, interaction duration and call history.", + "Information about how a user interacts with your app, such as the number of page views or taps.", + "Information about what a user has searched for in your app.", + "Inventory of apps or packages installed on the user’s device.", + "Any other user-generated content not listed here, or in any other section. For example, user bios, notes, or open-ended responses.", + "Any other user activity or actions in-app not listed here such as gameplay, likes, and dialog options.", + "Information about the websites a user has visited.", + "Crash log data from your app. For example, the number of times your app has crashed, stack traces, or other information directly related to a crash.", + "Information about the performance of your app. For example battery life, loading time, latency, framerate, or any technical diagnostics.", + "Any other app performance data not listed here.", + "Identifiers that relate to an individual device, browser or app. For example, an IMEI number, MAC address, Widevine Device ID, Firebase installation ID, or advertising identifier." + ], + "type": "string" + }, + "dataTypeEvidence": { + "$ref": "GoogleChecksReportV1alphaDataTypeEvidence", + "description": "Evidence collected about the data type." + }, + "metadata": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringResultMetadata", + "description": "Metadata about the result." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataMonitoringEndpointResult": { + "description": "Information about an endpoint that was contacted by your app.", + "id": "GoogleChecksReportV1alphaDataMonitoringEndpointResult", + "properties": { + "endpoint": { + "$ref": "GoogleChecksReportV1alphaEndpoint", + "description": "The endpoint that was contacted by your app." + }, + "hitCount": { + "description": "The number of times this endpoint was contacted by your app.", + "format": "int32", + "type": "integer" + }, + "metadata": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringResultMetadata", + "description": "Metadata about the result." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataMonitoringPermissionResult": { + "description": "Information about a permission that was found in your app.", + "id": "GoogleChecksReportV1alphaDataMonitoringPermissionResult", + "properties": { + "metadata": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringResultMetadata", + "description": "Metadata about the result." + }, + "permission": { + "$ref": "GoogleChecksReportV1alphaPermission", + "description": "The permission that was found in your app." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataMonitoringResultMetadata": { + "description": "Information about a data monitoring result.", + "id": "GoogleChecksReportV1alphaDataMonitoringResultMetadata", + "properties": { + "badges": { + "description": "Badges that apply to this result.", + "items": { + "enum": [ + "DATA_MONITORING_RESULT_BADGE_UNSPECIFIED", + "NEW" + ], + "enumDescriptions": [ + "Not specified.", + "Indicates a newly detected result in the data monitoring report." + ], + "type": "string" + }, + "type": "array" + }, + "firstDetectedTime": { + "description": "The timestamp when this result was first detected within the last 8 weeks. If not set, it wasn't detected within the last 8 weeks.", + "format": "google-datetime", + "type": "string" + }, + "lastDetectedAppVersion": { + "description": "Your app's version name when this result was last detected within the last 8 weeks. If not set, it wasn't detected within the last 8 weeks.", + "type": "string" + }, + "lastDetectedTime": { + "description": "The timestamp when this result was last detected within the last 8 weeks. If not set, it wasn't detected within the last 8 weeks.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataMonitoringSdkResult": { + "description": "Information about an SDK that was found in your app.", + "id": "GoogleChecksReportV1alphaDataMonitoringSdkResult", + "properties": { + "metadata": { + "$ref": "GoogleChecksReportV1alphaDataMonitoringResultMetadata", + "description": "Metadata about the result." + }, + "sdk": { + "$ref": "GoogleChecksReportV1alphaSdk", + "description": "The SDK that was found in your app." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataTypeEndpointEvidence": { + "description": "Evidence based on an endpoint that data was sent to.", + "id": "GoogleChecksReportV1alphaDataTypeEndpointEvidence", + "properties": { + "attributedSdks": { + "description": "Set of SDKs that are attributed to the exfiltration.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk" + }, + "type": "array" + }, + "endpointDetails": { + "description": "Endpoints the data type was sent to.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails" + }, + "type": "array" + }, + "exfiltratedDataType": { + "description": "Type of data that was exfiltrated.", + "enum": [ + "EXFILTRATED_DATA_TYPE_UNSPECIFIED", + "EXFILTRATED_DATA_TYPE_PHONE_NUMBER", + "EXFILTRATED_DATA_TYPE_PRECISE_LOCATION", + "EXFILTRATED_DATA_TYPE_CONTACT_NAME", + "EXFILTRATED_DATA_TYPE_CONTACT_EMAIL", + "EXFILTRATED_DATA_TYPE_CONTACT_PHONE_NUMBER", + "EXFILTRATED_DATA_TYPE_INCOMING_TEXT_NUMBER", + "EXFILTRATED_DATA_TYPE_INCOMING_TEXT_MESSAGE", + "EXFILTRATED_DATA_TYPE_OUTGOING_TEXT_NUMBER", + "EXFILTRATED_DATA_TYPE_OUTGOING_TEXT_MESSAGE", + "EXFILTRATED_DATA_TYPE_ADVERTISING_ID", + "EXFILTRATED_DATA_TYPE_ANDROID_ID", + "EXFILTRATED_DATA_TYPE_IMEI", + "EXFILTRATED_DATA_TYPE_IMSI", + "EXFILTRATED_DATA_TYPE_SIM_SERIAL_NUMBER", + "EXFILTRATED_DATA_TYPE_SSID", + "EXFILTRATED_DATA_TYPE_ACCOUNT", + "EXFILTRATED_DATA_TYPE_EXTERNAL_ACCOUNT", + "EXFILTRATED_DATA_TYPE_INSTALLED_PACKAGES" + ], + "enumDescriptions": [ + "Not specified.", + "The user's phone number.", + "The user's precise location.", + "Name of one or more contacts from the user's phone.", + "Email of one or more contacts from the user's phone.", + "Phone number of one or more contacts from the user's phone.", + "Phone number of an incoming text message.", + "Content of an incoming text message.", + "Phone number of an outgoing text message.", + "Content of an outgoing text message.", + "Advertising ID.", + "Android ID.", + "IMEI.", + "IMSI.", + "Sim serial number.", + "SSID: Service Set IDentifier, i.e. the network's name.", + "Information about the main account of the device.", + "Information about an external account, e.g. Facebook, Twitter.", + "One or more of the package names of apps on the device." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk": { + "description": "Details of SDK that is attributed to the exfiltration.", + "id": "GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk", + "properties": { + "sdk": { + "$ref": "GoogleChecksReportV1alphaSdk", + "description": "SDK that is attributed to the exfiltration." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails": { + "description": "Details of the endpoint the data type was sent to.", + "id": "GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails", + "properties": { + "endpoint": { + "$ref": "GoogleChecksReportV1alphaEndpoint", + "description": "Endpoint the data type was sent to." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataTypeEvidence": { + "description": "Evidence collected about a data type.", + "id": "GoogleChecksReportV1alphaDataTypeEvidence", + "properties": { + "endpoints": { + "description": "List of endpoints the data type was sent to.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataTypeEndpointEvidence" + }, + "type": "array" + }, + "permissions": { + "description": "List of included permissions that imply collection of the data type.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataTypePermissionEvidence" + }, + "type": "array" + }, + "privacyPolicyTexts": { + "description": "List of privacy policy texts that imply collection of the data type.", + "items": { + "$ref": "GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataTypePermissionEvidence": { + "description": "Evidence based on the inclusion of a permission.", + "id": "GoogleChecksReportV1alphaDataTypePermissionEvidence", + "properties": { + "permission": { + "$ref": "GoogleChecksReportV1alphaPermission", + "description": "Permission declared by your app." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence": { + "description": "Evidence based on information from the privacy policy.", + "id": "GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence", + "properties": { + "policyFragment": { + "$ref": "GoogleChecksReportV1alphaPolicyFragment", + "description": "The privacy policy fragment that implies collection of the data type." + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaEndpoint": { + "description": "Information about an endpoint.", + "id": "GoogleChecksReportV1alphaEndpoint", + "properties": { + "domain": { + "description": "Domain name (e.g. ads.google.com).", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaListReportsResponse": { + "description": "The response message for ReportService.ListReports.", + "id": "GoogleChecksReportV1alphaListReportsResponse", + "properties": { + "nextPageToken": { + "description": "A token which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "reports": { + "description": "The reports for the specified app.", + "items": { + "$ref": "GoogleChecksReportV1alphaReport" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaPermission": { + "description": "Information about a permission.", + "id": "GoogleChecksReportV1alphaPermission", + "properties": { + "id": { + "description": "Permission identifier.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaPolicyFragment": { + "description": "Information about a policy fragment.", + "id": "GoogleChecksReportV1alphaPolicyFragment", + "properties": { + "htmlContent": { + "description": "HTML content.", + "type": "string" + }, + "sourceUri": { + "description": "Policy URL.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaReport": { + "description": "Privacy report.", + "id": "GoogleChecksReportV1alphaReport", + "properties": { + "appBundle": { + "$ref": "GoogleChecksReportV1alphaAppBundle", + "description": "Information about the analyzed app bundle." + }, + "baseReport": { + "description": "Resource name of the base report used for comparison. May be absent if this is the first report generated for the app.", + "type": "string" + }, + "checks": { + "description": "List of checks that were run on the app bundle.", + "items": { + "$ref": "GoogleChecksReportV1alphaCheck" + }, + "type": "array" + }, + "dataMonitoring": { + "$ref": "GoogleChecksReportV1alphaDataMonitoring", + "description": "Information related to data monitoring." + }, + "name": { + "description": "Resource name of the report.", + "type": "string" + }, + "resultsUri": { + "description": "A URL to view results.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChecksReportV1alphaSdk": { + "description": "Information about an SDK.", + "id": "GoogleChecksReportV1alphaSdk", + "properties": { + "id": { + "description": "SDK identifier.", + "type": "string" + } + }, + "type": "object" + }, "LastUpdatedDate": { "description": "Information about the date when the privacy policy was last updated.", "id": "LastUpdatedDate", @@ -522,7 +1897,7 @@ "type": "string" }, "textContent": { - "description": "The bytes of actual text content in the section. NOTE: - This will correspond to the whole sentence that includes the date. - This field might contain HTML and it is not sanitized.", + "description": "The bytes of actual text content in the section. Note: - This will correspond to the whole sentence that includes the date. - This field might contain HTML and it is not sanitized.", "type": "string" } }, @@ -640,31 +2015,31 @@ "OTHER_DATA" ], "enumDescriptions": [ - "Default value.", - "Data type on the privacy policy describing Contact Info name.", - "Data type on the privacy policy describing Contact Info email address.", - "Data type on the privacy policy describing Contact Info phone number.", - "Data type on the privacy policy describing Contact Info mailing address.", - "Data type on the privacy policy describing Contact Info other.", - "Data type on the privacy policy describing Identity Info other.", - "Data type on the privacy policy describing User Content email messages.", - "Data type on the privacy policy describing User Content text messages.", - "Data type on the privacy policy describing User Content other in-app messages.", - "Data type on the privacy policy describing User Content photos.", - "Data type on the privacy policy describing User Content videos.", - "Data type on the privacy policy describing User Content music files.", - "Data type on the privacy policy describing User Content voice or sound recordings.", - "Data type on the privacy policy describing User Content other audio files.", - "Data type on the privacy policy describing User Content files or documents.", - "Data type on the privacy policy describing User Content gameplay data.", - "Data type on the privacy policy describing User Content customer support.", + "Default value. Checks cannot determine specific data type.", + "Data type on the privacy policy describing Contact Info: name.", + "Data type on the privacy policy describing Contact Info: email address.", + "Data type on the privacy policy describing Contact Info: phone number.", + "Data type on the privacy policy describing Contact Info: mailing address.", + "Data type on the privacy policy describing Contact Info: other.", + "Data type on the privacy policy describing Identity Info: other.", + "Data type on the privacy policy describing User Content: email messages.", + "Data type on the privacy policy describing User Content: text messages.", + "Data type on the privacy policy describing User Content: other in-app messages.", + "Data type on the privacy policy describing User Content: photos.", + "Data type on the privacy policy describing User Content: videos.", + "Data type on the privacy policy describing User Content: music files.", + "Data type on the privacy policy describing User Content: voice or sound recordings.", + "Data type on the privacy policy describing User Content: other audio files.", + "Data type on the privacy policy describing User Content: files or documents.", + "Data type on the privacy policy describing User Content: gameplay data.", + "Data type on the privacy policy describing User Content: customer support.", "Data type on the privacy policy describing Cookies and other tracking elements, e.g. web beacons.", "Data type on the privacy policy describing Browsing History.", "Data type on the privacy policy describing Search History.", "Data type on the privacy policy describing Purchase History.", "Data type on the privacy policy describing Product Interaction data.", "Data type on the privacy policy describing other User Generated Content.", - "Data type on the privacy policy describing other User Generated Content.", + "Data type on the privacy policy describing other In App Actions.", "Data type on the privacy policy describing Advertising data.", "Data type on the privacy policy describing Crash Logs data.", "Data type on the privacy policy describing App Diagnostics data.", @@ -742,7 +2117,7 @@ "NO_PURPOSE_MENTIONED" ], "enumDescriptions": [ - "Default value.", + "Default value. Checks cannot determine specific purpose of use.", "Data is used for general app functions, or interface with the user, e.g. customer support.", "Data is used for minimizing app crashes, enabling scalability and performance, etc.", "Data is used for fraud prevention, protecting user accounts, or other security purposes.", @@ -769,7 +2144,7 @@ "type": "string" }, "textContent": { - "description": "The bytes of actual text content in the sentence that mentions the purpose of use. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml.", + "description": "The bytes of actual text content in the sentence that mentions the purpose of use. This makes it much easier to consume the information.", "type": "string" } }, @@ -789,7 +2164,7 @@ "type": "number" }, "sectionType": { - "description": "Type of the high-level category in the policy.", + "description": "Detected type of the high-level topic in the policy.", "enum": [ "SECTION_TYPE_UNSPECIFIED", "FIRST_PARTY_COLLECTION", @@ -828,11 +2203,11 @@ "PARENTS_RIGHT_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" ], "enumDescriptions": [ - "Default value.", + "Default value. Checks cannot determine specific section type.", "Section of the privacy policy describes 1st party collection practices.", "Section of the privacy policy describes 1st party use practices.", "Section of the privacy policy describes 3rd party sharing practices.", - "Section of the privacy policy describes Children related content.", + "Section of the privacy policy describing content related to children.", "Section of the privacy policy describes data retention practices.", "Section of the privacy policy references privacy contact information.", "Section of the privacy policy describes users' right of data deletion.", @@ -872,7 +2247,7 @@ "type": "string" }, "textContent": { - "description": "Actual text content in the section. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml.", + "description": "Actual text content in the section.", "type": "string" } }, diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go index 7013c48814f..5ad50699e40 100644 --- a/checks/v1alpha/checks-gen.go +++ b/checks/v1alpha/checks-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/checks // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // checksService, err := checks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // checksService, err := checks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // checksService, err := checks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package checks // import "google.golang.org/api/checks/v1alpha" import ( @@ -108,6 +121,7 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Accounts = NewAccountsService(s) + s.Media = NewMediaService(s) s.Privacypolicy = NewPrivacypolicyService(s) s.Projects = NewProjectsService(s) return s, nil @@ -120,6 +134,8 @@ type Service struct { Accounts *AccountsService + Media *MediaService + Privacypolicy *PrivacypolicyService Projects *ProjectsService @@ -147,6 +163,7 @@ type AccountsService struct { func NewAccountsAppsService(s *Service) *AccountsAppsService { rs := &AccountsAppsService{s: s} rs.Operations = NewAccountsAppsOperationsService(s) + rs.Reports = NewAccountsAppsReportsService(s) return rs } @@ -154,6 +171,8 @@ type AccountsAppsService struct { s *Service Operations *AccountsAppsOperationsService + + Reports *AccountsAppsReportsService } func NewAccountsAppsOperationsService(s *Service) *AccountsAppsOperationsService { @@ -165,6 +184,24 @@ type AccountsAppsOperationsService struct { s *Service } +func NewAccountsAppsReportsService(s *Service) *AccountsAppsReportsService { + rs := &AccountsAppsReportsService{s: s} + return rs +} + +type AccountsAppsReportsService struct { + s *Service +} + +func NewMediaService(s *Service) *MediaService { + rs := &MediaService{s: s} + return rs +} + +type MediaService struct { + s *Service +} + func NewPrivacypolicyService(s *Service) *PrivacypolicyService { rs := &PrivacypolicyService{s: s} return rs @@ -207,17 +244,16 @@ type ProjectsPrivacypolicyOperationsService struct { s *Service } -// AnalyzePrivacyPolicyRequest: The request proto for -// AnalyzePrivacyPolicy method. +// AnalyzePrivacyPolicyRequest: Request for the AnalyzePrivacyPolicy +// method. type AnalyzePrivacyPolicyRequest struct { - // PrivacyPolicyPageContent: Web page raw HTML content for the privacy - // policy page to be analyzed. Useful when the client wants to analyze a - // privacy policy already fetched. + // PrivacyPolicyPageContent: The HTML content of the privacy policy. + // This is useful if you'd like to manage the crawling and rendering of + // the privacy policy. PrivacyPolicyPageContent string `json:"privacyPolicyPageContent,omitempty"` - // PrivacyPolicyUri: URL for the privacy policy page to be analyzed. - // https://linter.aip.dev/140/uri (Use `uri` instead of `url` in field - // name) + // PrivacyPolicyUri: The URI that points to the web page for the privacy + // policy. PrivacyPolicyUri string `json:"privacyPolicyUri,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -245,23 +281,26 @@ func (s *AnalyzePrivacyPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AnalyzePrivacyPolicyResponse: The response proto for -// AnalyzePrivacyPolicy method. +// AnalyzePrivacyPolicyResponse: Response containing the analyzed +// privacy policy for the AnalyzePrivacyPolicy method. type AnalyzePrivacyPolicyResponse struct { - // DataPurposeAnnotations: List of all data types in the privacy policy. + // DataPurposeAnnotations: A list of detected purposes in the privacy + // policy. DataPurposeAnnotations []*PolicyPurposeOfUseAnnotation `json:"dataPurposeAnnotations,omitempty"` - // DataTypeAnnotations: List of all data types in the privacy policy. + // DataTypeAnnotations: A list of detected data types in the privacy + // policy. DataTypeAnnotations []*PolicyDataTypeAnnotation `json:"dataTypeAnnotations,omitempty"` - // HtmlContent: HTML content for the privacy policy page. + // HtmlContent: HTML content for the privacy policy page. The byte + // offsets in each annotated section will match this content. HtmlContent string `json:"htmlContent,omitempty"` // LastUpdatedDateInfo: Information about the date when the privacy // policy was last updated. LastUpdatedDateInfo *LastUpdatedDate `json:"lastUpdatedDateInfo,omitempty"` - // SectionAnnotations: List of all sections in the privacy policy. + // SectionAnnotations: A list of detected topics in the privacy policy. SectionAnnotations []*PolicySectionAnnotation `json:"sectionAnnotations,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -356,8 +395,8 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } -// FindPrivacyPolicyResponse: Operation response for -// `FindPrivacyPolicy`. +// FindPrivacyPolicyResponse: Response containing the analyzed privacy +// policy for the FindPrivacyPolicy method. type FindPrivacyPolicyResponse struct { // PrivacyPolicy: Resource name of the PrivacyPolicy that was found. PrivacyPolicy string `json:"privacyPolicy,omitempty"` @@ -385,26 +424,19 @@ func (s *FindPrivacyPolicyResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// LastUpdatedDate: Information about the date when the privacy policy -// was last updated. -type LastUpdatedDate struct { - // EndOffset: Byte offsets for the end of the date text inside the full - // text. - EndOffset int64 `json:"endOffset,omitempty,string"` - - // LastUpdatedDate: Date when the privacy policy was last updated. - LastUpdatedDate *Date `json:"lastUpdatedDate,omitempty"` +// GoogleChecksAccountV1alphaApp: Represents an app in Checks. +type GoogleChecksAccountV1alphaApp struct { + // Name: The resource name of the app. Example: `accounts/123/apps/456` + Name string `json:"name,omitempty"` - // StartOffset: Byte offsets for the start of the date text inside the - // full text. - StartOffset int64 `json:"startOffset,omitempty,string"` + // Title: The app's title. + Title string `json:"title,omitempty"` - // TextContent: The bytes of actual text content in the section. NOTE: - - // This will correspond to the whole sentence that includes the date. - - // This field might contain HTML and it is not sanitized. - TextContent string `json:"textContent,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndOffset") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -412,8 +444,8 @@ type LastUpdatedDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndOffset") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -421,27 +453,28 @@ type LastUpdatedDate struct { NullFields []string `json:"-"` } -func (s *LastUpdatedDate) MarshalJSON() ([]byte, error) { - type NoMethod LastUpdatedDate +func (s *GoogleChecksAccountV1alphaApp) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksAccountV1alphaApp raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for -// Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleChecksAccountV1alphaListAppsResponse: The response message for +// AccountService.ListApps. +type GoogleChecksAccountV1alphaListAppsResponse struct { + // Apps: The apps. + Apps []*GoogleChecksAccountV1alphaApp `json:"apps,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*Operation `json:"operations,omitempty"` + // NextPageToken: A token which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Apps") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -449,61 +482,81 @@ type ListOperationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Apps") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListOperationsResponse +func (s *GoogleChecksAccountV1alphaListAppsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksAccountV1alphaListAppsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Operation: This resource represents a long-running operation that is -// the result of a network API call. -type Operation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` +// GoogleChecksReportV1alphaAnalyzeUploadRequest: The request message +// for ReportService.AnalyzeUpload. +type GoogleChecksReportV1alphaAnalyzeUploadRequest struct { + // CodeReferenceId: Optional. Git commit hash or changelist number + // associated with the upload. + CodeReferenceId string `json:"codeReferenceId,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. - Error *Status `json:"error,omitempty"` + // ForceSendFields is a list of field names (e.g. "CodeReferenceId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // NullFields is a list of field names (e.g. "CodeReferenceId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` +func (s *GoogleChecksReportV1alphaAnalyzeUploadRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaAnalyzeUploadRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Response: The normal, successful response of the operation. If the - // original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` +// GoogleChecksReportV1alphaAppBundle: Information about the analyzed +// app bundle. +type GoogleChecksReportV1alphaAppBundle struct { + // BundleId: Unique id of the bundle. For example: "com.google.Gmail". + BundleId string `json:"bundleId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // CodeReferenceId: Git commit hash or changelist number associated with + // the release. + CodeReferenceId string `json:"codeReferenceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ReleaseType: Identifies the type of release. + // + // Possible values: + // "APP_BUNDLE_RELEASE_TYPE_UNSPECIFIED" - Not specified. + // "PUBLIC" - Published production bundle. + // "PRE_RELEASE" - Pre-release bundle. + ReleaseType string `json:"releaseType,omitempty"` + + // Version: The user-visible version of the bundle such as the Android + // `versionName` or iOS `CFBundleShortVersionString`. For example: + // "7.21.1". + Version string `json:"version,omitempty"` + + // VersionId: The version used throughout the operating system and store + // to identify the build such as the Android `versionCode` or iOS + // `CFBundleVersion`. + VersionId string `json:"versionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BundleId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -511,8 +564,8 @@ type Operation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BundleId") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -520,142 +573,290 @@ type Operation struct { NullFields []string `json:"-"` } -func (s *Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation +func (s *GoogleChecksReportV1alphaAppBundle) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaAppBundle raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type PolicyDataTypeAnnotation struct { - // DataType: Type of the data mentioned in the policy. - // - // Possible values: - // "DATA_TYPE_UNSPECIFIED" - Default value. - // "CONTACT_INFO_NAME" - Data type on the privacy policy describing - // Contact Info name. - // "CONTACT_INFO_EMAIL_ADDRESS" - Data type on the privacy policy - // describing Contact Info email address. - // "CONTACT_INFO_PHONE_NUMBER" - Data type on the privacy policy - // describing Contact Info phone number. - // "CONTACT_INFO_MAILING_ADDRESS" - Data type on the privacy policy - // describing Contact Info mailing address. - // "CONTACT_INFO_OTHER" - Data type on the privacy policy describing - // Contact Info other. - // "IDENTITY_INFO_OTHER" - Data type on the privacy policy describing - // Identity Info other. - // "USER_CONTENT_EMAIL_MESSAGES" - Data type on the privacy policy - // describing User Content email messages. - // "USER_CONTENT_TEXT_MESSAGES" - Data type on the privacy policy - // describing User Content text messages. - // "USER_CONTENT_OTHER_IN_APP_MESSAGES" - Data type on the privacy - // policy describing User Content other in-app messages. - // "USER_CONTENT_PHOTOS" - Data type on the privacy policy describing - // User Content photos. - // "USER_CONTENT_VIDEOS" - Data type on the privacy policy describing - // User Content videos. - // "USER_CONTENT_MUSIC_FILES" - Data type on the privacy policy - // describing User Content music files. - // "USER_CONTENT_VOICE_OR_SOUND_RECORDINGS" - Data type on the privacy - // policy describing User Content voice or sound recordings. - // "USER_CONTENT_OTHER_AUDIO_FILES" - Data type on the privacy policy - // describing User Content other audio files. - // "USER_CONTENT_FILES_AND_DOCS" - Data type on the privacy policy - // describing User Content files or documents. - // "USER_CONTENT_GAMEPLAY_DATA" - Data type on the privacy policy - // describing User Content gameplay data. - // "USER_CONTENT_CUSTOMER_SUPPORT" - Data type on the privacy policy - // describing User Content customer support. - // "COOKIES_AND_TRACKING_ELEMENTS" - Data type on the privacy policy - // describing Cookies and other tracking elements, e.g. web beacons. - // "BROWSING_HISTORY" - Data type on the privacy policy describing - // Browsing History. - // "SEARCH_HISTORY" - Data type on the privacy policy describing - // Search History. - // "PURCHASE_HISTORY" - Data type on the privacy policy describing - // Purchase History. - // "PRODUCT_INTERACTION" - Data type on the privacy policy describing - // Product Interaction data. - // "USER_GENERATED_CONTENT_OTHER" - Data type on the privacy policy - // describing other User Generated Content. - // "IN_APP_ACTIONS_OTHER" - Data type on the privacy policy describing - // other User Generated Content. - // "ADVERTISING" - Data type on the privacy policy describing - // Advertising data. - // "APP_CRASH_LOGS" - Data type on the privacy policy describing Crash - // Logs data. - // "APP_DIAGNOSTICS" - Data type on the privacy policy describing App - // Diagnostics data. - // "APP_PERFORMANCE_OTHER" - Data type on the privacy policy - // describing other App Performance data. - // "USER_IDENTIFIERS" - Data type on the privacy policy describing - // User or account-level IDs. - // "DEVICE_IDENTIFIERS" - Data type on the privacy policy describing - // device-level IDs. - // "IP_ADDRESS" - Data type on the privacy policy describing IP - // Addresses. - // "CONTACTS" - Data type on the privacy policy describing Contacts - // data. - // "AUTHENTICATION_DATA" - Data type on the privacy policy describing - // Authentication data, e.g. passwords. - // "CALENDAR_EVENTS_OR_NOTES" - Data type on the privacy policy - // describing Calendar events or notes. - // "HEALTH" - Data type on the privacy policy describing Health data. - // "FITNESS" - Data type on the privacy policy describing Fitness - // data. - // "LOCATION_PRECISE" - Data type on the privacy policy describing - // Precise Location data. - // "LOCATION_COARSE" - Data type on the privacy policy describing - // Coarse Location data. - // "LOCATION_GENERAL" - Data type on the privacy policy describing - // general Location data, without specifying precise or coarse. - // "APPS_ON_DEVICE" - Data type on the privacy policy describing Apps - // on Device. - // "FINANCIAL_PAYMENT_INFO" - Data type on the privacy policy - // describing Financial Payment info. - // "FINANCIAL_CREDIT_INFO" - Data type on the privacy policy - // describing Financial Credit info. - // "FINANCIAL_OTHER" - Data type on the privacy policy describing - // Financial other data. - // "PERSONAL_INFO_RACE_AND_ETHNICITY" - Data type on the privacy - // policy describing a user’s race or ethnicity. - // "PERSONAL_INFO_POLITICAL_OR_RELIGIOUS_BELIEFS" - Data type on the - // privacy policy describing a user’s political or religious beliefs. - // "PERSONAL_INFO_SEXUAL_ORIENTATION" - Data type on the privacy - // policy describing a user’s sexual orientation. - // "PERSONAL_INFO_OTHER" - Data type on the privacy policy describing - // Personal Info other. - // "GENERIC_PERSONAL_INFORMATION" - Data type on the privacy policy - // describing generic personal information, e.g. "we collection your - // personal information." - // "UNSPECIFIED_INFORMATION" - Data type on the privacy policy - // describing information in general with no speicific type, e.g. "we - // collect information you voluntarily provide." - // "OTHER_DATA" - Data type on the privacy policy describing specific - // types of data that are not covered by others labels, or ambiguous - // cases where no clear type exists, e.g. "we collect your movement - // data," which could be location, fitness, or even product interaction, - // depending on the context. - DataType string `json:"dataType,omitempty"` - - // EndOffset: Byte offsets for the end of the data type sentence inside - // the full text. - EndOffset int64 `json:"endOffset,omitempty,string"` +// GoogleChecksReportV1alphaCheck: A check that was run on your app. +type GoogleChecksReportV1alphaCheck struct { + // Citations: Regulations and policies that serve as the legal basis for + // the check. + Citations []*GoogleChecksReportV1alphaCheckCitation `json:"citations,omitempty"` - // Score: Score given by the model representing how confident it was - // regarding this `text_content` being of `data_type`. - Score float64 `json:"score,omitempty"` + // Evidence: Evidence that substantiates the check result. + Evidence *GoogleChecksReportV1alphaCheckEvidence `json:"evidence,omitempty"` - // StartOffset: Byte offsets for the start of the data type sentence - // inside the full text. - StartOffset int64 `json:"startOffset,omitempty,string"` + // RegionCodes: Regions that are impacted by the check. For more info, + // see https://google.aip.dev/143#countries-and-regions. + RegionCodes []string `json:"regionCodes,omitempty"` - // TextContent: Actual text content in the section. This makes it much - // easier to consume the information. NOTE: This field might contain - // HTML and does not guarantee a SafeHtml security contract - // go/safehtmltypecontracts#safehtml. - TextContent string `json:"textContent,omitempty"` + // Severity: The urgency or risk level of the check. + // + // Possible values: + // "CHECK_SEVERITY_UNSPECIFIED" - Not specified. + // "PRIORITY" - Important privacy issue. + // "POTENTIAL" - Potential privacy issue. + // "OPPORTUNITY" - Opportunity to improve privacy coverage. + Severity string `json:"severity,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataType") to + // State: The result after running the check. + // + // Possible values: + // "CHECK_STATE_UNSPECIFIED" - Not specified. + // "PASSED" - The check passed. + // "FAILED" - The check failed. + // "UNCHECKED" - The check was not run. + State string `json:"state,omitempty"` + + // StateMetadata: Additional information about the check state in + // relation to past reports. + StateMetadata *GoogleChecksReportV1alphaCheckStateMetadata `json:"stateMetadata,omitempty"` + + // Type: The type of check that was run. A type will only appear once in + // a report's list of checks. + // + // Possible values: + // "CHECK_TYPE_UNSPECIFIED" - Not specified. + // "STORE_LISTING_PRIVACY_POLICY_LINK_PRESENT" - Checks that your + // store listing includes a working link to your privacy policy. + // "PRIVACY_POLICY_UPDATE_DATE_RECENT" - Checks that your privacy + // policy has been updated recently. + // "PRIVACY_POLICY_GDPR_GENERAL_RULES" - Checks if your privacy policy + // references rights under GDPR for users in the EU. + // "PRIVACY_POLICY_CCPA_GENERAL_RULES" - Checks if your privacy policy + // references rights under the CCPA. + // "PRIVACY_POLICY_COLLECTION_CATEGORIES_DATA_NOTICE" - Checks if your + // privacy policy mentions the categories of personal data that are + // collected. + // "PRIVACY_POLICY_PROCESSING_PURPOSE_DATA_NOTICE" - Checks if your + // privacy policy explains why personal data is processed. + // "PRIVACY_POLICY_SHARING_CATEGORIES_DATA_NOTICE" - Checks if your + // privacy policy includes information about third-party sharing of + // personal data. + // "PRIVACY_POLICY_DATA_RETENTION_NOTICE" - Checks if your privacy + // policy describes your data retention practices. + // "PRIVACY_POLICY_CONTACT_DETAILS_NOTICE" - Checks if contact + // information is included in your privacy policy. + // "PRIVACY_POLICY_CHILDREN_GENERAL_RULES" - Checks if information + // about requirements related to children is included in your privacy + // policy. + // "PRIVACY_POLICY_DATA_TYPE_PHONE_NUMBER" - Checks if the Phone + // Number data type declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_USER_ACCOUNT_INFO" - Checks if the User + // Account Info data type declaration in your privacy policy matches + // usage. + // "PRIVACY_POLICY_DATA_TYPE_PRECISE_LOCATION" - Checks if the Precise + // Location data type declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_DEVICE_ID" - Checks if the Device ID data + // type declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_APPS_ON_DEVICE" - Checks if the Apps on + // Device data type declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_CONTACTS" - Checks if the Contacts data + // type declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_TEXT_MESSAGES" - Checks if the Text + // Messages data type declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_PII" - Checks if the PII data type + // declaration in your privacy policy matches usage. + // "PRIVACY_POLICY_DATA_TYPE_PII_CATEGORIES" - Checks if the PII + // Categories data type declaration in your privacy policy matches + // usage. + // "PRIVACY_POLICY_DATA_TYPE_HEALTH_AND_BIOMETRIC" - Checks if the + // Health and Biometric data type declaration in your privacy policy + // matches usage. + // "PRIVACY_POLICY_BRAZIL_LGPD_GENERAL_RULES" - Checks if your privacy + // policy references rights under LGPD for users in Brazil. + // "PRIVACY_POLICY_VIRGINIA_VCDPA_GENERAL_RULES" - Checks if your + // privacy policy references rights under VCDPA for users in Virginia. + // "PRIVACY_POLICY_AFFILIATION_MENTION" - Checks if your privacy + // policy identifies your company or app name(s). + // "PRIVACY_POLICY_RIGHT_TO_DELETE_NOTICE" - Checks if your privacy + // policy mentions your users' right to delete their data. + // "PRIVACY_POLICY_RIGHT_TO_ACCESS_NOTICE" - Checks if your privacy + // policy mentions your users' right to access the data held about them. + // "PRIVACY_POLICY_RIGHT_TO_RECTIFICATION_NOTICE" - Checks if your + // privacy policy mentions your users' right to correct inaccuracies + // within their data. + // "PRIVACY_POLICY_RIGHT_TO_KNOW_ABOUT_SELLING_NOTICE" - Checks if + // your privacy policy mentions your users' right to know about + // information selling. + // "PRIVACY_POLICY_RIGHT_TO_KNOW_ABOUT_SHARING_NOTICE" - Checks if + // your privacy policy mentions your users' right to know about + // information sharing. + // "PRIVACY_POLICY_RIGHT_TO_OPT_OUT_FROM_SELLING_NOTICE" - Checks if + // your privacy policy mentions your users' right to opt out from + // information selling. + // "PRIVACY_POLICY_METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING_NOTICE" - + // Checks if your privacy policy explains how your users opt out from + // the selling or sharing of their data. + // "PRIVACY_POLICY_DATA_CONTROLLER_IDENTITY" - Checks if your privacy + // policy provides the name and contact information for your data + // controller. + // "PRIVACY_POLICY_DPO_CONTACT_DETAILS" - Checks if your privacy + // policy provides the name and contact information for your Data + // Protection Officer. + // "PRIVACY_POLICY_RIGHT_TO_LODGE_A_COMPLAINT" - Checks if your + // privacy policy mentions your users' right to lodge a complaint with a + // supervisory authority. + // "PRIVACY_POLICY_LEGAL_BASIS" - Checks if your privacy policy + // mentions the legal basis you rely on for processing your users' data. + // "PRIVACY_POLICY_CHILDREN_INFO_COLLECTION" - Checks if your privacy + // policy mentions what personal information is collected from children. + // "PRIVACY_POLICY_CHILDREN_INFO_USAGE_PURPOSES" - Checks if your + // privacy policy mentions why you collect personal information from + // children. + // "PRIVACY_POLICY_CHILDREN_INFO_DISCLOSURE_PRACTICES" - Checks if + // your privacy policy mentions what personal information from children + // is shared with third parties. + // "PRIVACY_POLICY_CHILDREN_INFO_PUBLICITY" - Checks if your privacy + // policy mentions whether your app allows children to make their + // personal information publicly available. + // "PRIVACY_POLICY_PARENTS_METHOD_OF_INFO_DELETION" - Checks if your + // privacy policy mentions how parents/caregivers/guardians can request + // the deletion of their child's personal information. + // "PRIVACY_POLICY_PARENTS_METHOD_TO_INFO_REVIEW" - Checks if your + // privacy policy mentions how parents/caregivers/guardians can review + // their child's personal information. + // "PRIVACY_POLICY_PARENTS_METHOD_TO_STOP_FURTHER_INFO_COLLECTION_USE" + // - Checks if your privacy policy explains how a + // parent/caregiver/guardian can stop the collection/use from their + // child's personal information. + // "PRIVACY_POLICY_PARENTS_RIGHT_TO_INFO_DELETION" - Checks if your + // privacy policy mentions the right of a parent/caregiver/guardian to + // request the deletion of their child's personal information. + // "PRIVACY_POLICY_PARENTS_RIGHT_TO_INFO_REVIEW" - Checks if your + // privacy policy mentions the right of a parent/caregiver/guardian to + // review their child's personal information. + // "PRIVACY_POLICY_PARENTS_RIGHT_TO_STOP_FURTHER_INFO_COLLECTION_USE" + // - Checks if your privacy policy mentions the right of a + // parent/caregiver/guardian to stop collection/use from their child's + // personal information. + // "PRIVACY_POLICY_PSL_APPROXIMATE_LOCATION" - Checks if your privacy + // policy mentions collection of your users' approximate location if + // this data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_PRECISE_LOCATION" - Checks if your privacy + // policy mentions collection of your users' precise location if this + // data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_NAME" - Checks if your privacy policy mentions + // collection of your users' personal names if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_EMAIL_ADDRESS" - Checks if your privacy policy + // mentions collection of your users' email addresses if this data type + // is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_USER_IDENTIFIERS" - Checks if your privacy + // policy mentions collection of your users' user IDs if this data type + // is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_ADDRESS" - Checks if your privacy policy + // mentions collection of your users' physical addresses if this data + // type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_PHONE_NUMBER" - Checks if your privacy policy + // mentions collection of your users' phone numbers if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_RACE_AND_ETHNICITY" - Checks if your privacy + // policy mentions collection of your users' race or ethnicity if this + // data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_CREDIT_SCORE" - Checks if your privacy policy + // mentions collection of your users' credit score if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_PURCHASE_HISTORY" - Checks if your privacy + // policy mentions collection of your users' purchase history if this + // data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_HEALTH_INFO" - Checks if your privacy policy + // mentions collection of your users' health info if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_FITNESS_INFO" - Checks if your privacy policy + // mentions collection of your users' fitness info if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_EMAIL_MESSAGES" - Checks if your privacy policy + // mentions collection of your users' emails if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_TEXT_MESSAGES" - Checks if your privacy policy + // mentions collection of your users' text messages if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_PHOTOS" - Checks if your privacy policy + // mentions collection of your users' photos if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_VIDEOS" - Checks if your privacy policy + // mentions collection of your users' videos if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_MUSIC_FILES" - Checks if your privacy policy + // mentions collection of your users' music files if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_VOICE_OR_SOUND_RECORDINGS" - Checks if your + // privacy policy mentions collection of your users' voice or sound + // recordings if this data type is declared in your Play Data Safety + // Section. + // "PRIVACY_POLICY_PSL_FILES_AND_DOCS" - Checks if your privacy policy + // mentions collection of your users' files or documents if this data + // type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_CALENDAR_EVENTS" - Checks if your privacy + // policy mentions collection of your users' calendar events if this + // data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_CONTACTS" - Checks if your privacy policy + // mentions collection of your users' contacts if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_APP_INTERACTIONS" - Checks if your privacy + // policy mentions collection of your users' app interactions if this + // data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_IN_APP_SEARCH_HISTORY" - Checks if your privacy + // policy mentions collection of your users' in-app search history if + // this data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_WEB_BROWSING_HISTORY" - Checks if your privacy + // policy mentions collection of your users' web browsing history if + // this data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_INSTALLED_APPS" - Checks if your privacy policy + // mentions collection of your users' installed apps if this data type + // is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_CRASH_LOGS" - Checks if your privacy policy + // mentions collection of your users' crash logs if this data type is + // declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_DIAGNOSTICS" - Checks if your privacy policy + // mentions collection of your users' performance diagnostics if this + // data type is declared in your Play Data Safety Section. + // "PRIVACY_POLICY_PSL_DEVICE_OR_OTHER_IDS" - Checks if your privacy + // policy mentions collection of your users' device or other IDs if this + // data type is declared in your Play Data Safety Section. + // "DATA_MONITORING_NEW_ENDPOINT" - Checks if there is a new endpoint + // we've recently detected. Because this check accounts for flakiness, + // it may fail for several weeks even if the endpoint is not detected in + // the current report. + // "DATA_MONITORING_NEW_PERMISSION" - Checks if there is a new + // permission we've recently detected. Because this check accounts for + // flakiness, it may fail for several weeks even if the permission is + // not detected in the current report. + // "DATA_MONITORING_NEW_DATA_TYPE" - Checks if there is a new data + // type we've recently detected. Because this check accounts for + // flakiness, it may fail for several weeks even if the data type is not + // detected in the current report. + // "DATA_MONITORING_NEW_SDK" - Checks if there is a new SDK we've + // recently detected. Because this check accounts for flakiness, it may + // fail for several weeks even if the SDK is not detected in the current + // report. + // "DATA_MONITORING_ENCRYPTION" - Checks if there is any endpoint + // contacted using HTTP protocol instead of HTTPS. If no protocol is + // found in the URL, the endpoint is not considered for analysis. + // "DATA_MONITORING_NEW_DATA_TYPE_VERSION_DIFF" - Checks if new data + // types have been detected since a specific app version. + // "DATA_MONITORING_NEW_ENDPOINT_VERSION_DIFF" - Checks if new + // endpoints have been detected since a specific app version. + // "DATA_MONITORING_NEW_PERMISSION_VERSION_DIFF" - Checks if new + // permissions have been detected since a specific app version. + // "DATA_MONITORING_NEW_SDK_VERSION_DIFF" - Checks if new SDKs have + // been detected since a specific app version. + // "DATA_MONITORING_SDKS_DENYLIST_VIOLATION" - Checks if any SDKs were + // detected that are specified in the denylist. + // "DATA_MONITORING_PERMISSIONS_DENYLIST_VIOLATION" - Checks if any + // permissions were detected that are specified in the denylist. + // "DATA_MONITORING_ENDPOINTS_DENYLIST_VIOLATION" - Checks if any + // endpoints were detected that are specified in the denylist. + // "DATA_MONITORING_OUTDATED_SDK_VERSION" - Checks if there are any + // outdated SDKs. + // "DATA_MONITORING_CRITICAL_SDK_ISSUE" - Checks if there are any SDKs + // with critical issues. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Citations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -663,7 +864,7 @@ type PolicyDataTypeAnnotation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataType") to include in + // NullFields is a list of field names (e.g. "Citations") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -672,80 +873,105 @@ type PolicyDataTypeAnnotation struct { NullFields []string `json:"-"` } -func (s *PolicyDataTypeAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod PolicyDataTypeAnnotation +func (s *GoogleChecksReportV1alphaCheck) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheck raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *PolicyDataTypeAnnotation) UnmarshalJSON(data []byte) error { - type NoMethod PolicyDataTypeAnnotation - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil -} - -type PolicyPurposeOfUseAnnotation struct { - // EndOffset: Byte offsets for the end of the purpose of use sentence - // inside the full text. - EndOffset int64 `json:"endOffset,omitempty,string"` - - // PurposeOfUse: Purpose of use mentioned in the policy. +// GoogleChecksReportV1alphaCheckCitation: Regulation or policy that +// serves as the legal basis for the check. +type GoogleChecksReportV1alphaCheckCitation struct { + // Type: Citation type. // // Possible values: - // "PURPOSE_OF_USE_UNSPECIFIED" - Default value. - // "APP_FUNCTIONALITY" - Data is used for general app functions, or - // interface with the user, e.g. customer support. - // "APP_DIAGNOSTICS_AND_PERFORMANCE" - Data is used for minimizing app - // crashes, enabling scalability and performance, etc. - // "FRAUD_PREVENTION_AND_SECURITY" - Data is used for fraud - // prevention, protecting user accounts, or other security purposes. - // "PRODUCT_PERSONALIZATION" - Data is used for - // personalizing/customizing what the user sees. - // "ANALYTICS" - Data is used for evaluating user behavior, measuring - // audience size, etc. - // "DEVELOPERS_COMMUNICATION_AND_MARKETING" - Data is used for sending - // marketing communications directly to your users, notifications, - // reminders, or update notices. - // "THIRD_PARTY_ADVERTISING" - Data is used by a third-party to - // display ads in the app (or elsewhere). - // "GENERAL_ADVERTISING" - Data is used for displaying ads in the app, - // or sharing data with entities who display ads. - // "LEGAL_COMPLIANCE" - Data is used for compliance with legal - // obligations, e.g., regulations, government data requests, law - // enforcement requests in general, etc. - // "MERGERS_AND_ACQUISITIONS" - If a company/organization merges or is - // acquired it transfers users' information to another - // company/organization. - // "OTHER_SPECIFIED_PURPOSE" - Any other specific purposes that are - // not listed above. - // "NO_PURPOSE_MENTIONED" - The purpose of use is not explicitly - // stated or unclear. - PurposeOfUse string `json:"purposeOfUse,omitempty"` + // "CITATION_TYPE_UNSPECIFIED" - Not specified. + // "COPPA" - Children's Online Privacy Protection Act. + // "GDPR" - General Data Protection Regulation. + // "FERPA" - Family Educational Rights and Privacy Act. + // "CAL_OPPA" - The California Online Privacy Protection Act. + // "CCPA" - California Consumer Privacy Act. + // "SOPIPA" - Student Online Personal Information Protection Act. + // "LGPD" - Lei Geral de Proteção de Dados. + // "CPRA" - California Consumer Privacy Act. + // "VCDPA" - Virginia Consumer Data Protection Act. + // "GOOGLE_PLAY_POLICY" - Google Play Policy. + // "APP_STORE_POLICY" - App Store Policy. + // "CPA" - Colorado Privacy Act. + // "CTDPA" - Connecticut Data Privacy Act. + // "UCPA" - Utah Consumer Privacy Act. + // "PIPEDA" - Personal Information Protection and Electronic Documents + // Act. + // "ALBERTA_PIPA" - Alberta (Canada) Personal Information Protection + // Act. + // "QUEBEC_ACT" - Quebec: Act Respecting the Protection of Personal + // Information in the Private Sector. + // "QUEBEC_BILL_64" - Quebec Bill 64: An Act to Modernize Legislative + // Provisions as Regards the Protection of Personal Information. + // "CHINA_PIPL" - China Personal Information Protection Law. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Score: Score given by the model representing how confident it was - // regarding this `text_content` being of `purpose_of_use`. - Score float64 `json:"score,omitempty"` + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // StartOffset: Byte offsets for the start of the purpose of use - // sentence inside the full text. - StartOffset int64 `json:"startOffset,omitempty,string"` +func (s *GoogleChecksReportV1alphaCheckCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckCitation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // TextContent: The bytes of actual text content in the sentence that - // mentions the purpose of use. This makes it much easier to consume the - // information. NOTE: This field might contain HTML and does not - // guarantee a SafeHtml security contract - // go/safehtmltypecontracts#safehtml. - TextContent string `json:"textContent,omitempty"` +// GoogleChecksReportV1alphaCheckDataSecurityEvidence: Evidence +// concerning data security. +type GoogleChecksReportV1alphaCheckDataSecurityEvidence struct { + // DataInTransitInfo: Evidence related to data in transit. + DataInTransitInfo []*GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo `json:"dataInTransitInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndOffset") to + // ForceSendFields is a list of field names (e.g. "DataInTransitInfo") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataInTransitInfo") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckDataSecurityEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckDataSecurityEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo: +// Evidence related to data in transit detected in your app. +type GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo struct { + // Uri: The URL contacted by your app. This includes the protocol, + // domain, and URL parameters. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -753,7 +979,120 @@ type PolicyPurposeOfUseAnnotation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndOffset") to include in + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckDataTypeEvidence: Evidence concerning a +// data type that was found in your app. +type GoogleChecksReportV1alphaCheckDataTypeEvidence struct { + // DataType: The data type that was found in your app. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Not specified. + // "DATA_TYPE_APPROXIMATE_LOCATION" - User or device physical location + // to an area greater than or equal to 3 square kilometers, such as the + // city a user is in, or location provided by Android's + // ACCESS_COARSE_LOCATION permission. + // "DATA_TYPE_PRECISE_LOCATION" - User or device physical location + // within an area less than 3 square kilometers, such as location + // provided by Android's ACCESS_FINE_LOCATION permission. + // "DATA_TYPE_PERSONAL_NAME" - How a user refers to themselves, such + // as their first or last name, or nickname. + // "DATA_TYPE_EMAIL_ADDRESS" - A user's email address. + // "DATA_TYPE_USER_IDS" - Identifiers that relate to an identifiable + // person. For example, an account ID, account number, or account name. + // "DATA_TYPE_PHYSICAL_ADDRESS" - A user's address, such as a mailing + // or home address. + // "DATA_TYPE_PHONE_NUMBER" - A user's phone number. + // "DATA_TYPE_RACE_AND_ETHNICITY" - Information about a user's race or + // ethnicity. + // "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS" - Information about a + // user's political or religious beliefs. + // "DATA_TYPE_SEXUAL_ORIENTATION" - Information about a user's sexual + // orientation. + // "DATA_TYPE_OTHER_PERSONAL_INFO" - Any other personal information + // such as date of birth, gender identity, veteran status, etc. + // "DATA_TYPE_PAYMENT_INFO" - Information about a user's financial + // accounts such as credit card number. + // "DATA_TYPE_PURCHASE_HISTORY" - Information about purchases or + // transactions a user has made. + // "DATA_TYPE_CREDIT_SCORE" - Information about a user's credit score. + // "DATA_TYPE_OTHER_FINANCIAL_INFO" - Any other financial information + // such as user salary or debts. + // "DATA_TYPE_HEALTH_INFO" - Information about a user's health, such + // as medical records or symptoms. + // "DATA_TYPE_FITNESS_INFO" - Information about a user's fitness, such + // as exercise or other physical activity. + // "DATA_TYPE_EMAILS" - A user's emails including the email subject + // line, sender, recipients, and the content of the email. + // "DATA_TYPE_TEXT_MESSAGES" - A user's text messages including the + // sender, recipients, and the content of the message. + // "DATA_TYPE_PHOTOS" - A user's photos. + // "DATA_TYPE_VIDEOS" - A user's videos. + // "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS" - A user's voice such as a + // voicemail or a sound recording. + // "DATA_TYPE_MUSIC_FILES" - A user's music files. + // "DATA_TYPE_OTHER_AUDIO_FILES" - Any other user-created or + // user-provided audio files. + // "DATA_TYPE_FILES_AND_DOCS" - A user's files or documents, or + // information about their files or documents such as file names. + // "DATA_TYPE_CALENDAR_EVENTS" - Information from a user's calendar + // such as events, event notes, and attendees. + // "DATA_TYPE_CONTACTS" - Information about the user’s contacts such + // as contact names, message history, and social graph information like + // usernames, contact recency, contact frequency, interaction duration + // and call history. + // "DATA_TYPE_APP_INTERACTIONS" - Information about how a user + // interacts with your app, such as the number of page views or taps. + // "DATA_TYPE_IN_APP_SEARCH_HISTORY" - Information about what a user + // has searched for in your app. + // "DATA_TYPE_INSTALLED_APPS" - Inventory of apps or packages + // installed on the user’s device. + // "DATA_TYPE_OTHER_USER_GENERATED_CONTENT" - Any other user-generated + // content not listed here, or in any other section. For example, user + // bios, notes, or open-ended responses. + // "DATA_TYPE_OTHER_ACTIONS" - Any other user activity or actions + // in-app not listed here such as gameplay, likes, and dialog options. + // "DATA_TYPE_WEB_BROWSING_HISTORY" - Information about the websites a + // user has visited. + // "DATA_TYPE_CRASH_LOGS" - Crash log data from your app. For example, + // the number of times your app has crashed, stack traces, or other + // information directly related to a crash. + // "DATA_TYPE_PERFORMANCE_DIAGNOSTICS" - Information about the + // performance of your app. For example battery life, loading time, + // latency, framerate, or any technical diagnostics. + // "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA" - Any other app performance + // data not listed here. + // "DATA_TYPE_DEVICE_OR_OTHER_IDS" - Identifiers that relate to an + // individual device, browser or app. For example, an IMEI number, MAC + // address, Widevine Device ID, Firebase installation ID, or advertising + // identifier. + DataType string `json:"dataType,omitempty"` + + // DataTypeEvidence: Evidence collected about the data type. + DataTypeEvidence *GoogleChecksReportV1alphaDataTypeEvidence `json:"dataTypeEvidence,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataType") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -762,130 +1101,78 @@ type PolicyPurposeOfUseAnnotation struct { NullFields []string `json:"-"` } -func (s *PolicyPurposeOfUseAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod PolicyPurposeOfUseAnnotation +func (s *GoogleChecksReportV1alphaCheckDataTypeEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckDataTypeEvidence raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *PolicyPurposeOfUseAnnotation) UnmarshalJSON(data []byte) error { - type NoMethod PolicyPurposeOfUseAnnotation - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil +// GoogleChecksReportV1alphaCheckEndpointEvidence: Evidence concerning +// an endpoint that was contacted by your app. +type GoogleChecksReportV1alphaCheckEndpointEvidence struct { + // Endpoint: The endpoint that was contacted by your app. + Endpoint *GoogleChecksReportV1alphaEndpoint `json:"endpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoint") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } -type PolicySectionAnnotation struct { - // EndOffset: Byte offsets for the end of the section inside the full - // text. - EndOffset int64 `json:"endOffset,omitempty,string"` +func (s *GoogleChecksReportV1alphaCheckEndpointEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckEndpointEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Score: Score given by the model representing how confident it was - // regarding this `text_content` being of `section_type`. - Score float64 `json:"score,omitempty"` +// GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence: +// Evidence collected from endpoint restriction violation analysis. +type GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence struct { + // EndpointDetails: Endpoints in violation. + EndpointDetails []*GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails `json:"endpointDetails,omitempty"` - // SectionType: Type of the high-level category in the policy. - // - // Possible values: - // "SECTION_TYPE_UNSPECIFIED" - Default value. - // "FIRST_PARTY_COLLECTION" - Section of the privacy policy describes - // 1st party collection practices. - // "FIRST_PARTY_USE" - Section of the privacy policy describes 1st - // party use practices. - // "THIRD_PARTY_SHARING" - Section of the privacy policy describes 3rd - // party sharing practices. - // "CHILDREN_RELATED" - Section of the privacy policy describes - // Children related content. - // "DATA_RETENTION" - Section of the privacy policy describes data - // retention practices. - // "PRIVACY_CONTACT" - Section of the privacy policy references - // privacy contact information. - // "RIGHT_TO_DELETE" - Section of the privacy policy describes users' - // right of data deletion. - // "RIGHT_TO_RESTRICT_PROCESSING" - Section of the privacy policy - // about users' right to restrict processing. - // "RIGHT_TO_ACCESS" - Section of the privacy policy about users' - // right to access their data. - // "RIGHT_TO_RECTIFICATION" - Section of the privacy policy about - // users' right to correct inaccuracies. - // "RIGHT_TO_KNOW_ABOUT_SELLING" - Section of the privacy policy about - // users' right to know about information selling. - // "RIGHT_TO_KNOW_ABOUT_SHARING" - Section of the privacy policy about - // users' right to know about information sharing. - // "RIGHT_TO_OPT_OUT_FROM_SELLING" - Section of the privacy policy - // about users' right to opt out from information selling. - // "RIGHT_TO_OPT_OUT_FROM_SHARING" - Section of the privacy policy - // about users' right to opt out from information sharing. - // "METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING" - Section of the - // privacy policy about the method to opt out from selling or sharing. - // "AUTHORIZED_AGENT" - Section of the privacy policy about the - // authorized agent designated by user. - // "CCPA_CPRA_REFERENCE" - Section of the privacy policy about the - // mentions of the CCPA or CPRA. - // "DATA_PROTECTION_OFFICER" - Section of the privacy policy about the - // mentions of data protection officer (DPO). - // "DATA_CONTROLLER" - Section of the privacy policy about the - // mentions of a data controller. - // "DO_NOT_SELL" - Section of the privacy policy stating that the - // company does not sell data in general (or as defined by the CCPA), - // without exceptions. - // "GDPR_REFERENCE" - Section of the privacy policy about the mentions - // of the GDPR (General Data Protection Regulation). - // "LAWFUL_LEGAL_BASIS" - Section of the privacy policy about - // lawful/legal basis for data processing. - // "PRIVACY_SHIELD" - Section of the privacy policy about the Privacy - // Shielf framework. - // "RIGHT_TO_LODGE_A_COMPLAINT" - Section of the privacy policy about - // the right to lodge a complaint with a supervisory authority. - // "TRANSFER_MECHANISMS" - Section of the privacy policy about - // transfer mechanisms of data from the EU to third countries - // "NO_CHILDREN_DATA_COLLECTION" - Section of the privacy policy - // stating that the company does not collect data from children. - // "NO_CHILDREN_DATA_SHARING" - Section of the privacy policy stating - // that the company does not share data from children. - // "CHILDREN_INFORMATION_PUBLICITY" - Section of the privacy policy - // stating whether the app allows children to make their personal - // information publicly available. - // "PARENTS_METHOD_OF_INFORMATION_DELETION" - Section of the privacy - // policy stating to parents/caregivers/guardians how they can request - // the deletion of their child's personal information. - // "PARENTS_METHOD_TO_INFORMATION_REVIEW" - Section of the privacy - // policy stating to parents/guardians/caregivers how they can review - // their child's personal information. - // "PARENTS_METHOD_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" - - // Section of the privacy policy stating to parents/caregivers/guardians - // how they can stop the further collection or use of their child's - // personal information. - // "PARENTS_RIGHT_TO_INFORMATION_DELETION" - Section of the privacy - // policy stating that a parent/caregiver/guardian has the right to - // request the deletion of their child's personal. information. - // "PARENTS_RIGHT_TO_INFORMATION_REVIEW" - Section of the privacy - // policy stating to parents/guardians/caregivers that they have a right - // to review their child's personal information. - // "PARENTS_RIGHT_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" - - // Section of the privacy policy stating to parents/caregivers/guardians - // that they have the right to stop the further collection or use of - // their child's personal information. - SectionType string `json:"sectionType,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointDetails") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // StartOffset: Byte offsets for the start of the section inside the - // full text. - StartOffset int64 `json:"startOffset,omitempty,string"` + // NullFields is a list of field names (e.g. "EndpointDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // TextContent: Actual text content in the section. This makes it much - // easier to consume the information. NOTE: This field might contain - // HTML and does not guarantee a SafeHtml security contract - // go/safehtmltypecontracts#safehtml. - TextContent string `json:"textContent,omitempty"` +func (s *GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ForceSendFields is a list of field names (e.g. "EndOffset") to +// GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndp +// ointDetails: Details of the endpoint in violation. +type GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails struct { + // Endpoint: The endpoint in violation. + Endpoint *GoogleChecksReportV1alphaEndpoint `json:"endpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -893,7 +1180,7 @@ type PolicySectionAnnotation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndOffset") to include in + // NullFields is a list of field names (e.g. "Endpoint") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -902,175 +1189,2550 @@ type PolicySectionAnnotation struct { NullFields []string `json:"-"` } -func (s *PolicySectionAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod PolicySectionAnnotation +func (s *GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *PolicySectionAnnotation) UnmarshalJSON(data []byte) error { - type NoMethod PolicySectionAnnotation - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod +// GoogleChecksReportV1alphaCheckEvidence: Evidence for a check. +type GoogleChecksReportV1alphaCheckEvidence struct { + // DataSecurity: Evidence concerning data security. + DataSecurity *GoogleChecksReportV1alphaCheckDataSecurityEvidence `json:"dataSecurity,omitempty"` + + // DataTypes: Evidence concerning data types found in your app. + DataTypes []*GoogleChecksReportV1alphaCheckDataTypeEvidence `json:"dataTypes,omitempty"` + + // EndpointRestrictionViolations: Evidence collected from endpoint + // restriction violation analysis. + EndpointRestrictionViolations []*GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence `json:"endpointRestrictionViolations,omitempty"` + + // Endpoints: Evidence concerning endpoints that were contacted by your + // app. + Endpoints []*GoogleChecksReportV1alphaCheckEndpointEvidence `json:"endpoints,omitempty"` + + // PermissionRestrictionViolations: Evidence collected from permission + // restriction violation analysis. + PermissionRestrictionViolations []*GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence `json:"permissionRestrictionViolations,omitempty"` + + // Permissions: Evidence concerning permissions that were found in your + // app. + Permissions []*GoogleChecksReportV1alphaCheckPermissionEvidence `json:"permissions,omitempty"` + + // PrivacyPolicyTexts: Evidence collected from your privacy policy(s). + PrivacyPolicyTexts []*GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence `json:"privacyPolicyTexts,omitempty"` + + // SdkIssues: Evidence concerning SDK issues. + SdkIssues []*GoogleChecksReportV1alphaCheckSdkIssueEvidence `json:"sdkIssues,omitempty"` + + // SdkRestrictionViolations: Evidence collected from SDK restriction + // violation analysis. + SdkRestrictionViolations []*GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence `json:"sdkRestrictionViolations,omitempty"` + + // Sdks: Evidence concerning SDKs that were found in your app. + Sdks []*GoogleChecksReportV1alphaCheckSdkEvidence `json:"sdks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSecurity") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataSecurity") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckPermissionEvidence: Evidence concerning +// a permission that was found in your app. +type GoogleChecksReportV1alphaCheckPermissionEvidence struct { + // Permission: The permission that was found in your app. + Permission *GoogleChecksReportV1alphaPermission `json:"permission,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permission") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permission") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckPermissionEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckPermissionEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence: +// Evidence collected from permission restriction violation analysis. +type GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence struct { + // PermissionDetails: Permissions in violation. + PermissionDetails []*GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails `json:"permissionDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PermissionDetails") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PermissionDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePe +// rmissionDetails: Details of the permission in violation. +type GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails struct { + // Permission: The permission in violation. + Permission *GoogleChecksReportV1alphaPermission `json:"permission,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permission") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permission") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence: Evidence +// collected from your privacy policy(s). +type GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence struct { + // PolicyFragment: The privacy policy fragment that was used during the + // check. + PolicyFragment *GoogleChecksReportV1alphaPolicyFragment `json:"policyFragment,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PolicyFragment") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PolicyFragment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckSdkEvidence: Evidence conerning an SDK +// that was found in your app. +type GoogleChecksReportV1alphaCheckSdkEvidence struct { + // Sdk: The SDK that was found in your app. + Sdk *GoogleChecksReportV1alphaSdk `json:"sdk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Sdk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Sdk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckSdkEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckSdkEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckSdkIssueEvidence: Evidence concerning +// an SDK issue. +type GoogleChecksReportV1alphaCheckSdkIssueEvidence struct { + // Sdk: The SDK with an issue. + Sdk *GoogleChecksReportV1alphaSdk `json:"sdk,omitempty"` + + // SdkVersion: The SDK version. + SdkVersion string `json:"sdkVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Sdk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Sdk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckSdkIssueEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckSdkIssueEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence: +// Evidence collected from SDK restriction violation analysis. +type GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence struct { + // SdkDetails: SDKs in violation. + SdkDetails []*GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails `json:"sdkDetails,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SdkDetails") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SdkDetails") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetail +// s: Details of the SDK in violation. +type GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails struct { + // Sdk: The SDK in violation. + Sdk *GoogleChecksReportV1alphaSdk `json:"sdk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Sdk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Sdk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaCheckStateMetadata: Additional information +// about the check state in relation to past reports. +type GoogleChecksReportV1alphaCheckStateMetadata struct { + // Badges: Indicators related to the check state. + // + // Possible values: + // "CHECK_STATE_BADGE_UNSPECIFIED" - Not specified. + // "NEWLY_FAILING" - The check is newly failing, i.e. now failing but + // previously passing. + // "RECENTLY_FAILING" - The check is currently failing and first + // started failing continuously within the last 28 days. + // "RESOLVED" - The check is newly passing, i.e. now passing but + // previously failing. + Badges []string `json:"badges,omitempty"` + + // FirstFailingTime: The time when the check first started failing. + FirstFailingTime string `json:"firstFailingTime,omitempty"` + + // LastFailingTime: The last time the check failed. + LastFailingTime string `json:"lastFailingTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Badges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Badges") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaCheckStateMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaCheckStateMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataMonitoring: Represents the data +// monitoring section of the report. +type GoogleChecksReportV1alphaDataMonitoring struct { + // DataTypes: Data types that your app shares or collects. + DataTypes []*GoogleChecksReportV1alphaDataMonitoringDataTypeResult `json:"dataTypes,omitempty"` + + // Endpoints: Endpoints that were found by dynamic analysis of your app. + Endpoints []*GoogleChecksReportV1alphaDataMonitoringEndpointResult `json:"endpoints,omitempty"` + + // Permissions: Permissions that your app uses. + Permissions []*GoogleChecksReportV1alphaDataMonitoringPermissionResult `json:"permissions,omitempty"` + + // Sdks: SDKs that your app uses. + Sdks []*GoogleChecksReportV1alphaDataMonitoringSdkResult `json:"sdks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataTypes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataTypes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataMonitoring) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataMonitoring + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataMonitoringDataTypeResult: Information +// about a data type that was found in your app. +type GoogleChecksReportV1alphaDataMonitoringDataTypeResult struct { + // DataType: The data type that was shared or collected by your app. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Not specified. + // "DATA_TYPE_APPROXIMATE_LOCATION" - User or device physical location + // to an area greater than or equal to 3 square kilometers, such as the + // city a user is in, or location provided by Android's + // ACCESS_COARSE_LOCATION permission. + // "DATA_TYPE_PRECISE_LOCATION" - User or device physical location + // within an area less than 3 square kilometers, such as location + // provided by Android's ACCESS_FINE_LOCATION permission. + // "DATA_TYPE_PERSONAL_NAME" - How a user refers to themselves, such + // as their first or last name, or nickname. + // "DATA_TYPE_EMAIL_ADDRESS" - A user's email address. + // "DATA_TYPE_USER_IDS" - Identifiers that relate to an identifiable + // person. For example, an account ID, account number, or account name. + // "DATA_TYPE_PHYSICAL_ADDRESS" - A user's address, such as a mailing + // or home address. + // "DATA_TYPE_PHONE_NUMBER" - A user's phone number. + // "DATA_TYPE_RACE_AND_ETHNICITY" - Information about a user's race or + // ethnicity. + // "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS" - Information about a + // user's political or religious beliefs. + // "DATA_TYPE_SEXUAL_ORIENTATION" - Information about a user's sexual + // orientation. + // "DATA_TYPE_OTHER_PERSONAL_INFO" - Any other personal information + // such as date of birth, gender identity, veteran status, etc. + // "DATA_TYPE_PAYMENT_INFO" - Information about a user's financial + // accounts such as credit card number. + // "DATA_TYPE_PURCHASE_HISTORY" - Information about purchases or + // transactions a user has made. + // "DATA_TYPE_CREDIT_SCORE" - Information about a user's credit score. + // "DATA_TYPE_OTHER_FINANCIAL_INFO" - Any other financial information + // such as user salary or debts. + // "DATA_TYPE_HEALTH_INFO" - Information about a user's health, such + // as medical records or symptoms. + // "DATA_TYPE_FITNESS_INFO" - Information about a user's fitness, such + // as exercise or other physical activity. + // "DATA_TYPE_EMAILS" - A user's emails including the email subject + // line, sender, recipients, and the content of the email. + // "DATA_TYPE_TEXT_MESSAGES" - A user's text messages including the + // sender, recipients, and the content of the message. + // "DATA_TYPE_PHOTOS" - A user's photos. + // "DATA_TYPE_VIDEOS" - A user's videos. + // "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS" - A user's voice such as a + // voicemail or a sound recording. + // "DATA_TYPE_MUSIC_FILES" - A user's music files. + // "DATA_TYPE_OTHER_AUDIO_FILES" - Any other user-created or + // user-provided audio files. + // "DATA_TYPE_FILES_AND_DOCS" - A user's files or documents, or + // information about their files or documents such as file names. + // "DATA_TYPE_CALENDAR_EVENTS" - Information from a user's calendar + // such as events, event notes, and attendees. + // "DATA_TYPE_CONTACTS" - Information about the user’s contacts such + // as contact names, message history, and social graph information like + // usernames, contact recency, contact frequency, interaction duration + // and call history. + // "DATA_TYPE_APP_INTERACTIONS" - Information about how a user + // interacts with your app, such as the number of page views or taps. + // "DATA_TYPE_IN_APP_SEARCH_HISTORY" - Information about what a user + // has searched for in your app. + // "DATA_TYPE_INSTALLED_APPS" - Inventory of apps or packages + // installed on the user’s device. + // "DATA_TYPE_OTHER_USER_GENERATED_CONTENT" - Any other user-generated + // content not listed here, or in any other section. For example, user + // bios, notes, or open-ended responses. + // "DATA_TYPE_OTHER_ACTIONS" - Any other user activity or actions + // in-app not listed here such as gameplay, likes, and dialog options. + // "DATA_TYPE_WEB_BROWSING_HISTORY" - Information about the websites a + // user has visited. + // "DATA_TYPE_CRASH_LOGS" - Crash log data from your app. For example, + // the number of times your app has crashed, stack traces, or other + // information directly related to a crash. + // "DATA_TYPE_PERFORMANCE_DIAGNOSTICS" - Information about the + // performance of your app. For example battery life, loading time, + // latency, framerate, or any technical diagnostics. + // "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA" - Any other app performance + // data not listed here. + // "DATA_TYPE_DEVICE_OR_OTHER_IDS" - Identifiers that relate to an + // individual device, browser or app. For example, an IMEI number, MAC + // address, Widevine Device ID, Firebase installation ID, or advertising + // identifier. + DataType string `json:"dataType,omitempty"` + + // DataTypeEvidence: Evidence collected about the data type. + DataTypeEvidence *GoogleChecksReportV1alphaDataTypeEvidence `json:"dataTypeEvidence,omitempty"` + + // Metadata: Metadata about the result. + Metadata *GoogleChecksReportV1alphaDataMonitoringResultMetadata `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataMonitoringDataTypeResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataMonitoringDataTypeResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataMonitoringEndpointResult: Information +// about an endpoint that was contacted by your app. +type GoogleChecksReportV1alphaDataMonitoringEndpointResult struct { + // Endpoint: The endpoint that was contacted by your app. + Endpoint *GoogleChecksReportV1alphaEndpoint `json:"endpoint,omitempty"` + + // HitCount: The number of times this endpoint was contacted by your + // app. + HitCount int64 `json:"hitCount,omitempty"` + + // Metadata: Metadata about the result. + Metadata *GoogleChecksReportV1alphaDataMonitoringResultMetadata `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoint") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataMonitoringEndpointResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataMonitoringEndpointResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataMonitoringPermissionResult: Information +// about a permission that was found in your app. +type GoogleChecksReportV1alphaDataMonitoringPermissionResult struct { + // Metadata: Metadata about the result. + Metadata *GoogleChecksReportV1alphaDataMonitoringResultMetadata `json:"metadata,omitempty"` + + // Permission: The permission that was found in your app. + Permission *GoogleChecksReportV1alphaPermission `json:"permission,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Metadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Metadata") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataMonitoringPermissionResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataMonitoringPermissionResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataMonitoringResultMetadata: Information +// about a data monitoring result. +type GoogleChecksReportV1alphaDataMonitoringResultMetadata struct { + // Badges: Badges that apply to this result. + // + // Possible values: + // "DATA_MONITORING_RESULT_BADGE_UNSPECIFIED" - Not specified. + // "NEW" - Indicates a newly detected result in the data monitoring + // report. + Badges []string `json:"badges,omitempty"` + + // FirstDetectedTime: The timestamp when this result was first detected + // within the last 8 weeks. If not set, it wasn't detected within the + // last 8 weeks. + FirstDetectedTime string `json:"firstDetectedTime,omitempty"` + + // LastDetectedAppVersion: Your app's version name when this result was + // last detected within the last 8 weeks. If not set, it wasn't detected + // within the last 8 weeks. + LastDetectedAppVersion string `json:"lastDetectedAppVersion,omitempty"` + + // LastDetectedTime: The timestamp when this result was last detected + // within the last 8 weeks. If not set, it wasn't detected within the + // last 8 weeks. + LastDetectedTime string `json:"lastDetectedTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Badges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Badges") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataMonitoringResultMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataMonitoringResultMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataMonitoringSdkResult: Information about +// an SDK that was found in your app. +type GoogleChecksReportV1alphaDataMonitoringSdkResult struct { + // Metadata: Metadata about the result. + Metadata *GoogleChecksReportV1alphaDataMonitoringResultMetadata `json:"metadata,omitempty"` + + // Sdk: The SDK that was found in your app. + Sdk *GoogleChecksReportV1alphaSdk `json:"sdk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Metadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Metadata") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataMonitoringSdkResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataMonitoringSdkResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataTypeEndpointEvidence: Evidence based on +// an endpoint that data was sent to. +type GoogleChecksReportV1alphaDataTypeEndpointEvidence struct { + // AttributedSdks: Set of SDKs that are attributed to the exfiltration. + AttributedSdks []*GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk `json:"attributedSdks,omitempty"` + + // EndpointDetails: Endpoints the data type was sent to. + EndpointDetails []*GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails `json:"endpointDetails,omitempty"` + + // ExfiltratedDataType: Type of data that was exfiltrated. + // + // Possible values: + // "EXFILTRATED_DATA_TYPE_UNSPECIFIED" - Not specified. + // "EXFILTRATED_DATA_TYPE_PHONE_NUMBER" - The user's phone number. + // "EXFILTRATED_DATA_TYPE_PRECISE_LOCATION" - The user's precise + // location. + // "EXFILTRATED_DATA_TYPE_CONTACT_NAME" - Name of one or more contacts + // from the user's phone. + // "EXFILTRATED_DATA_TYPE_CONTACT_EMAIL" - Email of one or more + // contacts from the user's phone. + // "EXFILTRATED_DATA_TYPE_CONTACT_PHONE_NUMBER" - Phone number of one + // or more contacts from the user's phone. + // "EXFILTRATED_DATA_TYPE_INCOMING_TEXT_NUMBER" - Phone number of an + // incoming text message. + // "EXFILTRATED_DATA_TYPE_INCOMING_TEXT_MESSAGE" - Content of an + // incoming text message. + // "EXFILTRATED_DATA_TYPE_OUTGOING_TEXT_NUMBER" - Phone number of an + // outgoing text message. + // "EXFILTRATED_DATA_TYPE_OUTGOING_TEXT_MESSAGE" - Content of an + // outgoing text message. + // "EXFILTRATED_DATA_TYPE_ADVERTISING_ID" - Advertising ID. + // "EXFILTRATED_DATA_TYPE_ANDROID_ID" - Android ID. + // "EXFILTRATED_DATA_TYPE_IMEI" - IMEI. + // "EXFILTRATED_DATA_TYPE_IMSI" - IMSI. + // "EXFILTRATED_DATA_TYPE_SIM_SERIAL_NUMBER" - Sim serial number. + // "EXFILTRATED_DATA_TYPE_SSID" - SSID: Service Set IDentifier, i.e. + // the network's name. + // "EXFILTRATED_DATA_TYPE_ACCOUNT" - Information about the main + // account of the device. + // "EXFILTRATED_DATA_TYPE_EXTERNAL_ACCOUNT" - Information about an + // external account, e.g. Facebook, Twitter. + // "EXFILTRATED_DATA_TYPE_INSTALLED_PACKAGES" - One or more of the + // package names of apps on the device. + ExfiltratedDataType string `json:"exfiltratedDataType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributedSdks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributedSdks") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataTypeEndpointEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataTypeEndpointEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk: +// Details of SDK that is attributed to the exfiltration. +type GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk struct { + // Sdk: SDK that is attributed to the exfiltration. + Sdk *GoogleChecksReportV1alphaSdk `json:"sdk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Sdk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Sdk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails: +// Details of the endpoint the data type was sent to. +type GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails struct { + // Endpoint: Endpoint the data type was sent to. + Endpoint *GoogleChecksReportV1alphaEndpoint `json:"endpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoint") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataTypeEvidence: Evidence collected about a +// data type. +type GoogleChecksReportV1alphaDataTypeEvidence struct { + // Endpoints: List of endpoints the data type was sent to. + Endpoints []*GoogleChecksReportV1alphaDataTypeEndpointEvidence `json:"endpoints,omitempty"` + + // Permissions: List of included permissions that imply collection of + // the data type. + Permissions []*GoogleChecksReportV1alphaDataTypePermissionEvidence `json:"permissions,omitempty"` + + // PrivacyPolicyTexts: List of privacy policy texts that imply + // collection of the data type. + PrivacyPolicyTexts []*GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence `json:"privacyPolicyTexts,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Endpoints") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Endpoints") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataTypeEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataTypeEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataTypePermissionEvidence: Evidence based +// on the inclusion of a permission. +type GoogleChecksReportV1alphaDataTypePermissionEvidence struct { + // Permission: Permission declared by your app. + Permission *GoogleChecksReportV1alphaPermission `json:"permission,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permission") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permission") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataTypePermissionEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataTypePermissionEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence: Evidence +// based on information from the privacy policy. +type GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence struct { + // PolicyFragment: The privacy policy fragment that implies collection + // of the data type. + PolicyFragment *GoogleChecksReportV1alphaPolicyFragment `json:"policyFragment,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PolicyFragment") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PolicyFragment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaEndpoint: Information about an endpoint. +type GoogleChecksReportV1alphaEndpoint struct { + // Domain: Domain name (e.g. ads.google.com). + Domain string `json:"domain,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Domain") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Domain") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaEndpoint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaListReportsResponse: The response message +// for ReportService.ListReports. +type GoogleChecksReportV1alphaListReportsResponse struct { + // NextPageToken: A token which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Reports: The reports for the specified app. + Reports []*GoogleChecksReportV1alphaReport `json:"reports,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaListReportsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaListReportsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaPermission: Information about a permission. +type GoogleChecksReportV1alphaPermission struct { + // Id: Permission identifier. + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaPermission) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaPermission + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaPolicyFragment: Information about a policy +// fragment. +type GoogleChecksReportV1alphaPolicyFragment struct { + // HtmlContent: HTML content. + HtmlContent string `json:"htmlContent,omitempty"` + + // SourceUri: Policy URL. + SourceUri string `json:"sourceUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HtmlContent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HtmlContent") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaPolicyFragment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaPolicyFragment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaReport: Privacy report. +type GoogleChecksReportV1alphaReport struct { + // AppBundle: Information about the analyzed app bundle. + AppBundle *GoogleChecksReportV1alphaAppBundle `json:"appBundle,omitempty"` + + // BaseReport: Resource name of the base report used for comparison. May + // be absent if this is the first report generated for the app. + BaseReport string `json:"baseReport,omitempty"` + + // Checks: List of checks that were run on the app bundle. + Checks []*GoogleChecksReportV1alphaCheck `json:"checks,omitempty"` + + // DataMonitoring: Information related to data monitoring. + DataMonitoring *GoogleChecksReportV1alphaDataMonitoring `json:"dataMonitoring,omitempty"` + + // Name: Resource name of the report. + Name string `json:"name,omitempty"` + + // ResultsUri: A URL to view results. + ResultsUri string `json:"resultsUri,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AppBundle") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppBundle") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChecksReportV1alphaSdk: Information about an SDK. +type GoogleChecksReportV1alphaSdk struct { + // Id: SDK identifier. + Id string `json:"id,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChecksReportV1alphaSdk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChecksReportV1alphaSdk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LastUpdatedDate: Information about the date when the privacy policy +// was last updated. +type LastUpdatedDate struct { + // EndOffset: Byte offsets for the end of the date text inside the full + // text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // LastUpdatedDate: Date when the privacy policy was last updated. + LastUpdatedDate *Date `json:"lastUpdatedDate,omitempty"` + + // StartOffset: Byte offsets for the start of the date text inside the + // full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: The bytes of actual text content in the section. Note: - + // This will correspond to the whole sentence that includes the date. - + // This field might contain HTML and it is not sanitized. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LastUpdatedDate) MarshalJSON() ([]byte, error) { + type NoMethod LastUpdatedDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type PolicyDataTypeAnnotation struct { + // DataType: Type of the data mentioned in the policy. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Default value. Checks cannot determine + // specific data type. + // "CONTACT_INFO_NAME" - Data type on the privacy policy describing + // Contact Info: name. + // "CONTACT_INFO_EMAIL_ADDRESS" - Data type on the privacy policy + // describing Contact Info: email address. + // "CONTACT_INFO_PHONE_NUMBER" - Data type on the privacy policy + // describing Contact Info: phone number. + // "CONTACT_INFO_MAILING_ADDRESS" - Data type on the privacy policy + // describing Contact Info: mailing address. + // "CONTACT_INFO_OTHER" - Data type on the privacy policy describing + // Contact Info: other. + // "IDENTITY_INFO_OTHER" - Data type on the privacy policy describing + // Identity Info: other. + // "USER_CONTENT_EMAIL_MESSAGES" - Data type on the privacy policy + // describing User Content: email messages. + // "USER_CONTENT_TEXT_MESSAGES" - Data type on the privacy policy + // describing User Content: text messages. + // "USER_CONTENT_OTHER_IN_APP_MESSAGES" - Data type on the privacy + // policy describing User Content: other in-app messages. + // "USER_CONTENT_PHOTOS" - Data type on the privacy policy describing + // User Content: photos. + // "USER_CONTENT_VIDEOS" - Data type on the privacy policy describing + // User Content: videos. + // "USER_CONTENT_MUSIC_FILES" - Data type on the privacy policy + // describing User Content: music files. + // "USER_CONTENT_VOICE_OR_SOUND_RECORDINGS" - Data type on the privacy + // policy describing User Content: voice or sound recordings. + // "USER_CONTENT_OTHER_AUDIO_FILES" - Data type on the privacy policy + // describing User Content: other audio files. + // "USER_CONTENT_FILES_AND_DOCS" - Data type on the privacy policy + // describing User Content: files or documents. + // "USER_CONTENT_GAMEPLAY_DATA" - Data type on the privacy policy + // describing User Content: gameplay data. + // "USER_CONTENT_CUSTOMER_SUPPORT" - Data type on the privacy policy + // describing User Content: customer support. + // "COOKIES_AND_TRACKING_ELEMENTS" - Data type on the privacy policy + // describing Cookies and other tracking elements, e.g. web beacons. + // "BROWSING_HISTORY" - Data type on the privacy policy describing + // Browsing History. + // "SEARCH_HISTORY" - Data type on the privacy policy describing + // Search History. + // "PURCHASE_HISTORY" - Data type on the privacy policy describing + // Purchase History. + // "PRODUCT_INTERACTION" - Data type on the privacy policy describing + // Product Interaction data. + // "USER_GENERATED_CONTENT_OTHER" - Data type on the privacy policy + // describing other User Generated Content. + // "IN_APP_ACTIONS_OTHER" - Data type on the privacy policy describing + // other In App Actions. + // "ADVERTISING" - Data type on the privacy policy describing + // Advertising data. + // "APP_CRASH_LOGS" - Data type on the privacy policy describing Crash + // Logs data. + // "APP_DIAGNOSTICS" - Data type on the privacy policy describing App + // Diagnostics data. + // "APP_PERFORMANCE_OTHER" - Data type on the privacy policy + // describing other App Performance data. + // "USER_IDENTIFIERS" - Data type on the privacy policy describing + // User or account-level IDs. + // "DEVICE_IDENTIFIERS" - Data type on the privacy policy describing + // device-level IDs. + // "IP_ADDRESS" - Data type on the privacy policy describing IP + // Addresses. + // "CONTACTS" - Data type on the privacy policy describing Contacts + // data. + // "AUTHENTICATION_DATA" - Data type on the privacy policy describing + // Authentication data, e.g. passwords. + // "CALENDAR_EVENTS_OR_NOTES" - Data type on the privacy policy + // describing Calendar events or notes. + // "HEALTH" - Data type on the privacy policy describing Health data. + // "FITNESS" - Data type on the privacy policy describing Fitness + // data. + // "LOCATION_PRECISE" - Data type on the privacy policy describing + // Precise Location data. + // "LOCATION_COARSE" - Data type on the privacy policy describing + // Coarse Location data. + // "LOCATION_GENERAL" - Data type on the privacy policy describing + // general Location data, without specifying precise or coarse. + // "APPS_ON_DEVICE" - Data type on the privacy policy describing Apps + // on Device. + // "FINANCIAL_PAYMENT_INFO" - Data type on the privacy policy + // describing Financial Payment info. + // "FINANCIAL_CREDIT_INFO" - Data type on the privacy policy + // describing Financial Credit info. + // "FINANCIAL_OTHER" - Data type on the privacy policy describing + // Financial other data. + // "PERSONAL_INFO_RACE_AND_ETHNICITY" - Data type on the privacy + // policy describing a user’s race or ethnicity. + // "PERSONAL_INFO_POLITICAL_OR_RELIGIOUS_BELIEFS" - Data type on the + // privacy policy describing a user’s political or religious beliefs. + // "PERSONAL_INFO_SEXUAL_ORIENTATION" - Data type on the privacy + // policy describing a user’s sexual orientation. + // "PERSONAL_INFO_OTHER" - Data type on the privacy policy describing + // Personal Info other. + // "GENERIC_PERSONAL_INFORMATION" - Data type on the privacy policy + // describing generic personal information, e.g. "we collection your + // personal information." + // "UNSPECIFIED_INFORMATION" - Data type on the privacy policy + // describing information in general with no speicific type, e.g. "we + // collect information you voluntarily provide." + // "OTHER_DATA" - Data type on the privacy policy describing specific + // types of data that are not covered by others labels, or ambiguous + // cases where no clear type exists, e.g. "we collect your movement + // data," which could be location, fitness, or even product interaction, + // depending on the context. + DataType string `json:"dataType,omitempty"` + + // EndOffset: Byte offsets for the end of the data type sentence inside + // the full text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // Score: Score given by the model representing how confident it was + // regarding this `text_content` being of `data_type`. + Score float64 `json:"score,omitempty"` + + // StartOffset: Byte offsets for the start of the data type sentence + // inside the full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: Actual text content in the section. This makes it much + // easier to consume the information. NOTE: This field might contain + // HTML and does not guarantee a SafeHtml security contract + // go/safehtmltypecontracts#safehtml. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyDataTypeAnnotation) MarshalJSON() ([]byte, error) { + type NoMethod PolicyDataTypeAnnotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PolicyDataTypeAnnotation) UnmarshalJSON(data []byte) error { + type NoMethod PolicyDataTypeAnnotation + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +type PolicyPurposeOfUseAnnotation struct { + // EndOffset: Byte offsets for the end of the purpose of use sentence + // inside the full text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // PurposeOfUse: Purpose of use mentioned in the policy. + // + // Possible values: + // "PURPOSE_OF_USE_UNSPECIFIED" - Default value. Checks cannot + // determine specific purpose of use. + // "APP_FUNCTIONALITY" - Data is used for general app functions, or + // interface with the user, e.g. customer support. + // "APP_DIAGNOSTICS_AND_PERFORMANCE" - Data is used for minimizing app + // crashes, enabling scalability and performance, etc. + // "FRAUD_PREVENTION_AND_SECURITY" - Data is used for fraud + // prevention, protecting user accounts, or other security purposes. + // "PRODUCT_PERSONALIZATION" - Data is used for + // personalizing/customizing what the user sees. + // "ANALYTICS" - Data is used for evaluating user behavior, measuring + // audience size, etc. + // "DEVELOPERS_COMMUNICATION_AND_MARKETING" - Data is used for sending + // marketing communications directly to your users, notifications, + // reminders, or update notices. + // "THIRD_PARTY_ADVERTISING" - Data is used by a third-party to + // display ads in the app (or elsewhere). + // "GENERAL_ADVERTISING" - Data is used for displaying ads in the app, + // or sharing data with entities who display ads. + // "LEGAL_COMPLIANCE" - Data is used for compliance with legal + // obligations, e.g., regulations, government data requests, law + // enforcement requests in general, etc. + // "MERGERS_AND_ACQUISITIONS" - If a company/organization merges or is + // acquired it transfers users' information to another + // company/organization. + // "OTHER_SPECIFIED_PURPOSE" - Any other specific purposes that are + // not listed above. + // "NO_PURPOSE_MENTIONED" - The purpose of use is not explicitly + // stated or unclear. + PurposeOfUse string `json:"purposeOfUse,omitempty"` + + // Score: Score given by the model representing how confident it was + // regarding this `text_content` being of `purpose_of_use`. + Score float64 `json:"score,omitempty"` + + // StartOffset: Byte offsets for the start of the purpose of use + // sentence inside the full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: The bytes of actual text content in the sentence that + // mentions the purpose of use. This makes it much easier to consume the + // information. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyPurposeOfUseAnnotation) MarshalJSON() ([]byte, error) { + type NoMethod PolicyPurposeOfUseAnnotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PolicyPurposeOfUseAnnotation) UnmarshalJSON(data []byte) error { + type NoMethod PolicyPurposeOfUseAnnotation + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +type PolicySectionAnnotation struct { + // EndOffset: Byte offsets for the end of the section inside the full + // text. + EndOffset int64 `json:"endOffset,omitempty,string"` + + // Score: Score given by the model representing how confident it was + // regarding this `text_content` being of `section_type`. + Score float64 `json:"score,omitempty"` + + // SectionType: Detected type of the high-level topic in the policy. + // + // Possible values: + // "SECTION_TYPE_UNSPECIFIED" - Default value. Checks cannot determine + // specific section type. + // "FIRST_PARTY_COLLECTION" - Section of the privacy policy describes + // 1st party collection practices. + // "FIRST_PARTY_USE" - Section of the privacy policy describes 1st + // party use practices. + // "THIRD_PARTY_SHARING" - Section of the privacy policy describes 3rd + // party sharing practices. + // "CHILDREN_RELATED" - Section of the privacy policy describing + // content related to children. + // "DATA_RETENTION" - Section of the privacy policy describes data + // retention practices. + // "PRIVACY_CONTACT" - Section of the privacy policy references + // privacy contact information. + // "RIGHT_TO_DELETE" - Section of the privacy policy describes users' + // right of data deletion. + // "RIGHT_TO_RESTRICT_PROCESSING" - Section of the privacy policy + // about users' right to restrict processing. + // "RIGHT_TO_ACCESS" - Section of the privacy policy about users' + // right to access their data. + // "RIGHT_TO_RECTIFICATION" - Section of the privacy policy about + // users' right to correct inaccuracies. + // "RIGHT_TO_KNOW_ABOUT_SELLING" - Section of the privacy policy about + // users' right to know about information selling. + // "RIGHT_TO_KNOW_ABOUT_SHARING" - Section of the privacy policy about + // users' right to know about information sharing. + // "RIGHT_TO_OPT_OUT_FROM_SELLING" - Section of the privacy policy + // about users' right to opt out from information selling. + // "RIGHT_TO_OPT_OUT_FROM_SHARING" - Section of the privacy policy + // about users' right to opt out from information sharing. + // "METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING" - Section of the + // privacy policy about the method to opt out from selling or sharing. + // "AUTHORIZED_AGENT" - Section of the privacy policy about the + // authorized agent designated by user. + // "CCPA_CPRA_REFERENCE" - Section of the privacy policy about the + // mentions of the CCPA or CPRA. + // "DATA_PROTECTION_OFFICER" - Section of the privacy policy about the + // mentions of data protection officer (DPO). + // "DATA_CONTROLLER" - Section of the privacy policy about the + // mentions of a data controller. + // "DO_NOT_SELL" - Section of the privacy policy stating that the + // company does not sell data in general (or as defined by the CCPA), + // without exceptions. + // "GDPR_REFERENCE" - Section of the privacy policy about the mentions + // of the GDPR (General Data Protection Regulation). + // "LAWFUL_LEGAL_BASIS" - Section of the privacy policy about + // lawful/legal basis for data processing. + // "PRIVACY_SHIELD" - Section of the privacy policy about the Privacy + // Shielf framework. + // "RIGHT_TO_LODGE_A_COMPLAINT" - Section of the privacy policy about + // the right to lodge a complaint with a supervisory authority. + // "TRANSFER_MECHANISMS" - Section of the privacy policy about + // transfer mechanisms of data from the EU to third countries + // "NO_CHILDREN_DATA_COLLECTION" - Section of the privacy policy + // stating that the company does not collect data from children. + // "NO_CHILDREN_DATA_SHARING" - Section of the privacy policy stating + // that the company does not share data from children. + // "CHILDREN_INFORMATION_PUBLICITY" - Section of the privacy policy + // stating whether the app allows children to make their personal + // information publicly available. + // "PARENTS_METHOD_OF_INFORMATION_DELETION" - Section of the privacy + // policy stating to parents/caregivers/guardians how they can request + // the deletion of their child's personal information. + // "PARENTS_METHOD_TO_INFORMATION_REVIEW" - Section of the privacy + // policy stating to parents/guardians/caregivers how they can review + // their child's personal information. + // "PARENTS_METHOD_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" - + // Section of the privacy policy stating to parents/caregivers/guardians + // how they can stop the further collection or use of their child's + // personal information. + // "PARENTS_RIGHT_TO_INFORMATION_DELETION" - Section of the privacy + // policy stating that a parent/caregiver/guardian has the right to + // request the deletion of their child's personal. information. + // "PARENTS_RIGHT_TO_INFORMATION_REVIEW" - Section of the privacy + // policy stating to parents/guardians/caregivers that they have a right + // to review their child's personal information. + // "PARENTS_RIGHT_TO_STOP_FURTHER_INFORMATION_COLLECTION_USE" - + // Section of the privacy policy stating to parents/caregivers/guardians + // that they have the right to stop the further collection or use of + // their child's personal information. + SectionType string `json:"sectionType,omitempty"` + + // StartOffset: Byte offsets for the start of the section inside the + // full text. + StartOffset int64 `json:"startOffset,omitempty,string"` + + // TextContent: Actual text content in the section. + TextContent string `json:"textContent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicySectionAnnotation) MarshalJSON() ([]byte, error) { + type NoMethod PolicySectionAnnotation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *PolicySectionAnnotation) UnmarshalJSON(data []byte) error { + type NoMethod PolicySectionAnnotation + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WaitOperationRequest: The request message for +// Operations.WaitOperation. +type WaitOperationRequest struct { + // Timeout: The maximum duration to wait before timing out. If left + // blank, the wait will be at most the time permitted by the underlying + // HTTP/RPC protocol. If RPC context deadline is also specified, the + // shorter one will be used. + Timeout string `json:"timeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Timeout") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Timeout") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WaitOperationRequest) MarshalJSON() ([]byte, error) { + type NoMethod WaitOperationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "checks.accounts.apps.get": + +type AccountsAppsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an app. +// +// - name: Resource name of the app. Example: `accounts/123/apps/456`. +func (r *AccountsAppsService) Get(name string) *AccountsAppsGetCall { + c := &AccountsAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsGetCall) Fields(s ...googleapi.Field) *AccountsAppsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAppsGetCall) IfNoneMatch(entityTag string) *AccountsAppsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsGetCall) Context(ctx context.Context) *AccountsAppsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.accounts.apps.get" call. +// Exactly one of *GoogleChecksAccountV1alphaApp or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleChecksAccountV1alphaApp.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAppsGetCall) Do(opts ...googleapi.CallOption) (*GoogleChecksAccountV1alphaApp, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChecksAccountV1alphaApp{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets an app.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}", + // "httpMethod": "GET", + // "id": "checks.accounts.apps.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the app. Example: `accounts/123/apps/456`", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleChecksAccountV1alphaApp" + // } + // } + +} + +// method id "checks.accounts.apps.list": + +type AccountsAppsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the apps under the given account. +// +// - parent: The parent account. Example: `accounts/123`. +func (r *AccountsAppsService) List(parent string) *AccountsAppsListCall { + c := &AccountsAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. The server may further constrain the maximum +// number of results returned in a single page. If unspecified, the +// server will decide the number of results to be returned. +func (c *AccountsAppsListCall) PageSize(pageSize int64) *AccountsAppsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from a previous `ListApps` call. Provide this to retrieve +// the subsequent page. +func (c *AccountsAppsListCall) PageToken(pageToken string) *AccountsAppsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsListCall) Fields(s ...googleapi.Field) *AccountsAppsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAppsListCall) IfNoneMatch(entityTag string) *AccountsAppsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsListCall) Context(ctx context.Context) *AccountsAppsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/apps") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.accounts.apps.list" call. +// Exactly one of *GoogleChecksAccountV1alphaListAppsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleChecksAccountV1alphaListAppsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsAppsListCall) Do(opts ...googleapi.CallOption) (*GoogleChecksAccountV1alphaListAppsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChecksAccountV1alphaListAppsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the apps under the given account.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps", + // "httpMethod": "GET", + // "id": "checks.accounts.apps.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. The maximum number of results to return. The server may further constrain the maximum number of results returned in a single page. If unspecified, the server will decide the number of results to be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token received from a previous `ListApps` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent account. Example: `accounts/123`", + // "location": "path", + // "pattern": "^accounts/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/apps", + // "response": { + // "$ref": "GoogleChecksAccountV1alphaListAppsResponse" + // } + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsAppsListCall) Pages(ctx context.Context, f func(*GoogleChecksAccountV1alphaListAppsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "checks.accounts.apps.operations.cancel": + +type AccountsAppsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *AccountsAppsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *AccountsAppsOperationsCancelCall { + c := &AccountsAppsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsOperationsCancelCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsOperationsCancelCall) Context(ctx context.Context) *AccountsAppsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.accounts.apps.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsAppsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "checks.accounts.apps.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // } + // } + +} + +// method id "checks.accounts.apps.operations.delete": + +type AccountsAppsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *AccountsAppsOperationsService) Delete(name string) *AccountsAppsOperationsDeleteCall { + c := &AccountsAppsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsOperationsDeleteCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsOperationsDeleteCall) Context(ctx context.Context) *AccountsAppsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.accounts.apps.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AccountsAppsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "checks.accounts.apps.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Empty" + // } + // } + +} + +// method id "checks.accounts.apps.operations.get": + +type AccountsAppsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *AccountsAppsOperationsService) Get(name string) *AccountsAppsOperationsGetCall { + c := &AccountsAppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AccountsAppsOperationsGetCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAppsOperationsGetCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AccountsAppsOperationsGetCall) Context(ctx context.Context) *AccountsAppsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AccountsAppsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "checks.accounts.apps.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err } - s.Score = float64(s1.Score) - return nil -} - -// Status: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "checks.accounts.apps.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "Operation" + // } + // } -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WaitOperationRequest: The request message for -// Operations.WaitOperation. -type WaitOperationRequest struct { - // Timeout: The maximum duration to wait before timing out. If left - // blank, the wait will be at most the time permitted by the underlying - // HTTP/RPC protocol. If RPC context deadline is also specified, the - // shorter one will be used. - Timeout string `json:"timeout,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Timeout") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// method id "checks.accounts.apps.operations.list": - // NullFields is a list of field names (e.g. "Timeout") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +type AccountsAppsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -func (s *WaitOperationRequest) MarshalJSON() ([]byte, error) { - type NoMethod WaitOperationRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *AccountsAppsOperationsService) List(name string) *AccountsAppsOperationsListCall { + c := &AccountsAppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// method id "checks.accounts.apps.operations.cancel": +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *AccountsAppsOperationsListCall) Filter(filter string) *AccountsAppsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} -type AccountsAppsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *AccountsAppsOperationsListCall) PageSize(pageSize int64) *AccountsAppsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *AccountsAppsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *AccountsAppsOperationsCancelCall { - c := &AccountsAppsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *AccountsAppsOperationsListCall) PageToken(pageToken string) *AccountsAppsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAppsOperationsCancelCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsCancelCall { +func (c *AccountsAppsOperationsListCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AccountsAppsOperationsListCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAppsOperationsCancelCall) Context(ctx context.Context) *AccountsAppsOperationsCancelCall { +func (c *AccountsAppsOperationsListCall) Context(ctx context.Context) *AccountsAppsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAppsOperationsCancelCall) Header() http.Header { +func (c *AccountsAppsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -1081,14 +3743,14 @@ func (c *AccountsAppsOperationsCancelCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AccountsAppsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "checks.accounts.apps.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1107,7 +3769,7 @@ func (c *AccountsAppsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Em if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1119,59 +3781,101 @@ func (c *AccountsAppsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Em } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:cancel", - // "httpMethod": "POST", - // "id": "checks.accounts.apps.operations.cancel", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations", + // "httpMethod": "GET", + // "id": "checks.accounts.apps.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "pattern": "^accounts/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}:cancel", - // "request": { - // "$ref": "CancelOperationRequest" - // }, + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "Empty" + // "$ref": "ListOperationsResponse" // } // } } -// method id "checks.accounts.apps.operations.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AccountsAppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "checks.accounts.apps.operations.wait": -type AccountsAppsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsAppsOperationsWaitCall struct { + s *Service + name string + waitoperationrequest *WaitOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Wait: Waits until the specified long-running operation is done or +// reaches at most a specified timeout, returning the latest state. If +// the operation is already done, the latest state is immediately +// returned. If the timeout specified is greater than the default +// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does +// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. +// Note that this method is on a best-effort basis. It may return the +// latest state before the specified timeout (including immediately), +// meaning even an immediate response is no guarantee that the operation +// is done. // -// - name: The name of the operation resource to be deleted. -func (r *AccountsAppsOperationsService) Delete(name string) *AccountsAppsOperationsDeleteCall { - c := &AccountsAppsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *AccountsAppsOperationsService) Wait(name string, waitoperationrequest *WaitOperationRequest) *AccountsAppsOperationsWaitCall { + c := &AccountsAppsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.waitoperationrequest = waitoperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAppsOperationsDeleteCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsDeleteCall { +func (c *AccountsAppsOperationsWaitCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1179,21 +3883,21 @@ func (c *AccountsAppsOperationsDeleteCall) Fields(s ...googleapi.Field) *Account // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAppsOperationsDeleteCall) Context(ctx context.Context) *AccountsAppsOperationsDeleteCall { +func (c *AccountsAppsOperationsWaitCall) Context(ctx context.Context) *AccountsAppsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAppsOperationsDeleteCall) Header() http.Header { +func (c *AccountsAppsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1201,11 +3905,16 @@ func (c *AccountsAppsOperationsDeleteCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.waitoperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -1216,14 +3925,14 @@ func (c *AccountsAppsOperationsDeleteCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *AccountsAppsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "checks.accounts.apps.operations.wait" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AccountsAppsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1242,7 +3951,7 @@ func (c *AccountsAppsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Em if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1254,33 +3963,36 @@ func (c *AccountsAppsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Em } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", - // "httpMethod": "DELETE", - // "id": "checks.accounts.apps.operations.delete", + // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:wait", + // "httpMethod": "POST", + // "id": "checks.accounts.apps.operations.wait", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "The name of the operation resource to wait on.", // "location": "path", // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:wait", + // "request": { + // "$ref": "WaitOperationRequest" + // }, // "response": { - // "$ref": "Empty" + // "$ref": "Operation" // } // } } -// method id "checks.accounts.apps.operations.get": +// method id "checks.accounts.apps.reports.get": -type AccountsAppsOperationsGetCall struct { +type AccountsAppsReportsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1289,21 +4001,32 @@ type AccountsAppsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a report. By default, only the name and results_uri fields +// are returned. You can include other fields by listing them in the +// `fields` URL query parameter. For example, `?fields=name,checks` will +// return the name and checks fields. // -// - name: The name of the operation resource. -func (r *AccountsAppsOperationsService) Get(name string) *AccountsAppsOperationsGetCall { - c := &AccountsAppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the report. Example: +// `accounts/123/apps/456/reports/789`. +func (r *AccountsAppsReportsService) Get(name string) *AccountsAppsReportsGetCall { + c := &AccountsAppsReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ChecksFilter sets the optional parameter "checksFilter": An AIP-160 +// (https://google.aip.dev/160) filter string to filter checks within +// the report. Only checks that match the filter string are included in +// the response. Example: `state = FAILED` +func (c *AccountsAppsReportsGetCall) ChecksFilter(checksFilter string) *AccountsAppsReportsGetCall { + c.urlParams_.Set("checksFilter", checksFilter) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAppsOperationsGetCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsGetCall { +func (c *AccountsAppsReportsGetCall) Fields(s ...googleapi.Field) *AccountsAppsReportsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1313,7 +4036,7 @@ func (c *AccountsAppsOperationsGetCall) Fields(s ...googleapi.Field) *AccountsAp // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsAppsOperationsGetCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsGetCall { +func (c *AccountsAppsReportsGetCall) IfNoneMatch(entityTag string) *AccountsAppsReportsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1321,21 +4044,21 @@ func (c *AccountsAppsOperationsGetCall) IfNoneMatch(entityTag string) *AccountsA // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAppsOperationsGetCall) Context(ctx context.Context) *AccountsAppsOperationsGetCall { +func (c *AccountsAppsReportsGetCall) Context(ctx context.Context) *AccountsAppsReportsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAppsOperationsGetCall) Header() http.Header { +func (c *AccountsAppsReportsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsReportsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1361,14 +4084,14 @@ func (c *AccountsAppsOperationsGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.operations.get" call. -// Exactly one of *Operation or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "checks.accounts.apps.reports.get" call. +// Exactly one of *GoogleChecksReportV1alphaReport or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleChecksReportV1alphaReport.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AccountsAppsReportsGetCall) Do(opts ...googleapi.CallOption) (*GoogleChecksReportV1alphaReport, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1387,7 +4110,7 @@ func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &GoogleChecksReportV1alphaReport{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1399,69 +4122,90 @@ func (c *AccountsAppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}", + // "description": "Gets a report. By default, only the name and results_uri fields are returned. You can include other fields by listing them in the `fields` URL query parameter. For example, `?fields=name,checks` will return the name and checks fields.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/reports/{reportsId}", // "httpMethod": "GET", - // "id": "checks.accounts.apps.operations.get", + // "id": "checks.accounts.apps.reports.get", // "parameterOrder": [ // "name" // ], // "parameters": { + // "checksFilter": { + // "description": "Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter checks within the report. Only checks that match the filter string are included in the response. Example: `state = FAILED`", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Resource name of the report. Example: `accounts/123/apps/456/reports/789`", // "location": "path", - // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "pattern": "^accounts/[^/]+/apps/[^/]+/reports/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "Operation" + // "$ref": "GoogleChecksReportV1alphaReport" // } // } } -// method id "checks.accounts.apps.operations.list": +// method id "checks.accounts.apps.reports.list": -type AccountsAppsOperationsListCall struct { +type AccountsAppsReportsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists reports for the specified app. By default, only the name +// and results_uri fields are returned. You can include other fields by +// listing them in the `fields` URL query parameter. For example, +// `?fields=reports(name,checks)` will return the name and checks +// fields. // -// - name: The name of the operation's parent resource. -func (r *AccountsAppsOperationsService) List(name string) *AccountsAppsOperationsListCall { - c := &AccountsAppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Resource name of the app. Example: `accounts/123/apps/456`. +func (r *AccountsAppsReportsService) List(parent string) *AccountsAppsReportsListCall { + c := &AccountsAppsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *AccountsAppsOperationsListCall) Filter(filter string) *AccountsAppsOperationsListCall { +// ChecksFilter sets the optional parameter "checksFilter": An AIP-160 +// (https://google.aip.dev/160) filter string to filter checks within +// reports. Only checks that match the filter string are included in the +// response. Example: `state = FAILED` +func (c *AccountsAppsReportsListCall) ChecksFilter(checksFilter string) *AccountsAppsReportsListCall { + c.urlParams_.Set("checksFilter", checksFilter) + return c +} + +// Filter sets the optional parameter "filter": An AIP-160 +// (https://google.aip.dev/160) filter string to filter reports. +// Example: `appBundle.releaseType = PRE_RELEASE` +func (c *AccountsAppsReportsListCall) Filter(filter string) *AccountsAppsReportsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *AccountsAppsOperationsListCall) PageSize(pageSize int64) *AccountsAppsOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of reports to return. If unspecified, at most 10 reports will be +// returned. The maximum value is 50; values above 50 will be coerced to +// 50. +func (c *AccountsAppsReportsListCall) PageSize(pageSize int64) *AccountsAppsReportsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *AccountsAppsOperationsListCall) PageToken(pageToken string) *AccountsAppsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token +// received from a previous `ListReports` call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided +// to `ListReports` must match the call that provided the page token. +func (c *AccountsAppsReportsListCall) PageToken(pageToken string) *AccountsAppsReportsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1469,7 +4213,7 @@ func (c *AccountsAppsOperationsListCall) PageToken(pageToken string) *AccountsAp // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAppsOperationsListCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsListCall { +func (c *AccountsAppsReportsListCall) Fields(s ...googleapi.Field) *AccountsAppsReportsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1479,7 +4223,7 @@ func (c *AccountsAppsOperationsListCall) Fields(s ...googleapi.Field) *AccountsA // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *AccountsAppsOperationsListCall) IfNoneMatch(entityTag string) *AccountsAppsOperationsListCall { +func (c *AccountsAppsReportsListCall) IfNoneMatch(entityTag string) *AccountsAppsReportsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1487,21 +4231,21 @@ func (c *AccountsAppsOperationsListCall) IfNoneMatch(entityTag string) *Accounts // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAppsOperationsListCall) Context(ctx context.Context) *AccountsAppsOperationsListCall { +func (c *AccountsAppsReportsListCall) Context(ctx context.Context) *AccountsAppsReportsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAppsOperationsListCall) Header() http.Header { +func (c *AccountsAppsReportsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAppsReportsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1514,7 +4258,7 @@ func (c *AccountsAppsOperationsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/reports") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1522,19 +4266,21 @@ func (c *AccountsAppsOperationsListCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.operations.list" call. -// Exactly one of *ListOperationsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListOperationsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// Do executes the "checks.accounts.apps.reports.list" call. +// Exactly one of *GoogleChecksReportV1alphaListReportsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleChecksReportV1alphaListReportsResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *AccountsAppsReportsListCall) Do(opts ...googleapi.CallOption) (*GoogleChecksReportV1alphaListReportsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1553,7 +4299,7 @@ func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &GoogleChecksReportV1alphaListReportsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1565,41 +4311,46 @@ func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*List } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations", + // "description": "Lists reports for the specified app. By default, only the name and results_uri fields are returned. You can include other fields by listing them in the `fields` URL query parameter. For example, `?fields=reports(name,checks)` will return the name and checks fields.", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/reports", // "httpMethod": "GET", - // "id": "checks.accounts.apps.operations.list", + // "id": "checks.accounts.apps.reports.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", + // "checksFilter": { + // "description": "Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter checks within reports. Only checks that match the filter string are included in the response. Example: `state = FAILED`", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^accounts/[^/]+/apps/[^/]+$", - // "required": true, + // "filter": { + // "description": "Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter reports. Example: `appBundle.releaseType = PRE_RELEASE`", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Optional. The maximum number of reports to return. If unspecified, at most 10 reports will be returned. The maximum value is 50; values above 50 will be coerced to 50.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Optional. A page token received from a previous `ListReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReports` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the app. Example: `accounts/123/apps/456`", + // "location": "path", + // "pattern": "^accounts/[^/]+/apps/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/reports", // "response": { - // "$ref": "ListOperationsResponse" + // "$ref": "GoogleChecksReportV1alphaListReportsResponse" // } // } @@ -1608,7 +4359,7 @@ func (c *AccountsAppsOperationsListCall) Do(opts ...googleapi.CallOption) (*List // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *AccountsAppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { +func (c *AccountsAppsReportsListCall) Pages(ctx context.Context, f func(*GoogleChecksReportV1alphaListReportsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1626,40 +4377,85 @@ func (c *AccountsAppsOperationsListCall) Pages(ctx context.Context, f func(*List } } -// method id "checks.accounts.apps.operations.wait": +// method id "checks.media.upload": + +type MediaUploadCall struct { + s *Service + parent string + googlechecksreportv1alphaanalyzeuploadrequest *GoogleChecksReportV1alphaAnalyzeUploadRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header +} + +// Upload: Analyzes the uploaded app bundle and returns a +// google.longrunning.Operation containing the generated Report. ## +// Example (upload only) Send a regular POST request with the header +// `X-Goog-Upload-Protocol: raw`. ``` POST +// https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload +// HTTP/1.1 X-Goog-Upload-Protocol: raw Content-Length: Content-Type: +// application/octet-stream ``` ## Example (upload with metadata) Send a +// multipart POST request where the first body part contains the +// metadata JSON and the second body part contains the binary upload. +// Include the header `X-Goog-Upload-Protocol: multipart`. ``` POST +// https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload +// HTTP/1.1 X-Goog-Upload-Protocol: multipart Content-Length: ? +// Content-Type: multipart/related; boundary=BOUNDARY --BOUNDARY +// Content-Type: application/json +// {"code_reference_id":"db5bcc20f94055fb5bc08cbb9b0e7a5530308786"} +// --BOUNDARY --BOUNDARY-- ``` *Note:* Metadata-only requests are not +// supported. +// +// - parent: Resource name of the app. Example: `accounts/123/apps/456`. +func (r *MediaService) Upload(parent string, googlechecksreportv1alphaanalyzeuploadrequest *GoogleChecksReportV1alphaAnalyzeUploadRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlechecksreportv1alphaanalyzeuploadrequest = googlechecksreportv1alphaanalyzeuploadrequest + return c +} -type AccountsAppsOperationsWaitCall struct { - s *Service - name string - waitoperationrequest *WaitOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Media specifies the media to upload in one or more chunks. The chunk +// size may be controlled by supplying a MediaOption generated by +// googleapi.ChunkSize. The chunk size defaults to +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the +// upload request will be determined by sniffing the contents of r, +// unless a MediaOption generated by googleapi.ContentType is +// supplied. +// At most one of Media and ResumableMedia may be set. +func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) + return c } -// Wait: Waits until the specified long-running operation is done or -// reaches at most a specified timeout, returning the latest state. If -// the operation is already done, the latest state is immediately -// returned. If the timeout specified is greater than the default -// HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does -// not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. -// Note that this method is on a best-effort basis. It may return the -// latest state before the specified timeout (including immediately), -// meaning even an immediate response is no guarantee that the operation -// is done. +// ResumableMedia specifies the media to upload in chunks and can be +// canceled with ctx. // -// - name: The name of the operation resource to wait on. -func (r *AccountsAppsOperationsService) Wait(name string, waitoperationrequest *WaitOperationRequest) *AccountsAppsOperationsWaitCall { - c := &AccountsAppsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.waitoperationrequest = waitoperationrequest +// Deprecated: use Media instead. +// +// At most one of Media and ResumableMedia may be set. mediaType +// identifies the MIME media type of the upload, such as "image/png". If +// mediaType is "", it will be auto-detected. The provided ctx will +// supersede any context previously provided to the Context method. +func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { + c.ctx_ = ctx + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) + return c +} + +// ProgressUpdater provides a callback function that will be called +// after every chunk. It should be a low-latency function in order to +// not slow down the upload operation. This should only be called when +// using ResumableMedia (as opposed to Media). +func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { + c.mediaInfo_.SetProgressUpdater(pu) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *AccountsAppsOperationsWaitCall) Fields(s ...googleapi.Field) *AccountsAppsOperationsWaitCall { +func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1667,21 +4463,23 @@ func (c *AccountsAppsOperationsWaitCall) Fields(s ...googleapi.Field) *AccountsA // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *AccountsAppsOperationsWaitCall) Context(ctx context.Context) *AccountsAppsOperationsWaitCall { +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *AccountsAppsOperationsWaitCall) Header() http.Header { +func (c *MediaUploadCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsAppsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1689,34 +4487,45 @@ func (c *AccountsAppsOperationsWaitCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.waitoperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechecksreportv1alphaanalyzeuploadrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/reports:analyzeUpload") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1alpha/{+parent}/reports:analyzeUpload") + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) + } + if body == nil { + body = new(bytes.Buffer) + reqHeaders.Set("Content-Type", "application/json") + } + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + req.GetBody = getBody googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "checks.accounts.apps.operations.wait" call. +// Do executes the "checks.media.upload" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *AccountsAppsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1735,6 +4544,23 @@ func (c *AccountsAppsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() + ctx := c.ctx_ + if ctx == nil { + ctx = context.TODO() + } + res, err = rx.Upload(ctx) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + } ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, @@ -1747,29 +4573,42 @@ func (c *AccountsAppsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", - // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/operations/{operationsId}:wait", + // "description": "Analyzes the uploaded app bundle and returns a google.longrunning.Operation containing the generated Report. ## Example (upload only) Send a regular POST request with the header `X-Goog-Upload-Protocol: raw`. ``` POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1 X-Goog-Upload-Protocol: raw Content-Length: Content-Type: application/octet-stream ``` ## Example (upload with metadata) Send a multipart POST request where the first body part contains the metadata JSON and the second body part contains the binary upload. Include the header `X-Goog-Upload-Protocol: multipart`. ``` POST https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*/apps/*}/reports:analyzeUpload HTTP/1.1 X-Goog-Upload-Protocol: multipart Content-Length: ? Content-Type: multipart/related; boundary=BOUNDARY --BOUNDARY Content-Type: application/json {\"code_reference_id\":\"db5bcc20f94055fb5bc08cbb9b0e7a5530308786\"} --BOUNDARY --BOUNDARY-- ``` *Note:* Metadata-only requests are not supported. ", + // "flatPath": "v1alpha/accounts/{accountsId}/apps/{appsId}/reports:analyzeUpload", // "httpMethod": "POST", - // "id": "checks.accounts.apps.operations.wait", + // "id": "checks.media.upload", + // "mediaUpload": { + // "accept": [ + // "*/*" + // ], + // "maxSize": "10737418240", + // "protocols": { + // "simple": { + // "multipart": true, + // "path": "/upload/v1alpha/{+parent}/reports:analyzeUpload" + // } + // } + // }, // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to wait on.", + // "parent": { + // "description": "Required. Resource name of the app. Example: `accounts/123/apps/456`", // "location": "path", - // "pattern": "^accounts/[^/]+/apps/[^/]+/operations/[^/]+$", + // "pattern": "^accounts/[^/]+/apps/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:wait", + // "path": "v1alpha/{+parent}/reports:analyzeUpload", // "request": { - // "$ref": "WaitOperationRequest" + // "$ref": "GoogleChecksReportV1alphaAnalyzeUploadRequest" // }, // "response": { // "$ref": "Operation" - // } + // }, + // "supportsMediaUpload": true // } } @@ -1784,8 +4623,9 @@ type PrivacypolicyAnalyzeCall struct { header_ http.Header } -// Analyze: Analyzes the privacy policy of the given policy URL or -// content. +// Analyze: Performs a synchronous analysis of a privacy policy, where +// the policy content is mapped to privacy categories, data types, and +// purposes. func (r *PrivacypolicyService) Analyze(analyzeprivacypolicyrequest *AnalyzePrivacyPolicyRequest) *PrivacypolicyAnalyzeCall { c := &PrivacypolicyAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.analyzeprivacypolicyrequest = analyzeprivacypolicyrequest @@ -1880,7 +4720,7 @@ func (c *PrivacypolicyAnalyzeCall) Do(opts ...googleapi.CallOption) (*AnalyzePri } return ret, nil // { - // "description": "Analyzes the privacy policy of the given policy URL or content.", + // "description": "Performs a synchronous analysis of a privacy policy, where the policy content is mapped to privacy categories, data types, and purposes.", // "flatPath": "v1alpha/privacypolicy:analyze", // "httpMethod": "POST", // "id": "checks.privacypolicy.analyze", diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 5f99037f619..38b0b6d2131 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -493,6 +493,159 @@ "https://www.googleapis.com/auth/chrome.management.reports.readonly" ] }, + "countPrintJobsByPrinter": { + "description": "Get a summary of printing done by each printer.", + "flatPath": "v1/customers/{customersId}/reports:countPrintJobsByPrinter", + "httpMethod": "GET", + "id": "chromemanagement.customers.reports.countPrintJobsByPrinter", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. Customer ID prefixed with \"customers/\" or \"customers/my_customer\" to use the customer associated to the account making the request.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Note: Only \u003e= and \u003c= comparators are supported in this filter. Supported filter fields: * complete_time", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field used to order results. If omitted, results will be ordered in ascending order of the 'printer' field. Supported order_by fields: * printer * job_count * device_count * user_count", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. Maximum and default are 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify the page of the response to be returned.", + "location": "query", + "type": "string" + }, + "printerOrgUnitId": { + "description": "The ID of the organizational unit for printers. If specified, only data for printers from the specified organizational unit will be returned. If omitted, data for printers from all organizational units will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+customer}/reports:countPrintJobsByPrinter", + "response": { + "$ref": "GoogleChromeManagementV1CountPrintJobsByPrinterResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.reports.readonly" + ] + }, + "countPrintJobsByUser": { + "description": "Get a summary of printing done by each user.", + "flatPath": "v1/customers/{customersId}/reports:countPrintJobsByUser", + "httpMethod": "GET", + "id": "chromemanagement.customers.reports.countPrintJobsByUser", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. Customer ID prefixed with \"customers/\" or \"customers/my_customer\" to use the customer associated to the account making the request.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Note: Only \u003e= and \u003c= comparators are supported in this filter. Supported filter fields: * complete_time", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field used to order results. If omitted, results will be ordered in ascending order of the 'user_email' field. Supported order_by fields: * user_email * job_count * printer_count * device_count", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. Maximum and default are 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token to specify the page of the response to be returned.", + "location": "query", + "type": "string" + }, + "printerOrgUnitId": { + "description": "The ID of the organizational unit for printers. If specified, only print jobs initiated with printers from the specified organizational unit will be counted. If omitted, all print jobs will be counted.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+customer}/reports:countPrintJobsByUser", + "response": { + "$ref": "GoogleChromeManagementV1CountPrintJobsByUserResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.reports.readonly" + ] + }, + "enumeratePrintJobs": { + "description": "Get a list of print jobs.", + "flatPath": "v1/customers/{customersId}/reports:enumeratePrintJobs", + "httpMethod": "GET", + "id": "chromemanagement.customers.reports.enumeratePrintJobs", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. Customer ID prefixed with \"customers/\" or \"customers/my_customer\" to use the customer associated to the account making the request.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + }, + "filter": { + "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Note: Only \u003e= and \u003c= comparators are supported for `complete_time`. Note: Only = comparator supported for `user_id` and `printer_id`. Supported filter fields: * complete_time * printer_id * user_id", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field used to order results. If not specified, results will be ordered in descending order of the `complete_time` field. Supported order by fields: * title * state * create_time * complete_time * document_page_count * color_mode * duplex_mode * printer * user_email", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The number of print jobs in the page from 0 to 100 inclusive, if page_size is not specified or zero, the size will be 50.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous `EnumeratePrintJobs` call. Provide this to retrieve the subsequent page. If omitted, the first page of results will be returned. When paginating, all other parameters provided to `EnumeratePrintJobs` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "printerOrgUnitId": { + "description": "The ID of the organizational unit for printers. If specified, only print jobs submitted to printers from the specified organizational unit will be returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+customer}/reports:enumeratePrintJobs", + "response": { + "$ref": "GoogleChromeManagementV1EnumeratePrintJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.reports.readonly" + ] + }, "findInstalledAppDevices": { "description": "Generate report of managed Chrome browser devices that have a specified app installed.", "flatPath": "v1/customers/{customersId}/reports:findInstalledAppDevices", @@ -707,6 +860,99 @@ } } }, + "notificationConfigs": { + "methods": { + "create": { + "description": "Create a telemetry notification config.", + "flatPath": "v1/customers/{customersId}/telemetry/notificationConfigs", + "httpMethod": "POST", + "id": "chromemanagement.customers.telemetry.notificationConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this notification config will be created. Format: `customers/{customer}`", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/telemetry/notificationConfigs", + "request": { + "$ref": "GoogleChromeManagementV1TelemetryNotificationConfig" + }, + "response": { + "$ref": "GoogleChromeManagementV1TelemetryNotificationConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + ] + }, + "delete": { + "description": "Delete a telemetry notification config.", + "flatPath": "v1/customers/{customersId}/telemetry/notificationConfigs/{notificationConfigsId}", + "httpMethod": "DELETE", + "id": "chromemanagement.customers.telemetry.notificationConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the notification config to delete. Format: `customers/{customer}/telemetry/notificationConfigs/{notification_config}`", + "location": "path", + "pattern": "^customers/[^/]+/telemetry/notificationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + ] + }, + "list": { + "description": "List all telemetry notification configs.", + "flatPath": "v1/customers/{customersId}/telemetry/notificationConfigs", + "httpMethod": "GET", + "id": "chromemanagement.customers.telemetry.notificationConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of notification configs to return. The service may return fewer than this value. If unspecified, at most 100 notification configs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListTelemetryNotificationConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTelemetryNotificationConfigs` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent which owns the notification configs.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/telemetry/notificationConfigs", + "response": { + "$ref": "GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + ] + } + } + }, "users": { "methods": { "get": { @@ -794,7 +1040,7 @@ } } }, - "revision": "20230625", + "revision": "20230906", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -1581,6 +1827,52 @@ }, "type": "object" }, + "GoogleChromeManagementV1CountPrintJobsByPrinterResponse": { + "description": "Response containing a summary printing report for each printer from the specified organizational unit for the requested time interval.", + "id": "GoogleChromeManagementV1CountPrintJobsByPrinterResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token for requesting the next page.", + "type": "string" + }, + "printerReports": { + "description": "List of PrinterReports matching request.", + "items": { + "$ref": "GoogleChromeManagementV1PrinterReport" + }, + "type": "array" + }, + "totalSize": { + "description": "Total number of printers matching request.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChromeManagementV1CountPrintJobsByUserResponse": { + "description": "Response containing a summary printing report for each user that has initiated a print job with a printer from the specified organizational unit during the requested time interval.", + "id": "GoogleChromeManagementV1CountPrintJobsByUserResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token for requesting the next page.", + "type": "string" + }, + "totalSize": { + "description": "Total number of users matching request.", + "format": "int64", + "type": "string" + }, + "userPrintReports": { + "description": "List of UserPrintReports matching request.", + "items": { + "$ref": "GoogleChromeManagementV1UserPrintReport" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleChromeManagementV1CpuInfo": { "description": "CPU specifications for the device * This field provides device information, which is static and will not change over time. * Data for this field is controlled via policy: [ReportDeviceCpuInfo](https://chromeenterprise.google/policies/#ReportDeviceCpuInfo) * Data Collection Frequency: Only at Upload * Default Data Reporting Frequency: 3 hours - Policy Controlled: Yes * Cache: If the device is offline, the collected data is stored locally, and will be reported when the device is next online: No * Reported for affiliated users only: N/A * Granular permission needed: TELEMETRY_API_CPU_INFO", "id": "GoogleChromeManagementV1CpuInfo", @@ -1690,6 +1982,36 @@ }, "type": "object" }, + "GoogleChromeManagementV1DeviceActivityReport": { + "description": "Device activity report. * Granular permission needed: TELEMETRY_API_DEVICE_ACTIVITY_REPORT", + "id": "GoogleChromeManagementV1DeviceActivityReport", + "properties": { + "deviceActivityState": { + "description": "Output only. Device activity state.", + "enum": [ + "DEVICE_ACTIVITY_STATE_UNSPECIFIED", + "ACTIVE", + "IDLE", + "LOCKED" + ], + "enumDescriptions": [ + "Device activity state is unspecified.", + "Device is currently being used.", + "Device is currently idle.", + "Device is currently locked." + ], + "readOnly": true, + "type": "string" + }, + "reportTime": { + "description": "Output only. Timestamp of when the report was collected.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1DeviceAueCountReport": { "description": "Report for CountChromeDevicesPerAueDateResponse, contains the count of devices of a specific model and auto update expiration range.", "id": "GoogleChromeManagementV1DeviceAueCountReport", @@ -1934,6 +2256,29 @@ }, "type": "object" }, + "GoogleChromeManagementV1EnumeratePrintJobsResponse": { + "description": "Response containing a list of print jobs.", + "id": "GoogleChromeManagementV1EnumeratePrintJobsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be used in a subsequent request to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "printJobs": { + "description": "List of requested print jobs.", + "items": { + "$ref": "GoogleChromeManagementV1PrintJob" + }, + "type": "array" + }, + "totalSize": { + "description": "Total number of print jobs matching request.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1FindInstalledAppDevicesResponse": { "description": "Response containing a list of devices with queried app installed.", "id": "GoogleChromeManagementV1FindInstalledAppDevicesResponse", @@ -2257,6 +2602,24 @@ }, "type": "object" }, + "GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse": { + "description": "Response message for listing notification configs for a customer.", + "id": "GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "telemetryNotificationConfigs": { + "description": "The telemetry notification configs from the specified customer.", + "items": { + "$ref": "GoogleChromeManagementV1TelemetryNotificationConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleChromeManagementV1ListTelemetryUsersResponse": { "description": "Response message for listing telemetry users for a customer.", "id": "GoogleChromeManagementV1ListTelemetryUsersResponse", @@ -2600,6 +2963,137 @@ }, "type": "object" }, + "GoogleChromeManagementV1PrintJob": { + "description": "Represents a request to print a document that has been submitted to a printer.", + "id": "GoogleChromeManagementV1PrintJob", + "properties": { + "colorMode": { + "description": "Color mode.", + "enum": [ + "COLOR_MODE_UNSPECIFIED", + "BLACK_AND_WHITE", + "COLOR" + ], + "enumDescriptions": [ + "Unspecified.", + "Black and white.", + "Color." + ], + "type": "string" + }, + "completeTime": { + "description": "Print job completion timestamp.", + "format": "google-datetime", + "type": "string" + }, + "copyCount": { + "description": "Number of copies.", + "format": "int32", + "type": "integer" + }, + "createTime": { + "description": "Print job creation timestamp.", + "format": "google-datetime", + "type": "string" + }, + "documentPageCount": { + "description": "Number of pages in the document.", + "format": "int32", + "type": "integer" + }, + "duplexMode": { + "description": "Duplex mode.", + "enum": [ + "DUPLEX_MODE_UNSPECIFIED", + "ONE_SIDED", + "TWO_SIDED_LONG_EDGE", + "TWO_SIDED_SHORT_EDGE" + ], + "enumDescriptions": [ + "Unspecified.", + "One-sided.", + "Two-sided flipping over long edge.", + "Two-sided flipping over short edge." + ], + "type": "string" + }, + "id": { + "description": "Unique ID of the print job.", + "type": "string" + }, + "printer": { + "description": "Name of the printer used for printing.", + "type": "string" + }, + "printerId": { + "description": "API ID of the printer used for printing.", + "type": "string" + }, + "state": { + "description": "The final state of the job.", + "enum": [ + "STATE_UNSPECIFIED", + "PRINTED", + "CANCELLED", + "FAILED" + ], + "enumDescriptions": [ + "Print job is in an unspecified state.", + "The document was successfully printed.", + "Print job was cancelled.", + "Print job failed." + ], + "type": "string" + }, + "title": { + "description": "The title of the document.", + "type": "string" + }, + "userEmail": { + "description": "The primary e-mail address of the user who submitted the print job.", + "type": "string" + }, + "userId": { + "description": "The unique Directory API ID of the user who submitted the print job.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChromeManagementV1PrinterReport": { + "description": "Report for CountPrintJobsByPrinter, contains statistics on printer usage. Contains the total number of print jobs initiated with this printer, the number of users and the number of devices that have initiated at least one print job with this printer.", + "id": "GoogleChromeManagementV1PrinterReport", + "properties": { + "deviceCount": { + "description": "Number of chrome devices that have been used to send print jobs to the specified printer.", + "format": "int64", + "type": "string" + }, + "jobCount": { + "description": "Number of print jobs sent to the printer.", + "format": "int64", + "type": "string" + }, + "printer": { + "description": "Printer name.", + "type": "string" + }, + "printerId": { + "description": "Printer API ID.", + "type": "string" + }, + "printerModel": { + "description": "Printer model.", + "type": "string" + }, + "userCount": { + "description": "Number of users that have sent print jobs to the printer.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1StorageInfo": { "description": "Status data for storage. * This field is telemetry information and this will change over time as the device is utilized. * Data for this field is controlled via policy: [ReportDeviceStorageStatus](https://chromeenterprise.google/policies/#ReportDeviceStorageStatus) * Data Collection Frequency: Only at Upload * Default Data Reporting Frequency: 3 hours - Policy Controlled: Yes * Cache: If the device is offline, the collected data is stored locally, and will be reported when the device is next online: No * Reported for affiliated users only: N/A * Granular permission needed: TELEMETRY_API_STORAGE_INFO", "id": "GoogleChromeManagementV1StorageInfo", @@ -2929,6 +3423,34 @@ }, "type": "object" }, + "GoogleChromeManagementV1TelemetryEventNotificationFilter": { + "description": "Configures how the telemetry events should be filtered.", + "id": "GoogleChromeManagementV1TelemetryEventNotificationFilter", + "properties": { + "eventTypes": { + "description": "Only sends the notifications for events of these types. Must not be empty.", + "items": { + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "AUDIO_SEVERE_UNDERRUN", + "USB_ADDED", + "USB_REMOVED", + "NETWORK_HTTPS_LATENCY_CHANGE" + ], + "enumDescriptions": [ + "Event type unknown.", + "Triggered when a audio devices run out of buffer data for more than 5 seconds.", + "Triggered when USB devices are added.", + "Triggered when USB devices are removed.", + "Triggered when a new HTTPS latency problem was detected or the device has recovered form an existing HTTPS latency problem." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent": { "description": "Https latency routine is run periodically and `TelemetryHttpsLatencyChangeEvent` is triggered if a latency problem was detected or if the device has recovered from a latency problem. * Granular permission needed: TELEMETRY_API_NETWORK_REPORT", "id": "GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent", @@ -2954,6 +3476,58 @@ }, "type": "object" }, + "GoogleChromeManagementV1TelemetryNotificationConfig": { + "description": "Configuration to receive notifications of telemetry data.", + "id": "GoogleChromeManagementV1TelemetryNotificationConfig", + "properties": { + "customer": { + "description": "Output only. Google Workspace customer that owns the resource.", + "readOnly": true, + "type": "string" + }, + "filter": { + "$ref": "GoogleChromeManagementV1TelemetryNotificationFilter", + "description": "Only send notifications for telemetry data matching this filter." + }, + "googleCloudPubsubTopic": { + "description": "The pubsub topic to which notifications are published to.", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of the notification configuration.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleChromeManagementV1TelemetryNotificationFilter": { + "description": "Configures how the telemetry data should be filtered.", + "id": "GoogleChromeManagementV1TelemetryNotificationFilter", + "properties": { + "deviceId": { + "description": "If set, only sends notifications for telemetry data coming from this device.", + "type": "string" + }, + "deviceOrgUnitId": { + "description": "If set, only sends notifications for telemetry data coming from devices in this org unit.", + "type": "string" + }, + "telemetryEventNotificationFilter": { + "$ref": "GoogleChromeManagementV1TelemetryEventNotificationFilter", + "description": "Only sends notifications for the telemetry events matching this filter." + }, + "userEmail": { + "description": "If set, only sends notifications for telemetry data coming from devices owned by this user.", + "type": "string" + }, + "userOrgUnitId": { + "description": "If set, only sends notifications for telemetry data coming from devices owned by users in this org unit.", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1TelemetryUsbPeripheralsEvent": { "description": "`TelemetryUsbPeripheralsEvent` is triggered USB devices are either added or removed. * Granular permission needed: TELEMETRY_API_PERIPHERALS_REPORT", "id": "GoogleChromeManagementV1TelemetryUsbPeripheralsEvent", @@ -3014,6 +3588,14 @@ "readOnly": true, "type": "array" }, + "deviceActivityReport": { + "description": "Output only. Device activity reports collected periodically sorted in a decreasing order of report_time.", + "items": { + "$ref": "GoogleChromeManagementV1DeviceActivityReport" + }, + "readOnly": true, + "type": "array" + }, "deviceId": { "description": "The unique Directory API ID of the device. This value is the same as the Admin Console's Directory API ID in the ChromeOS Devices tab.", "type": "string" @@ -3223,6 +3805,42 @@ }, "type": "object" }, + "GoogleChromeManagementV1UserPrintReport": { + "description": "Report for CountPrintJobsByUser, contains printing statistics for a user. Contains the number of printers, the number of devices used to initiate print jobs, and the number of print jobs initiated.", + "id": "GoogleChromeManagementV1UserPrintReport", + "properties": { + "deviceCount": { + "description": "Number of chrome devices that have been used to initiate print jobs by the user.", + "format": "int64", + "type": "string" + }, + "jobCount": { + "description": "Number of print jobs initiated by the user.", + "format": "int64", + "type": "string" + }, + "printerCount": { + "description": "Number of printers used by the user.", + "format": "int64", + "type": "string" + }, + "userEmail": { + "description": "The primary e-mail address of the user.", + "type": "string" + }, + "userId": { + "description": "The unique Directory API ID of the user.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, "GoogleRpcStatus": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "GoogleRpcStatus", diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index 49cc325285b..69c3f982cd2 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: http://developers.google.com/chrome/management/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // chromemanagementService, err := chromemanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // chromemanagementService, err := chromemanagement.NewService(ctx, option.WithScopes(chromemanagement.ChromeManagementTelemetryReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // chromemanagementService, err := chromemanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // chromemanagementService, err := chromemanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package chromemanagement // import "google.golang.org/api/chromemanagement/v1" import ( @@ -228,6 +242,7 @@ func NewCustomersTelemetryService(s *Service) *CustomersTelemetryService { rs := &CustomersTelemetryService{s: s} rs.Devices = NewCustomersTelemetryDevicesService(s) rs.Events = NewCustomersTelemetryEventsService(s) + rs.NotificationConfigs = NewCustomersTelemetryNotificationConfigsService(s) rs.Users = NewCustomersTelemetryUsersService(s) return rs } @@ -239,6 +254,8 @@ type CustomersTelemetryService struct { Events *CustomersTelemetryEventsService + NotificationConfigs *CustomersTelemetryNotificationConfigsService + Users *CustomersTelemetryUsersService } @@ -260,6 +277,15 @@ type CustomersTelemetryEventsService struct { s *Service } +func NewCustomersTelemetryNotificationConfigsService(s *Service) *CustomersTelemetryNotificationConfigsService { + rs := &CustomersTelemetryNotificationConfigsService{s: s} + return rs +} + +type CustomersTelemetryNotificationConfigsService struct { + s *Service +} + func NewCustomersTelemetryUsersService(s *Service) *CustomersTelemetryUsersService { rs := &CustomersTelemetryUsersService{s: s} return rs @@ -1302,6 +1328,87 @@ func (s *GoogleChromeManagementV1CountInstalledAppsResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1CountPrintJobsByPrinterResponse: Response +// containing a summary printing report for each printer from the +// specified organizational unit for the requested time interval. +type GoogleChromeManagementV1CountPrintJobsByPrinterResponse struct { + // NextPageToken: Pagination token for requesting the next page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PrinterReports: List of PrinterReports matching request. + PrinterReports []*GoogleChromeManagementV1PrinterReport `json:"printerReports,omitempty"` + + // TotalSize: Total number of printers matching request. + TotalSize int64 `json:"totalSize,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1CountPrintJobsByPrinterResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1CountPrintJobsByPrinterResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementV1CountPrintJobsByUserResponse: Response +// containing a summary printing report for each user that has initiated +// a print job with a printer from the specified organizational unit +// during the requested time interval. +type GoogleChromeManagementV1CountPrintJobsByUserResponse struct { + // NextPageToken: Pagination token for requesting the next page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TotalSize: Total number of users matching request. + TotalSize int64 `json:"totalSize,omitempty,string"` + + // UserPrintReports: List of UserPrintReports matching request. + UserPrintReports []*GoogleChromeManagementV1UserPrintReport `json:"userPrintReports,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1CountPrintJobsByUserResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1CountPrintJobsByUserResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1CpuInfo: CPU specifications for the device * // This field provides device information, which is static and will not // change over time. * Data for this field is controlled via policy: @@ -1491,6 +1598,46 @@ func (s *GoogleChromeManagementV1Device) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1DeviceActivityReport: Device activity report. +// * Granular permission needed: TELEMETRY_API_DEVICE_ACTIVITY_REPORT +type GoogleChromeManagementV1DeviceActivityReport struct { + // DeviceActivityState: Output only. Device activity state. + // + // Possible values: + // "DEVICE_ACTIVITY_STATE_UNSPECIFIED" - Device activity state is + // unspecified. + // "ACTIVE" - Device is currently being used. + // "IDLE" - Device is currently idle. + // "LOCKED" - Device is currently locked. + DeviceActivityState string `json:"deviceActivityState,omitempty"` + + // ReportTime: Output only. Timestamp of when the report was collected. + ReportTime string `json:"reportTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceActivityState") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceActivityState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1DeviceActivityReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1DeviceActivityReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1DeviceAueCountReport: Report for // CountChromeDevicesPerAueDateResponse, contains the count of devices // of a specific model and auto update expiration range. @@ -1752,6 +1899,47 @@ func (s *GoogleChromeManagementV1DisplayInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1EnumeratePrintJobsResponse: Response +// containing a list of print jobs. +type GoogleChromeManagementV1EnumeratePrintJobsResponse struct { + // NextPageToken: A token, which can be used in a subsequent request to + // retrieve the next page. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PrintJobs: List of requested print jobs. + PrintJobs []*GoogleChromeManagementV1PrintJob `json:"printJobs,omitempty"` + + // TotalSize: Total number of print jobs matching request. + TotalSize int64 `json:"totalSize,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1EnumeratePrintJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1EnumeratePrintJobsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1FindInstalledAppDevicesResponse: Response // containing a list of devices with queried app installed. type GoogleChromeManagementV1FindInstalledAppDevicesResponse struct { @@ -2216,6 +2404,45 @@ func (s *GoogleChromeManagementV1ListTelemetryEventsResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse: +// Response message for listing notification configs for a customer. +type GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TelemetryNotificationConfigs: The telemetry notification configs from + // the specified customer. + TelemetryNotificationConfigs []*GoogleChromeManagementV1TelemetryNotificationConfig `json:"telemetryNotificationConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1ListTelemetryUsersResponse: Response message // for listing telemetry users for a customer. type GoogleChromeManagementV1ListTelemetryUsersResponse struct { @@ -2695,6 +2922,138 @@ func (s *GoogleChromeManagementV1PeripheralsReport) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1PrintJob: Represents a request to print a +// document that has been submitted to a printer. +type GoogleChromeManagementV1PrintJob struct { + // ColorMode: Color mode. + // + // Possible values: + // "COLOR_MODE_UNSPECIFIED" - Unspecified. + // "BLACK_AND_WHITE" - Black and white. + // "COLOR" - Color. + ColorMode string `json:"colorMode,omitempty"` + + // CompleteTime: Print job completion timestamp. + CompleteTime string `json:"completeTime,omitempty"` + + // CopyCount: Number of copies. + CopyCount int64 `json:"copyCount,omitempty"` + + // CreateTime: Print job creation timestamp. + CreateTime string `json:"createTime,omitempty"` + + // DocumentPageCount: Number of pages in the document. + DocumentPageCount int64 `json:"documentPageCount,omitempty"` + + // DuplexMode: Duplex mode. + // + // Possible values: + // "DUPLEX_MODE_UNSPECIFIED" - Unspecified. + // "ONE_SIDED" - One-sided. + // "TWO_SIDED_LONG_EDGE" - Two-sided flipping over long edge. + // "TWO_SIDED_SHORT_EDGE" - Two-sided flipping over short edge. + DuplexMode string `json:"duplexMode,omitempty"` + + // Id: Unique ID of the print job. + Id string `json:"id,omitempty"` + + // Printer: Name of the printer used for printing. + Printer string `json:"printer,omitempty"` + + // PrinterId: API ID of the printer used for printing. + PrinterId string `json:"printerId,omitempty"` + + // State: The final state of the job. + // + // Possible values: + // "STATE_UNSPECIFIED" - Print job is in an unspecified state. + // "PRINTED" - The document was successfully printed. + // "CANCELLED" - Print job was cancelled. + // "FAILED" - Print job failed. + State string `json:"state,omitempty"` + + // Title: The title of the document. + Title string `json:"title,omitempty"` + + // UserEmail: The primary e-mail address of the user who submitted the + // print job. + UserEmail string `json:"userEmail,omitempty"` + + // UserId: The unique Directory API ID of the user who submitted the + // print job. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ColorMode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ColorMode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1PrintJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1PrintJob + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementV1PrinterReport: Report for +// CountPrintJobsByPrinter, contains statistics on printer usage. +// Contains the total number of print jobs initiated with this printer, +// the number of users and the number of devices that have initiated at +// least one print job with this printer. +type GoogleChromeManagementV1PrinterReport struct { + // DeviceCount: Number of chrome devices that have been used to send + // print jobs to the specified printer. + DeviceCount int64 `json:"deviceCount,omitempty,string"` + + // JobCount: Number of print jobs sent to the printer. + JobCount int64 `json:"jobCount,omitempty,string"` + + // Printer: Printer name. + Printer string `json:"printer,omitempty"` + + // PrinterId: Printer API ID. + PrinterId string `json:"printerId,omitempty"` + + // PrinterModel: Printer model. + PrinterModel string `json:"printerModel,omitempty"` + + // UserCount: Number of users that have sent print jobs to the printer. + UserCount int64 `json:"userCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DeviceCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceCount") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1PrinterReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1PrinterReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1StorageInfo: Status data for storage. * This // field is telemetry information and this will change over time as the // device is utilized. * Data for this field is controlled via policy: @@ -3060,6 +3419,46 @@ func (s *GoogleChromeManagementV1TelemetryEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1TelemetryEventNotificationFilter: Configures +// how the telemetry events should be filtered. +type GoogleChromeManagementV1TelemetryEventNotificationFilter struct { + // EventTypes: Only sends the notifications for events of these types. + // Must not be empty. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Event type unknown. + // "AUDIO_SEVERE_UNDERRUN" - Triggered when a audio devices run out of + // buffer data for more than 5 seconds. + // "USB_ADDED" - Triggered when USB devices are added. + // "USB_REMOVED" - Triggered when USB devices are removed. + // "NETWORK_HTTPS_LATENCY_CHANGE" - Triggered when a new HTTPS latency + // problem was detected or the device has recovered form an existing + // HTTPS latency problem. + EventTypes []string `json:"eventTypes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventTypes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EventTypes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1TelemetryEventNotificationFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1TelemetryEventNotificationFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent: Https // latency routine is run periodically and // `TelemetryHttpsLatencyChangeEvent` is triggered if a latency problem @@ -3104,13 +3503,104 @@ func (s *GoogleChromeManagementV1TelemetryHttpsLatencyChangeEvent) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleChromeManagementV1TelemetryUsbPeripheralsEvent: -// `TelemetryUsbPeripheralsEvent` is triggered USB devices are either -// added or removed. * Granular permission needed: -// TELEMETRY_API_PERIPHERALS_REPORT -type GoogleChromeManagementV1TelemetryUsbPeripheralsEvent struct { - // UsbPeripheralReport: List of usb devices that were either added or - // removed. +// GoogleChromeManagementV1TelemetryNotificationConfig: Configuration to +// receive notifications of telemetry data. +type GoogleChromeManagementV1TelemetryNotificationConfig struct { + // Customer: Output only. Google Workspace customer that owns the + // resource. + Customer string `json:"customer,omitempty"` + + // Filter: Only send notifications for telemetry data matching this + // filter. + Filter *GoogleChromeManagementV1TelemetryNotificationFilter `json:"filter,omitempty"` + + // GoogleCloudPubsubTopic: The pubsub topic to which notifications are + // published to. + GoogleCloudPubsubTopic string `json:"googleCloudPubsubTopic,omitempty"` + + // Name: Output only. Resource name of the notification configuration. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Customer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Customer") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1TelemetryNotificationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1TelemetryNotificationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementV1TelemetryNotificationFilter: Configures how +// the telemetry data should be filtered. +type GoogleChromeManagementV1TelemetryNotificationFilter struct { + // DeviceId: If set, only sends notifications for telemetry data coming + // from this device. + DeviceId string `json:"deviceId,omitempty"` + + // DeviceOrgUnitId: If set, only sends notifications for telemetry data + // coming from devices in this org unit. + DeviceOrgUnitId string `json:"deviceOrgUnitId,omitempty"` + + // TelemetryEventNotificationFilter: Only sends notifications for the + // telemetry events matching this filter. + TelemetryEventNotificationFilter *GoogleChromeManagementV1TelemetryEventNotificationFilter `json:"telemetryEventNotificationFilter,omitempty"` + + // UserEmail: If set, only sends notifications for telemetry data coming + // from devices owned by this user. + UserEmail string `json:"userEmail,omitempty"` + + // UserOrgUnitId: If set, only sends notifications for telemetry data + // coming from devices owned by users in this org unit. + UserOrgUnitId string `json:"userOrgUnitId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1TelemetryNotificationFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1TelemetryNotificationFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementV1TelemetryUsbPeripheralsEvent: +// `TelemetryUsbPeripheralsEvent` is triggered USB devices are either +// added or removed. * Granular permission needed: +// TELEMETRY_API_PERIPHERALS_REPORT +type GoogleChromeManagementV1TelemetryUsbPeripheralsEvent struct { + // UsbPeripheralReport: List of usb devices that were either added or + // removed. UsbPeripheralReport []*GoogleChromeManagementV1UsbPeripheralReport `json:"usbPeripheralReport,omitempty"` // ForceSendFields is a list of field names (e.g. "UsbPeripheralReport") @@ -3193,6 +3683,10 @@ type GoogleChromeManagementV1TelemetryUserDevice struct { // sorted in a decreasing order of report_time. AudioStatusReport []*GoogleChromeManagementV1AudioStatusReport `json:"audioStatusReport,omitempty"` + // DeviceActivityReport: Output only. Device activity reports collected + // periodically sorted in a decreasing order of report_time. + DeviceActivityReport []*GoogleChromeManagementV1DeviceActivityReport `json:"deviceActivityReport,omitempty"` + // DeviceId: The unique Directory API ID of the device. This value is // the same as the Admin Console's Directory API ID in the ChromeOS // Devices tab. @@ -3509,6 +4003,61 @@ func (s *GoogleChromeManagementV1UsbPeripheralReport) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1UserPrintReport: Report for +// CountPrintJobsByUser, contains printing statistics for a user. +// Contains the number of printers, the number of devices used to +// initiate print jobs, and the number of print jobs initiated. +type GoogleChromeManagementV1UserPrintReport struct { + // DeviceCount: Number of chrome devices that have been used to initiate + // print jobs by the user. + DeviceCount int64 `json:"deviceCount,omitempty,string"` + + // JobCount: Number of print jobs initiated by the user. + JobCount int64 `json:"jobCount,omitempty,string"` + + // PrinterCount: Number of printers used by the user. + PrinterCount int64 `json:"printerCount,omitempty,string"` + + // UserEmail: The primary e-mail address of the user. + UserEmail string `json:"userEmail,omitempty"` + + // UserId: The unique Directory API ID of the user. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceCount") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1UserPrintReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1UserPrintReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // GoogleRpcStatus: The `Status` type defines a logical error model that // is suitable for different programming environments, including REST // APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each @@ -5444,9 +5993,9 @@ func (c *CustomersReportsCountInstalledAppsCall) Pages(ctx context.Context, f fu } } -// method id "chromemanagement.customers.reports.findInstalledAppDevices": +// method id "chromemanagement.customers.reports.countPrintJobsByPrinter": -type CustomersReportsFindInstalledAppDevicesCall struct { +type CustomersReportsCountPrintJobsByPrinterCall struct { s *Service customer string urlParams_ gensupport.URLParams @@ -5455,82 +6004,64 @@ type CustomersReportsFindInstalledAppDevicesCall struct { header_ http.Header } -// FindInstalledAppDevices: Generate report of managed Chrome browser -// devices that have a specified app installed. +// CountPrintJobsByPrinter: Get a summary of printing done by each +// printer. // -// - customer: Customer id or "my_customer" to use the customer -// associated to the account making the request. -func (r *CustomersReportsService) FindInstalledAppDevices(customer string) *CustomersReportsFindInstalledAppDevicesCall { - c := &CustomersReportsFindInstalledAppDevicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - customer: Customer ID prefixed with "customers/" or +// "customers/my_customer" to use the customer associated to the +// account making the request. +func (r *CustomersReportsService) CountPrintJobsByPrinter(customer string) *CustomersReportsCountPrintJobsByPrinterCall { + c := &CustomersReportsCountPrintJobsByPrinterCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.customer = customer return c } -// AppId sets the optional parameter "appId": Unique identifier of the -// app. For Chrome apps and extensions, the 32-character id (e.g. -// ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name -// (e.g. com.evernote). -func (c *CustomersReportsFindInstalledAppDevicesCall) AppId(appId string) *CustomersReportsFindInstalledAppDevicesCall { - c.urlParams_.Set("appId", appId) - return c -} - -// AppType sets the optional parameter "appType": Type of the app. -// -// Possible values: -// -// "APP_TYPE_UNSPECIFIED" - App type not specified. -// "EXTENSION" - Chrome extension. -// "APP" - Chrome app. -// "THEME" - Chrome theme. -// "HOSTED_APP" - Chrome hosted app. -// "ANDROID_APP" - ARC++ app. -func (c *CustomersReportsFindInstalledAppDevicesCall) AppType(appType string) *CustomersReportsFindInstalledAppDevicesCall { - c.urlParams_.Set("appType", appType) - return c -} - // Filter sets the optional parameter "filter": Query string to filter // results, AND-separated fields in EBNF syntax. Note: OR operations are -// not supported in this filter. Supported filter fields: * -// last_active_date -func (c *CustomersReportsFindInstalledAppDevicesCall) Filter(filter string) *CustomersReportsFindInstalledAppDevicesCall { +// not supported in this filter. Note: Only >= and <= comparators are +// supported in this filter. Supported filter fields: * complete_time +func (c *CustomersReportsCountPrintJobsByPrinterCall) Filter(filter string) *CustomersReportsCountPrintJobsByPrinterCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Field used to order -// results. Supported order by fields: * machine * device_id -func (c *CustomersReportsFindInstalledAppDevicesCall) OrderBy(orderBy string) *CustomersReportsFindInstalledAppDevicesCall { +// results. If omitted, results will be ordered in ascending order of +// the 'printer' field. Supported order_by fields: * printer * job_count +// * device_count * user_count +func (c *CustomersReportsCountPrintJobsByPrinterCall) OrderBy(orderBy string) *CustomersReportsCountPrintJobsByPrinterCall { c.urlParams_.Set("orderBy", orderBy) return c } -// OrgUnitId sets the optional parameter "orgUnitId": The ID of the -// organizational unit. -func (c *CustomersReportsFindInstalledAppDevicesCall) OrgUnitId(orgUnitId string) *CustomersReportsFindInstalledAppDevicesCall { - c.urlParams_.Set("orgUnitId", orgUnitId) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of // results to return. Maximum and default are 100. -func (c *CustomersReportsFindInstalledAppDevicesCall) PageSize(pageSize int64) *CustomersReportsFindInstalledAppDevicesCall { +func (c *CustomersReportsCountPrintJobsByPrinterCall) PageSize(pageSize int64) *CustomersReportsCountPrintJobsByPrinterCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Token to specify -// the page of the request to be returned. -func (c *CustomersReportsFindInstalledAppDevicesCall) PageToken(pageToken string) *CustomersReportsFindInstalledAppDevicesCall { +// the page of the response to be returned. +func (c *CustomersReportsCountPrintJobsByPrinterCall) PageToken(pageToken string) *CustomersReportsCountPrintJobsByPrinterCall { c.urlParams_.Set("pageToken", pageToken) return c } +// PrinterOrgUnitId sets the optional parameter "printerOrgUnitId": The +// ID of the organizational unit for printers. If specified, only data +// for printers from the specified organizational unit will be returned. +// If omitted, data for printers from all organizational units will be +// returned. +func (c *CustomersReportsCountPrintJobsByPrinterCall) PrinterOrgUnitId(printerOrgUnitId string) *CustomersReportsCountPrintJobsByPrinterCall { + c.urlParams_.Set("printerOrgUnitId", printerOrgUnitId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *CustomersReportsFindInstalledAppDevicesCall) Fields(s ...googleapi.Field) *CustomersReportsFindInstalledAppDevicesCall { +func (c *CustomersReportsCountPrintJobsByPrinterCall) Fields(s ...googleapi.Field) *CustomersReportsCountPrintJobsByPrinterCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5540,7 +6071,7 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) Fields(s ...googleapi.Fiel // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *CustomersReportsFindInstalledAppDevicesCall) IfNoneMatch(entityTag string) *CustomersReportsFindInstalledAppDevicesCall { +func (c *CustomersReportsCountPrintJobsByPrinterCall) IfNoneMatch(entityTag string) *CustomersReportsCountPrintJobsByPrinterCall { c.ifNoneMatch_ = entityTag return c } @@ -5548,21 +6079,21 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) IfNoneMatch(entityTag stri // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *CustomersReportsFindInstalledAppDevicesCall) Context(ctx context.Context) *CustomersReportsFindInstalledAppDevicesCall { +func (c *CustomersReportsCountPrintJobsByPrinterCall) Context(ctx context.Context) *CustomersReportsCountPrintJobsByPrinterCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *CustomersReportsFindInstalledAppDevicesCall) Header() http.Header { +func (c *CustomersReportsCountPrintJobsByPrinterCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CustomersReportsFindInstalledAppDevicesCall) doRequest(alt string) (*http.Response, error) { +func (c *CustomersReportsCountPrintJobsByPrinterCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5575,7 +6106,7 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:findInstalledAppDevices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:countPrintJobsByPrinter") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5588,17 +6119,17 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chromemanagement.customers.reports.findInstalledAppDevices" call. +// Do executes the "chromemanagement.customers.reports.countPrintJobsByPrinter" call. // Exactly one of -// *GoogleChromeManagementV1FindInstalledAppDevicesResponse or error +// *GoogleChromeManagementV1CountPrintJobsByPrinterResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleChromeManagementV1FindInstalledAppDevicesResponse.ServerRespons +// *GoogleChromeManagementV1CountPrintJobsByPrinterResponse.ServerRespons // e.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *CustomersReportsFindInstalledAppDevicesCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1FindInstalledAppDevicesResponse, error) { +func (c *CustomersReportsCountPrintJobsByPrinterCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1CountPrintJobsByPrinterResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5617,7 +6148,7 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleChromeManagementV1FindInstalledAppDevicesResponse{ + ret := &GoogleChromeManagementV1CountPrintJobsByPrinterResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5629,59 +6160,28 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Generate report of managed Chrome browser devices that have a specified app installed.", - // "flatPath": "v1/customers/{customersId}/reports:findInstalledAppDevices", + // "description": "Get a summary of printing done by each printer.", + // "flatPath": "v1/customers/{customersId}/reports:countPrintJobsByPrinter", // "httpMethod": "GET", - // "id": "chromemanagement.customers.reports.findInstalledAppDevices", + // "id": "chromemanagement.customers.reports.countPrintJobsByPrinter", // "parameterOrder": [ // "customer" // ], // "parameters": { - // "appId": { - // "description": "Unique identifier of the app. For Chrome apps and extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name (e.g. com.evernote).", - // "location": "query", - // "type": "string" - // }, - // "appType": { - // "description": "Type of the app.", - // "enum": [ - // "APP_TYPE_UNSPECIFIED", - // "EXTENSION", - // "APP", - // "THEME", - // "HOSTED_APP", - // "ANDROID_APP" - // ], - // "enumDescriptions": [ - // "App type not specified.", - // "Chrome extension.", - // "Chrome app.", - // "Chrome theme.", - // "Chrome hosted app.", - // "ARC++ app." - // ], - // "location": "query", - // "type": "string" - // }, // "customer": { - // "description": "Required. Customer id or \"my_customer\" to use the customer associated to the account making the request.", + // "description": "Required. Customer ID prefixed with \"customers/\" or \"customers/my_customer\" to use the customer associated to the account making the request.", // "location": "path", // "pattern": "^customers/[^/]+$", // "required": true, // "type": "string" // }, // "filter": { - // "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date", + // "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Note: Only \u003e= and \u003c= comparators are supported in this filter. Supported filter fields: * complete_time", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Field used to order results. Supported order by fields: * machine * device_id", - // "location": "query", - // "type": "string" - // }, - // "orgUnitId": { - // "description": "The ID of the organizational unit.", + // "description": "Field used to order results. If omitted, results will be ordered in ascending order of the 'printer' field. Supported order_by fields: * printer * job_count * device_count * user_count", // "location": "query", // "type": "string" // }, @@ -5692,14 +6192,19 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) Do(opts ...googleapi.CallO // "type": "integer" // }, // "pageToken": { - // "description": "Token to specify the page of the request to be returned.", + // "description": "Token to specify the page of the response to be returned.", + // "location": "query", + // "type": "string" + // }, + // "printerOrgUnitId": { + // "description": "The ID of the organizational unit for printers. If specified, only data for printers from the specified organizational unit will be returned. If omitted, data for printers from all organizational units will be returned.", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+customer}/reports:findInstalledAppDevices", + // "path": "v1/{+customer}/reports:countPrintJobsByPrinter", // "response": { - // "$ref": "GoogleChromeManagementV1FindInstalledAppDevicesResponse" + // "$ref": "GoogleChromeManagementV1CountPrintJobsByPrinterResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/chrome.management.reports.readonly" @@ -5711,7 +6216,7 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) Do(opts ...googleapi.CallO // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *CustomersReportsFindInstalledAppDevicesCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1FindInstalledAppDevicesResponse) error) error { +func (c *CustomersReportsCountPrintJobsByPrinterCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1CountPrintJobsByPrinterResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -5729,37 +6234,73 @@ func (c *CustomersReportsFindInstalledAppDevicesCall) Pages(ctx context.Context, } } -// method id "chromemanagement.customers.telemetry.devices.get": +// method id "chromemanagement.customers.reports.countPrintJobsByUser": -type CustomersTelemetryDevicesGetCall struct { +type CustomersReportsCountPrintJobsByUserCall struct { s *Service - name string + customer string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Get telemetry device. +// CountPrintJobsByUser: Get a summary of printing done by each user. // -// - name: Name of the `TelemetryDevice` to return. -func (r *CustomersTelemetryDevicesService) Get(name string) *CustomersTelemetryDevicesGetCall { - c := &CustomersTelemetryDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - customer: Customer ID prefixed with "customers/" or +// "customers/my_customer" to use the customer associated to the +// account making the request. +func (r *CustomersReportsService) CountPrintJobsByUser(customer string) *CustomersReportsCountPrintJobsByUserCall { + c := &CustomersReportsCountPrintJobsByUserCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer return c } -// ReadMask sets the optional parameter "readMask": Required. Read mask -// to specify which fields to return. -func (c *CustomersTelemetryDevicesGetCall) ReadMask(readMask string) *CustomersTelemetryDevicesGetCall { - c.urlParams_.Set("readMask", readMask) +// Filter sets the optional parameter "filter": Query string to filter +// results, AND-separated fields in EBNF syntax. Note: OR operations are +// not supported in this filter. Note: Only >= and <= comparators are +// supported in this filter. Supported filter fields: * complete_time +func (c *CustomersReportsCountPrintJobsByUserCall) Filter(filter string) *CustomersReportsCountPrintJobsByUserCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field used to order +// results. If omitted, results will be ordered in ascending order of +// the 'user_email' field. Supported order_by fields: * user_email * +// job_count * printer_count * device_count +func (c *CustomersReportsCountPrintJobsByUserCall) OrderBy(orderBy string) *CustomersReportsCountPrintJobsByUserCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. Maximum and default are 100. +func (c *CustomersReportsCountPrintJobsByUserCall) PageSize(pageSize int64) *CustomersReportsCountPrintJobsByUserCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// the page of the response to be returned. +func (c *CustomersReportsCountPrintJobsByUserCall) PageToken(pageToken string) *CustomersReportsCountPrintJobsByUserCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// PrinterOrgUnitId sets the optional parameter "printerOrgUnitId": The +// ID of the organizational unit for printers. If specified, only print +// jobs initiated with printers from the specified organizational unit +// will be counted. If omitted, all print jobs will be counted. +func (c *CustomersReportsCountPrintJobsByUserCall) PrinterOrgUnitId(printerOrgUnitId string) *CustomersReportsCountPrintJobsByUserCall { + c.urlParams_.Set("printerOrgUnitId", printerOrgUnitId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *CustomersTelemetryDevicesGetCall) Fields(s ...googleapi.Field) *CustomersTelemetryDevicesGetCall { +func (c *CustomersReportsCountPrintJobsByUserCall) Fields(s ...googleapi.Field) *CustomersReportsCountPrintJobsByUserCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5769,7 +6310,7 @@ func (c *CustomersTelemetryDevicesGetCall) Fields(s ...googleapi.Field) *Custome // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *CustomersTelemetryDevicesGetCall) IfNoneMatch(entityTag string) *CustomersTelemetryDevicesGetCall { +func (c *CustomersReportsCountPrintJobsByUserCall) IfNoneMatch(entityTag string) *CustomersReportsCountPrintJobsByUserCall { c.ifNoneMatch_ = entityTag return c } @@ -5777,21 +6318,21 @@ func (c *CustomersTelemetryDevicesGetCall) IfNoneMatch(entityTag string) *Custom // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *CustomersTelemetryDevicesGetCall) Context(ctx context.Context) *CustomersTelemetryDevicesGetCall { +func (c *CustomersReportsCountPrintJobsByUserCall) Context(ctx context.Context) *CustomersReportsCountPrintJobsByUserCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *CustomersTelemetryDevicesGetCall) Header() http.Header { +func (c *CustomersReportsCountPrintJobsByUserCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CustomersTelemetryDevicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *CustomersReportsCountPrintJobsByUserCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5804,7 +6345,7 @@ func (c *CustomersTelemetryDevicesGetCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:countPrintJobsByUser") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5812,20 +6353,21 @@ func (c *CustomersTelemetryDevicesGetCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "customer": c.customer, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chromemanagement.customers.telemetry.devices.get" call. -// Exactly one of *GoogleChromeManagementV1TelemetryDevice or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleChromeManagementV1TelemetryDevice.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *CustomersTelemetryDevicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1TelemetryDevice, error) { +// Do executes the "chromemanagement.customers.reports.countPrintJobsByUser" call. +// Exactly one of *GoogleChromeManagementV1CountPrintJobsByUserResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleChromeManagementV1CountPrintJobsByUserResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *CustomersReportsCountPrintJobsByUserCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1CountPrintJobsByUserResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5844,7 +6386,7 @@ func (c *CustomersTelemetryDevicesGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleChromeManagementV1TelemetryDevice{ + ret := &GoogleChromeManagementV1CountPrintJobsByUserResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5856,98 +6398,155 @@ func (c *CustomersTelemetryDevicesGetCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Get telemetry device.", - // "flatPath": "v1/customers/{customersId}/telemetry/devices/{devicesId}", + // "description": "Get a summary of printing done by each user.", + // "flatPath": "v1/customers/{customersId}/reports:countPrintJobsByUser", // "httpMethod": "GET", - // "id": "chromemanagement.customers.telemetry.devices.get", + // "id": "chromemanagement.customers.reports.countPrintJobsByUser", // "parameterOrder": [ - // "name" + // "customer" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the `TelemetryDevice` to return.", + // "customer": { + // "description": "Required. Customer ID prefixed with \"customers/\" or \"customers/my_customer\" to use the customer associated to the account making the request.", // "location": "path", - // "pattern": "^customers/[^/]+/telemetry/devices/[^/]+$", + // "pattern": "^customers/[^/]+$", // "required": true, // "type": "string" // }, - // "readMask": { - // "description": "Required. Read mask to specify which fields to return.", - // "format": "google-fieldmask", + // "filter": { + // "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Note: Only \u003e= and \u003c= comparators are supported in this filter. Supported filter fields: * complete_time", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field used to order results. If omitted, results will be ordered in ascending order of the 'user_email' field. Supported order_by fields: * user_email * job_count * printer_count * device_count", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return. Maximum and default are 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify the page of the response to be returned.", + // "location": "query", + // "type": "string" + // }, + // "printerOrgUnitId": { + // "description": "The ID of the organizational unit for printers. If specified, only print jobs initiated with printers from the specified organizational unit will be counted. If omitted, all print jobs will be counted.", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+name}", + // "path": "v1/{+customer}/reports:countPrintJobsByUser", // "response": { - // "$ref": "GoogleChromeManagementV1TelemetryDevice" + // "$ref": "GoogleChromeManagementV1CountPrintJobsByUserResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // "https://www.googleapis.com/auth/chrome.management.reports.readonly" // ] // } } -// method id "chromemanagement.customers.telemetry.devices.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CustomersReportsCountPrintJobsByUserCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1CountPrintJobsByUserResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type CustomersTelemetryDevicesListCall struct { +// method id "chromemanagement.customers.reports.enumeratePrintJobs": + +type CustomersReportsEnumeratePrintJobsCall struct { s *Service - parent string + customer string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: List all telemetry devices. +// EnumeratePrintJobs: Get a list of print jobs. // -// - parent: Customer id or "my_customer" to use the customer associated -// to the account making the request. -func (r *CustomersTelemetryDevicesService) List(parent string) *CustomersTelemetryDevicesListCall { - c := &CustomersTelemetryDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - customer: Customer ID prefixed with "customers/" or +// "customers/my_customer" to use the customer associated to the +// account making the request. +func (r *CustomersReportsService) EnumeratePrintJobs(customer string) *CustomersReportsEnumeratePrintJobsCall { + c := &CustomersReportsEnumeratePrintJobsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer return c } -// Filter sets the optional parameter "filter": Only include resources -// that match the filter. Supported filter fields: - org_unit_id - -// serial_number - device_id - reports_timestamp The "reports_timestamp" -// filter accepts either the Unix Epoch milliseconds format or the -// RFC3339 UTC "Zulu" format with nanosecond resolution and up to nine -// fractional digits. Both formats should be surrounded by simple double -// quotes. Examples: "2014-10-02T15:01:23Z", -// "2014-10-02T15:01:23.045123456Z", "1679283943823". -func (c *CustomersTelemetryDevicesListCall) Filter(filter string) *CustomersTelemetryDevicesListCall { +// Filter sets the optional parameter "filter": Query string to filter +// results, AND-separated fields in EBNF syntax. Note: OR operations are +// not supported in this filter. Note: Only >= and <= comparators are +// supported for `complete_time`. Note: Only = comparator supported for +// `user_id` and `printer_id`. Supported filter fields: * complete_time +// * printer_id * user_id +func (c *CustomersReportsEnumeratePrintJobsCall) Filter(filter string) *CustomersReportsEnumeratePrintJobsCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. Default value is 100. Maximum value is 1000. -func (c *CustomersTelemetryDevicesListCall) PageSize(pageSize int64) *CustomersTelemetryDevicesListCall { +// OrderBy sets the optional parameter "orderBy": Field used to order +// results. If not specified, results will be ordered in descending +// order of the `complete_time` field. Supported order by fields: * +// title * state * create_time * complete_time * document_page_count * +// color_mode * duplex_mode * printer * user_email +func (c *CustomersReportsEnumeratePrintJobsCall) OrderBy(orderBy string) *CustomersReportsEnumeratePrintJobsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The number of print +// jobs in the page from 0 to 100 inclusive, if page_size is not +// specified or zero, the size will be 50. +func (c *CustomersReportsEnumeratePrintJobsCall) PageSize(pageSize int64) *CustomersReportsEnumeratePrintJobsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Token to specify -// next page in the list. -func (c *CustomersTelemetryDevicesListCall) PageToken(pageToken string) *CustomersTelemetryDevicesListCall { +// PageToken sets the optional parameter "pageToken": A page token +// received from a previous `EnumeratePrintJobs` call. Provide this to +// retrieve the subsequent page. If omitted, the first page of results +// will be returned. When paginating, all other parameters provided to +// `EnumeratePrintJobs` must match the call that provided the page +// token. +func (c *CustomersReportsEnumeratePrintJobsCall) PageToken(pageToken string) *CustomersReportsEnumeratePrintJobsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Required. Read mask -// to specify which fields to return. -func (c *CustomersTelemetryDevicesListCall) ReadMask(readMask string) *CustomersTelemetryDevicesListCall { - c.urlParams_.Set("readMask", readMask) +// PrinterOrgUnitId sets the optional parameter "printerOrgUnitId": The +// ID of the organizational unit for printers. If specified, only print +// jobs submitted to printers from the specified organizational unit +// will be returned. +func (c *CustomersReportsEnumeratePrintJobsCall) PrinterOrgUnitId(printerOrgUnitId string) *CustomersReportsEnumeratePrintJobsCall { + c.urlParams_.Set("printerOrgUnitId", printerOrgUnitId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *CustomersTelemetryDevicesListCall) Fields(s ...googleapi.Field) *CustomersTelemetryDevicesListCall { +func (c *CustomersReportsEnumeratePrintJobsCall) Fields(s ...googleapi.Field) *CustomersReportsEnumeratePrintJobsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5957,7 +6556,7 @@ func (c *CustomersTelemetryDevicesListCall) Fields(s ...googleapi.Field) *Custom // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *CustomersTelemetryDevicesListCall) IfNoneMatch(entityTag string) *CustomersTelemetryDevicesListCall { +func (c *CustomersReportsEnumeratePrintJobsCall) IfNoneMatch(entityTag string) *CustomersReportsEnumeratePrintJobsCall { c.ifNoneMatch_ = entityTag return c } @@ -5965,21 +6564,21 @@ func (c *CustomersTelemetryDevicesListCall) IfNoneMatch(entityTag string) *Custo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *CustomersTelemetryDevicesListCall) Context(ctx context.Context) *CustomersTelemetryDevicesListCall { +func (c *CustomersReportsEnumeratePrintJobsCall) Context(ctx context.Context) *CustomersReportsEnumeratePrintJobsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *CustomersTelemetryDevicesListCall) Header() http.Header { +func (c *CustomersReportsEnumeratePrintJobsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CustomersTelemetryDevicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *CustomersReportsEnumeratePrintJobsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -5992,7 +6591,7 @@ func (c *CustomersTelemetryDevicesListCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/telemetry/devices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:enumeratePrintJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6000,21 +6599,21 @@ func (c *CustomersTelemetryDevicesListCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "customer": c.customer, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chromemanagement.customers.telemetry.devices.list" call. -// Exactly one of *GoogleChromeManagementV1ListTelemetryDevicesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleChromeManagementV1ListTelemetryDevicesResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "chromemanagement.customers.reports.enumeratePrintJobs" call. +// Exactly one of *GoogleChromeManagementV1EnumeratePrintJobsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleChromeManagementV1EnumeratePrintJobsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1ListTelemetryDevicesResponse, error) { +func (c *CustomersReportsEnumeratePrintJobsCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1EnumeratePrintJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6033,7 +6632,7 @@ func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleChromeManagementV1ListTelemetryDevicesResponse{ + ret := &GoogleChromeManagementV1EnumeratePrintJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6045,50 +6644,54 @@ func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "List all telemetry devices.", - // "flatPath": "v1/customers/{customersId}/telemetry/devices", + // "description": "Get a list of print jobs.", + // "flatPath": "v1/customers/{customersId}/reports:enumeratePrintJobs", // "httpMethod": "GET", - // "id": "chromemanagement.customers.telemetry.devices.list", + // "id": "chromemanagement.customers.reports.enumeratePrintJobs", // "parameterOrder": [ - // "parent" + // "customer" // ], // "parameters": { + // "customer": { + // "description": "Required. Customer ID prefixed with \"customers/\" or \"customers/my_customer\" to use the customer associated to the account making the request.", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // }, // "filter": { - // "description": "Optional. Only include resources that match the filter. Supported filter fields: - org_unit_id - serial_number - device_id - reports_timestamp The \"reports_timestamp\" filter accepts either the Unix Epoch milliseconds format or the RFC3339 UTC \"Zulu\" format with nanosecond resolution and up to nine fractional digits. Both formats should be surrounded by simple double quotes. Examples: \"2014-10-02T15:01:23Z\", \"2014-10-02T15:01:23.045123456Z\", \"1679283943823\".", + // "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Note: Only \u003e= and \u003c= comparators are supported for `complete_time`. Note: Only = comparator supported for `user_id` and `printer_id`. Supported filter fields: * complete_time * printer_id * user_id", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field used to order results. If not specified, results will be ordered in descending order of the `complete_time` field. Supported order by fields: * title * state * create_time * complete_time * document_page_count * color_mode * duplex_mode * printer * user_email", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Maximum number of results to return. Default value is 100. Maximum value is 1000.", + // "description": "The number of print jobs in the page from 0 to 100 inclusive, if page_size is not specified or zero, the size will be 50.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Token to specify next page in the list.", + // "description": "A page token received from a previous `EnumeratePrintJobs` call. Provide this to retrieve the subsequent page. If omitted, the first page of results will be returned. When paginating, all other parameters provided to `EnumeratePrintJobs` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. Customer id or \"my_customer\" to use the customer associated to the account making the request.", - // "location": "path", - // "pattern": "^customers/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "readMask": { - // "description": "Required. Read mask to specify which fields to return.", - // "format": "google-fieldmask", + // "printerOrgUnitId": { + // "description": "The ID of the organizational unit for printers. If specified, only print jobs submitted to printers from the specified organizational unit will be returned.", // "location": "query", // "type": "string" // } // }, - // "path": "v1/{+parent}/telemetry/devices", + // "path": "v1/{+customer}/reports:enumeratePrintJobs", // "response": { - // "$ref": "GoogleChromeManagementV1ListTelemetryDevicesResponse" + // "$ref": "GoogleChromeManagementV1EnumeratePrintJobsResponse" // }, // "scopes": [ - // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // "https://www.googleapis.com/auth/chrome.management.reports.readonly" // ] // } @@ -6097,7 +6700,7 @@ func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*G // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *CustomersTelemetryDevicesListCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1ListTelemetryDevicesResponse) error) error { +func (c *CustomersReportsEnumeratePrintJobsCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1EnumeratePrintJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -6115,69 +6718,93 @@ func (c *CustomersTelemetryDevicesListCall) Pages(ctx context.Context, f func(*G } } -// method id "chromemanagement.customers.telemetry.events.list": +// method id "chromemanagement.customers.reports.findInstalledAppDevices": -type CustomersTelemetryEventsListCall struct { +type CustomersReportsFindInstalledAppDevicesCall struct { s *Service - parent string + customer string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: List telemetry events. +// FindInstalledAppDevices: Generate report of managed Chrome browser +// devices that have a specified app installed. // -// - parent: Customer id or "my_customer" to use the customer associated -// to the account making the request. -func (r *CustomersTelemetryEventsService) List(parent string) *CustomersTelemetryEventsListCall { - c := &CustomersTelemetryEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - customer: Customer id or "my_customer" to use the customer +// associated to the account making the request. +func (r *CustomersReportsService) FindInstalledAppDevices(customer string) *CustomersReportsFindInstalledAppDevicesCall { + c := &CustomersReportsFindInstalledAppDevicesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer return c } -// Filter sets the optional parameter "filter": Only include resources -// that match the filter. Although this parameter is currently optional, -// this parameter will be required- please specify at least 1 event -// type. Supported filter fields: - device_id - user_id - -// device_org_unit_id - user_org_unit_id - timestamp - event_type The -// "timestamp" filter accepts either the Unix Epoch milliseconds format -// or the RFC3339 UTC "Zulu" format with nanosecond resolution and up to -// nine fractional digits. Both formats should be surrounded by simple -// double quotes. Examples: "2014-10-02T15:01:23Z", -// "2014-10-02T15:01:23.045123456Z", "1679283943823". -func (c *CustomersTelemetryEventsListCall) Filter(filter string) *CustomersTelemetryEventsListCall { +// AppId sets the optional parameter "appId": Unique identifier of the +// app. For Chrome apps and extensions, the 32-character id (e.g. +// ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name +// (e.g. com.evernote). +func (c *CustomersReportsFindInstalledAppDevicesCall) AppId(appId string) *CustomersReportsFindInstalledAppDevicesCall { + c.urlParams_.Set("appId", appId) + return c +} + +// AppType sets the optional parameter "appType": Type of the app. +// +// Possible values: +// +// "APP_TYPE_UNSPECIFIED" - App type not specified. +// "EXTENSION" - Chrome extension. +// "APP" - Chrome app. +// "THEME" - Chrome theme. +// "HOSTED_APP" - Chrome hosted app. +// "ANDROID_APP" - ARC++ app. +func (c *CustomersReportsFindInstalledAppDevicesCall) AppType(appType string) *CustomersReportsFindInstalledAppDevicesCall { + c.urlParams_.Set("appType", appType) + return c +} + +// Filter sets the optional parameter "filter": Query string to filter +// results, AND-separated fields in EBNF syntax. Note: OR operations are +// not supported in this filter. Supported filter fields: * +// last_active_date +func (c *CustomersReportsFindInstalledAppDevicesCall) Filter(filter string) *CustomersReportsFindInstalledAppDevicesCall { c.urlParams_.Set("filter", filter) return c } +// OrderBy sets the optional parameter "orderBy": Field used to order +// results. Supported order by fields: * machine * device_id +func (c *CustomersReportsFindInstalledAppDevicesCall) OrderBy(orderBy string) *CustomersReportsFindInstalledAppDevicesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// OrgUnitId sets the optional parameter "orgUnitId": The ID of the +// organizational unit. +func (c *CustomersReportsFindInstalledAppDevicesCall) OrgUnitId(orgUnitId string) *CustomersReportsFindInstalledAppDevicesCall { + c.urlParams_.Set("orgUnitId", orgUnitId) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. Default value is 100. Maximum value is 1000. -func (c *CustomersTelemetryEventsListCall) PageSize(pageSize int64) *CustomersTelemetryEventsListCall { +// results to return. Maximum and default are 100. +func (c *CustomersReportsFindInstalledAppDevicesCall) PageSize(pageSize int64) *CustomersReportsFindInstalledAppDevicesCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Token to specify -// next page in the list. -func (c *CustomersTelemetryEventsListCall) PageToken(pageToken string) *CustomersTelemetryEventsListCall { +// the page of the request to be returned. +func (c *CustomersReportsFindInstalledAppDevicesCall) PageToken(pageToken string) *CustomersReportsFindInstalledAppDevicesCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Required. Read mask -// to specify which fields to return. Although currently required, this -// field will become optional, while the filter parameter with an event -// type will be come required. -func (c *CustomersTelemetryEventsListCall) ReadMask(readMask string) *CustomersTelemetryEventsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *CustomersTelemetryEventsListCall) Fields(s ...googleapi.Field) *CustomersTelemetryEventsListCall { +func (c *CustomersReportsFindInstalledAppDevicesCall) Fields(s ...googleapi.Field) *CustomersReportsFindInstalledAppDevicesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6187,7 +6814,7 @@ func (c *CustomersTelemetryEventsListCall) Fields(s ...googleapi.Field) *Custome // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *CustomersTelemetryEventsListCall) IfNoneMatch(entityTag string) *CustomersTelemetryEventsListCall { +func (c *CustomersReportsFindInstalledAppDevicesCall) IfNoneMatch(entityTag string) *CustomersReportsFindInstalledAppDevicesCall { c.ifNoneMatch_ = entityTag return c } @@ -6195,21 +6822,21 @@ func (c *CustomersTelemetryEventsListCall) IfNoneMatch(entityTag string) *Custom // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *CustomersTelemetryEventsListCall) Context(ctx context.Context) *CustomersTelemetryEventsListCall { +func (c *CustomersReportsFindInstalledAppDevicesCall) Context(ctx context.Context) *CustomersReportsFindInstalledAppDevicesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *CustomersTelemetryEventsListCall) Header() http.Header { +func (c *CustomersReportsFindInstalledAppDevicesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CustomersTelemetryEventsListCall) doRequest(alt string) (*http.Response, error) { +func (c *CustomersReportsFindInstalledAppDevicesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -6222,7 +6849,7 @@ func (c *CustomersTelemetryEventsListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/telemetry/events") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:findInstalledAppDevices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6230,21 +6857,1159 @@ func (c *CustomersTelemetryEventsListCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.reports.findInstalledAppDevices" call. +// Exactly one of +// *GoogleChromeManagementV1FindInstalledAppDevicesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleChromeManagementV1FindInstalledAppDevicesResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *CustomersReportsFindInstalledAppDevicesCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1FindInstalledAppDevicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChromeManagementV1FindInstalledAppDevicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generate report of managed Chrome browser devices that have a specified app installed.", + // "flatPath": "v1/customers/{customersId}/reports:findInstalledAppDevices", + // "httpMethod": "GET", + // "id": "chromemanagement.customers.reports.findInstalledAppDevices", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "appId": { + // "description": "Unique identifier of the app. For Chrome apps and extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name (e.g. com.evernote).", + // "location": "query", + // "type": "string" + // }, + // "appType": { + // "description": "Type of the app.", + // "enum": [ + // "APP_TYPE_UNSPECIFIED", + // "EXTENSION", + // "APP", + // "THEME", + // "HOSTED_APP", + // "ANDROID_APP" + // ], + // "enumDescriptions": [ + // "App type not specified.", + // "Chrome extension.", + // "Chrome app.", + // "Chrome theme.", + // "Chrome hosted app.", + // "ARC++ app." + // ], + // "location": "query", + // "type": "string" + // }, + // "customer": { + // "description": "Required. Customer id or \"my_customer\" to use the customer associated to the account making the request.", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "filter": { + // "description": "Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Field used to order results. Supported order by fields: * machine * device_id", + // "location": "query", + // "type": "string" + // }, + // "orgUnitId": { + // "description": "The ID of the organizational unit.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return. Maximum and default are 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify the page of the request to be returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+customer}/reports:findInstalledAppDevices", + // "response": { + // "$ref": "GoogleChromeManagementV1FindInstalledAppDevicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.reports.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CustomersReportsFindInstalledAppDevicesCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1FindInstalledAppDevicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "chromemanagement.customers.telemetry.devices.get": + +type CustomersTelemetryDevicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get telemetry device. +// +// - name: Name of the `TelemetryDevice` to return. +func (r *CustomersTelemetryDevicesService) Get(name string) *CustomersTelemetryDevicesGetCall { + c := &CustomersTelemetryDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Required. Read mask +// to specify which fields to return. +func (c *CustomersTelemetryDevicesGetCall) ReadMask(readMask string) *CustomersTelemetryDevicesGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersTelemetryDevicesGetCall) Fields(s ...googleapi.Field) *CustomersTelemetryDevicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersTelemetryDevicesGetCall) IfNoneMatch(entityTag string) *CustomersTelemetryDevicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersTelemetryDevicesGetCall) Context(ctx context.Context) *CustomersTelemetryDevicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersTelemetryDevicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersTelemetryDevicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.telemetry.devices.get" call. +// Exactly one of *GoogleChromeManagementV1TelemetryDevice or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleChromeManagementV1TelemetryDevice.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CustomersTelemetryDevicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1TelemetryDevice, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChromeManagementV1TelemetryDevice{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get telemetry device.", + // "flatPath": "v1/customers/{customersId}/telemetry/devices/{devicesId}", + // "httpMethod": "GET", + // "id": "chromemanagement.customers.telemetry.devices.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the `TelemetryDevice` to return.", + // "location": "path", + // "pattern": "^customers/[^/]+/telemetry/devices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "readMask": { + // "description": "Required. Read mask to specify which fields to return.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleChromeManagementV1TelemetryDevice" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // ] + // } + +} + +// method id "chromemanagement.customers.telemetry.devices.list": + +type CustomersTelemetryDevicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all telemetry devices. +// +// - parent: Customer id or "my_customer" to use the customer associated +// to the account making the request. +func (r *CustomersTelemetryDevicesService) List(parent string) *CustomersTelemetryDevicesListCall { + c := &CustomersTelemetryDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Only include resources +// that match the filter. Supported filter fields: - org_unit_id - +// serial_number - device_id - reports_timestamp The "reports_timestamp" +// filter accepts either the Unix Epoch milliseconds format or the +// RFC3339 UTC "Zulu" format with nanosecond resolution and up to nine +// fractional digits. Both formats should be surrounded by simple double +// quotes. Examples: "2014-10-02T15:01:23Z", +// "2014-10-02T15:01:23.045123456Z", "1679283943823". +func (c *CustomersTelemetryDevicesListCall) Filter(filter string) *CustomersTelemetryDevicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. Default value is 100. Maximum value is 1000. +func (c *CustomersTelemetryDevicesListCall) PageSize(pageSize int64) *CustomersTelemetryDevicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list. +func (c *CustomersTelemetryDevicesListCall) PageToken(pageToken string) *CustomersTelemetryDevicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Required. Read mask +// to specify which fields to return. +func (c *CustomersTelemetryDevicesListCall) ReadMask(readMask string) *CustomersTelemetryDevicesListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersTelemetryDevicesListCall) Fields(s ...googleapi.Field) *CustomersTelemetryDevicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersTelemetryDevicesListCall) IfNoneMatch(entityTag string) *CustomersTelemetryDevicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersTelemetryDevicesListCall) Context(ctx context.Context) *CustomersTelemetryDevicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersTelemetryDevicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersTelemetryDevicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/telemetry/devices") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.telemetry.devices.list" call. +// Exactly one of *GoogleChromeManagementV1ListTelemetryDevicesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleChromeManagementV1ListTelemetryDevicesResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *CustomersTelemetryDevicesListCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1ListTelemetryDevicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChromeManagementV1ListTelemetryDevicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all telemetry devices.", + // "flatPath": "v1/customers/{customersId}/telemetry/devices", + // "httpMethod": "GET", + // "id": "chromemanagement.customers.telemetry.devices.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Only include resources that match the filter. Supported filter fields: - org_unit_id - serial_number - device_id - reports_timestamp The \"reports_timestamp\" filter accepts either the Unix Epoch milliseconds format or the RFC3339 UTC \"Zulu\" format with nanosecond resolution and up to nine fractional digits. Both formats should be surrounded by simple double quotes. Examples: \"2014-10-02T15:01:23Z\", \"2014-10-02T15:01:23.045123456Z\", \"1679283943823\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return. Default value is 100. Maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Token to specify next page in the list.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Customer id or \"my_customer\" to use the customer associated to the account making the request.", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "readMask": { + // "description": "Required. Read mask to specify which fields to return.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/telemetry/devices", + // "response": { + // "$ref": "GoogleChromeManagementV1ListTelemetryDevicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CustomersTelemetryDevicesListCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1ListTelemetryDevicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "chromemanagement.customers.telemetry.events.list": + +type CustomersTelemetryEventsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List telemetry events. +// +// - parent: Customer id or "my_customer" to use the customer associated +// to the account making the request. +func (r *CustomersTelemetryEventsService) List(parent string) *CustomersTelemetryEventsListCall { + c := &CustomersTelemetryEventsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Only include resources +// that match the filter. Although this parameter is currently optional, +// this parameter will be required- please specify at least 1 event +// type. Supported filter fields: - device_id - user_id - +// device_org_unit_id - user_org_unit_id - timestamp - event_type The +// "timestamp" filter accepts either the Unix Epoch milliseconds format +// or the RFC3339 UTC "Zulu" format with nanosecond resolution and up to +// nine fractional digits. Both formats should be surrounded by simple +// double quotes. Examples: "2014-10-02T15:01:23Z", +// "2014-10-02T15:01:23.045123456Z", "1679283943823". +func (c *CustomersTelemetryEventsListCall) Filter(filter string) *CustomersTelemetryEventsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. Default value is 100. Maximum value is 1000. +func (c *CustomersTelemetryEventsListCall) PageSize(pageSize int64) *CustomersTelemetryEventsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token to specify +// next page in the list. +func (c *CustomersTelemetryEventsListCall) PageToken(pageToken string) *CustomersTelemetryEventsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Required. Read mask +// to specify which fields to return. Although currently required, this +// field will become optional, while the filter parameter with an event +// type will be come required. +func (c *CustomersTelemetryEventsListCall) ReadMask(readMask string) *CustomersTelemetryEventsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersTelemetryEventsListCall) Fields(s ...googleapi.Field) *CustomersTelemetryEventsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersTelemetryEventsListCall) IfNoneMatch(entityTag string) *CustomersTelemetryEventsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersTelemetryEventsListCall) Context(ctx context.Context) *CustomersTelemetryEventsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersTelemetryEventsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersTelemetryEventsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/telemetry/events") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.telemetry.events.list" call. +// Exactly one of *GoogleChromeManagementV1ListTelemetryEventsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleChromeManagementV1ListTelemetryEventsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *CustomersTelemetryEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1ListTelemetryEventsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChromeManagementV1ListTelemetryEventsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List telemetry events.", + // "flatPath": "v1/customers/{customersId}/telemetry/events", + // "httpMethod": "GET", + // "id": "chromemanagement.customers.telemetry.events.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Only include resources that match the filter. Although this parameter is currently optional, this parameter will be required- please specify at least 1 event type. Supported filter fields: - device_id - user_id - device_org_unit_id - user_org_unit_id - timestamp - event_type The \"timestamp\" filter accepts either the Unix Epoch milliseconds format or the RFC3339 UTC \"Zulu\" format with nanosecond resolution and up to nine fractional digits. Both formats should be surrounded by simple double quotes. Examples: \"2014-10-02T15:01:23Z\", \"2014-10-02T15:01:23.045123456Z\", \"1679283943823\".", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Maximum number of results to return. Default value is 100. Maximum value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Token to specify next page in the list.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Customer id or \"my_customer\" to use the customer associated to the account making the request.", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "readMask": { + // "description": "Required. Read mask to specify which fields to return. Although currently required, this field will become optional, while the filter parameter with an event type will be come required.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/telemetry/events", + // "response": { + // "$ref": "GoogleChromeManagementV1ListTelemetryEventsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CustomersTelemetryEventsListCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1ListTelemetryEventsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "chromemanagement.customers.telemetry.notificationConfigs.create": + +type CustomersTelemetryNotificationConfigsCreateCall struct { + s *Service + parent string + googlechromemanagementv1telemetrynotificationconfig *GoogleChromeManagementV1TelemetryNotificationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a telemetry notification config. +// +// - parent: The parent resource where this notification config will be +// created. Format: `customers/{customer}`. +func (r *CustomersTelemetryNotificationConfigsService) Create(parent string, googlechromemanagementv1telemetrynotificationconfig *GoogleChromeManagementV1TelemetryNotificationConfig) *CustomersTelemetryNotificationConfigsCreateCall { + c := &CustomersTelemetryNotificationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlechromemanagementv1telemetrynotificationconfig = googlechromemanagementv1telemetrynotificationconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersTelemetryNotificationConfigsCreateCall) Fields(s ...googleapi.Field) *CustomersTelemetryNotificationConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersTelemetryNotificationConfigsCreateCall) Context(ctx context.Context) *CustomersTelemetryNotificationConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersTelemetryNotificationConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersTelemetryNotificationConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechromemanagementv1telemetrynotificationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/telemetry/notificationConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.telemetry.notificationConfigs.create" call. +// Exactly one of *GoogleChromeManagementV1TelemetryNotificationConfig +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleChromeManagementV1TelemetryNotificationConfig.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *CustomersTelemetryNotificationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1TelemetryNotificationConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleChromeManagementV1TelemetryNotificationConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create a telemetry notification config.", + // "flatPath": "v1/customers/{customersId}/telemetry/notificationConfigs", + // "httpMethod": "POST", + // "id": "chromemanagement.customers.telemetry.notificationConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this notification config will be created. Format: `customers/{customer}`", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/telemetry/notificationConfigs", + // "request": { + // "$ref": "GoogleChromeManagementV1TelemetryNotificationConfig" + // }, + // "response": { + // "$ref": "GoogleChromeManagementV1TelemetryNotificationConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // ] + // } + +} + +// method id "chromemanagement.customers.telemetry.notificationConfigs.delete": + +type CustomersTelemetryNotificationConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a telemetry notification config. +// +// - name: The name of the notification config to delete. Format: +// `customers/{customer}/telemetry/notificationConfigs/{notification_co +// nfig}`. +func (r *CustomersTelemetryNotificationConfigsService) Delete(name string) *CustomersTelemetryNotificationConfigsDeleteCall { + c := &CustomersTelemetryNotificationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersTelemetryNotificationConfigsDeleteCall) Fields(s ...googleapi.Field) *CustomersTelemetryNotificationConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersTelemetryNotificationConfigsDeleteCall) Context(ctx context.Context) *CustomersTelemetryNotificationConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersTelemetryNotificationConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersTelemetryNotificationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "chromemanagement.customers.telemetry.events.list" call. -// Exactly one of *GoogleChromeManagementV1ListTelemetryEventsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleChromeManagementV1ListTelemetryEventsResponse.ServerResponse.He -// ader or (if a response was returned at all) in +// Do executes the "chromemanagement.customers.telemetry.notificationConfigs.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CustomersTelemetryNotificationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete a telemetry notification config.", + // "flatPath": "v1/customers/{customersId}/telemetry/notificationConfigs/{notificationConfigsId}", + // "httpMethod": "DELETE", + // "id": "chromemanagement.customers.telemetry.notificationConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the notification config to delete. Format: `customers/{customer}/telemetry/notificationConfigs/{notification_config}`", + // "location": "path", + // "pattern": "^customers/[^/]+/telemetry/notificationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" + // ] + // } + +} + +// method id "chromemanagement.customers.telemetry.notificationConfigs.list": + +type CustomersTelemetryNotificationConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all telemetry notification configs. +// +// - parent: The parent which owns the notification configs. +func (r *CustomersTelemetryNotificationConfigsService) List(parent string) *CustomersTelemetryNotificationConfigsListCall { + c := &CustomersTelemetryNotificationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of notification configs to return. The service may return fewer than +// this value. If unspecified, at most 100 notification configs will be +// returned. The maximum value is 100; values above 100 will be coerced +// to 100. +func (c *CustomersTelemetryNotificationConfigsListCall) PageSize(pageSize int64) *CustomersTelemetryNotificationConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListTelemetryNotificationConfigs` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `ListTelemetryNotificationConfigs` must +// match the call that provided the page token. +func (c *CustomersTelemetryNotificationConfigsListCall) PageToken(pageToken string) *CustomersTelemetryNotificationConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersTelemetryNotificationConfigsListCall) Fields(s ...googleapi.Field) *CustomersTelemetryNotificationConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersTelemetryNotificationConfigsListCall) IfNoneMatch(entityTag string) *CustomersTelemetryNotificationConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersTelemetryNotificationConfigsListCall) Context(ctx context.Context) *CustomersTelemetryNotificationConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersTelemetryNotificationConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersTelemetryNotificationConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/telemetry/notificationConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.telemetry.notificationConfigs.list" call. +// Exactly one of +// *GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse.Serv +// erResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *CustomersTelemetryEventsListCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1ListTelemetryEventsResponse, error) { +func (c *CustomersTelemetryNotificationConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6263,7 +8028,7 @@ func (c *CustomersTelemetryEventsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleChromeManagementV1ListTelemetryEventsResponse{ + ret := &GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6275,47 +8040,36 @@ func (c *CustomersTelemetryEventsListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "List telemetry events.", - // "flatPath": "v1/customers/{customersId}/telemetry/events", + // "description": "List all telemetry notification configs.", + // "flatPath": "v1/customers/{customersId}/telemetry/notificationConfigs", // "httpMethod": "GET", - // "id": "chromemanagement.customers.telemetry.events.list", + // "id": "chromemanagement.customers.telemetry.notificationConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Optional. Only include resources that match the filter. Although this parameter is currently optional, this parameter will be required- please specify at least 1 event type. Supported filter fields: - device_id - user_id - device_org_unit_id - user_org_unit_id - timestamp - event_type The \"timestamp\" filter accepts either the Unix Epoch milliseconds format or the RFC3339 UTC \"Zulu\" format with nanosecond resolution and up to nine fractional digits. Both formats should be surrounded by simple double quotes. Examples: \"2014-10-02T15:01:23Z\", \"2014-10-02T15:01:23.045123456Z\", \"1679283943823\".", - // "location": "query", - // "type": "string" - // }, // "pageSize": { - // "description": "Optional. Maximum number of results to return. Default value is 100. Maximum value is 1000.", + // "description": "The maximum number of notification configs to return. The service may return fewer than this value. If unspecified, at most 100 notification configs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. Token to specify next page in the list.", + // "description": "A page token, received from a previous `ListTelemetryNotificationConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTelemetryNotificationConfigs` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Customer id or \"my_customer\" to use the customer associated to the account making the request.", + // "description": "Required. The parent which owns the notification configs.", // "location": "path", // "pattern": "^customers/[^/]+$", // "required": true, // "type": "string" - // }, - // "readMask": { - // "description": "Required. Read mask to specify which fields to return. Although currently required, this field will become optional, while the filter parameter with an event type will be come required.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1/{+parent}/telemetry/events", + // "path": "v1/{+parent}/telemetry/notificationConfigs", // "response": { - // "$ref": "GoogleChromeManagementV1ListTelemetryEventsResponse" + // "$ref": "GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/chrome.management.telemetry.readonly" @@ -6327,7 +8081,7 @@ func (c *CustomersTelemetryEventsListCall) Do(opts ...googleapi.CallOption) (*Go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *CustomersTelemetryEventsListCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1ListTelemetryEventsResponse) error) error { +func (c *CustomersTelemetryNotificationConfigsListCall) Pages(ctx context.Context, f func(*GoogleChromeManagementV1ListTelemetryNotificationConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/chromepolicy/v1/chromepolicy-api.json b/chromepolicy/v1/chromepolicy-api.json index 9c6a67c82c8..26f010c7618 100644 --- a/chromepolicy/v1/chromepolicy-api.json +++ b/chromepolicy/v1/chromepolicy-api.json @@ -557,7 +557,7 @@ } } }, - "revision": "20230727", + "revision": "20230906", "rootUrl": "https://chromepolicy.googleapis.com/", "schemas": { "ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle": { @@ -1678,6 +1678,28 @@ "description": "Describes a complete .proto file.", "id": "Proto2FileDescriptorProto", "properties": { + "editionEnum": { + "description": "The edition of the proto file.", + "enum": [ + "EDITION_UNKNOWN", + "EDITION_2023", + "EDITION_1_TEST_ONLY", + "EDITION_2_TEST_ONLY", + "EDITION_99997_TEST_ONLY", + "EDITION_99998_TEST_ONLY", + "EDITION_99999_TEST_ONLY" + ], + "enumDescriptions": [ + "A placeholder for an unknown edition value.", + "Editions that have been released. The specific values are arbitrary and should not be depended on, but they will always be time-ordered for easy comparison.", + "Placeholder editions for testing feature resolution. These should not be used or relyed on outside of tests.", + "", + "", + "", + "" + ], + "type": "string" + }, "enumType": { "items": { "$ref": "Proto2EnumDescriptorProto" diff --git a/chromepolicy/v1/chromepolicy-gen.go b/chromepolicy/v1/chromepolicy-gen.go index 0073b5aca4f..37da3ee003f 100644 --- a/chromepolicy/v1/chromepolicy-gen.go +++ b/chromepolicy/v1/chromepolicy-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: http://developers.google.com/chrome/policy // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // chromepolicyService, err := chromepolicy.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // chromepolicyService, err := chromepolicy.NewService(ctx, option.WithScopes(chromepolicy.ChromeManagementPolicyReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // chromepolicyService, err := chromepolicy.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // chromepolicyService, err := chromepolicy.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package chromepolicy // import "google.golang.org/api/chromepolicy/v1" import ( @@ -2148,6 +2162,21 @@ func (s *Proto2FieldDescriptorProto) MarshalJSON() ([]byte, error) { // Proto2FileDescriptorProto: Describes a complete .proto file. type Proto2FileDescriptorProto struct { + // EditionEnum: The edition of the proto file. + // + // Possible values: + // "EDITION_UNKNOWN" - A placeholder for an unknown edition value. + // "EDITION_2023" - Editions that have been released. The specific + // values are arbitrary and should not be depended on, but they will + // always be time-ordered for easy comparison. + // "EDITION_1_TEST_ONLY" - Placeholder editions for testing feature + // resolution. These should not be used or relyed on outside of tests. + // "EDITION_2_TEST_ONLY" + // "EDITION_99997_TEST_ONLY" + // "EDITION_99998_TEST_ONLY" + // "EDITION_99999_TEST_ONLY" + EditionEnum string `json:"editionEnum,omitempty"` + EnumType []*Proto2EnumDescriptorProto `json:"enumType,omitempty"` // MessageType: All top-level definitions in this file. @@ -2164,7 +2193,7 @@ type Proto2FileDescriptorProto struct { // value must be "editions". Syntax string `json:"syntax,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnumType") to + // ForceSendFields is a list of field names (e.g. "EditionEnum") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2172,10 +2201,10 @@ type Proto2FileDescriptorProto struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnumType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "EditionEnum") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` diff --git a/chromeuxreport/v1/chromeuxreport-gen.go b/chromeuxreport/v1/chromeuxreport-gen.go index 858d54dac29..7d2c6065880 100644 --- a/chromeuxreport/v1/chromeuxreport-gen.go +++ b/chromeuxreport/v1/chromeuxreport-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/web/tools/chrome-user-experience-report/api/reference // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // chromeuxreportService, err := chromeuxreport.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // chromeuxreportService, err := chromeuxreport.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // chromeuxreportService, err := chromeuxreport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package chromeuxreport // import "google.golang.org/api/chromeuxreport/v1" import ( diff --git a/civicinfo/v2/civicinfo-gen.go b/civicinfo/v2/civicinfo-gen.go index 1496e13aa90..b06a7047a2b 100644 --- a/civicinfo/v2/civicinfo-gen.go +++ b/civicinfo/v2/civicinfo-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/civic-information/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // civicinfoService, err := civicinfo.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // civicinfoService, err := civicinfo.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // civicinfoService, err := civicinfo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package civicinfo // import "google.golang.org/api/civicinfo/v2" import ( diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go index 12b594eae03..3e862d067b3 100644 --- a/classroom/v1/classroom-gen.go +++ b/classroom/v1/classroom-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/classroom/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // classroomService, err := classroom.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // classroomService, err := classroom.NewService(ctx, option.WithScopes(classroom.ClassroomTopicsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // classroomService, err := classroom.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // classroomService, err := classroom.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package classroom // import "google.golang.org/api/classroom/v1" import ( diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 5c7f7f7e56d..28b007570a5 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20230805", + "revision": "20230902", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -2552,7 +2552,7 @@ "type": "string" }, "scopes": { - "description": "The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[\"folders/123\"] has the following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes \"folders/123\" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", + "description": "The scopes of the AccessPolicy. Scopes define which resources a policy can restrict and where its resources can be referenced. For example, policy A with `scopes=[\"folders/123\"]` has the following behavior: - ServicePerimeter can only restrict projects within `folders/123`. - ServicePerimeter within policy A can only reference access levels defined within policy A. - Only one policy can include a given scope; thus, attempting to create a second policy which includes `folders/123` will result in an error. If no scopes are provided, then any resource within the organization can be restricted. Scopes cannot be modified after a policy is created. Policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", "items": { "type": "string" }, @@ -4032,6 +4032,13 @@ "description": "A map of related resources of this resource, keyed by the relationship type. A relationship type is in the format of {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`, `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. See [supported relationship types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types).", "type": "object" }, + "sccSecurityMarks": { + "additionalProperties": { + "type": "string" + }, + "description": "The actual content of Security Command Center security marks associated with the asset. Note that both staging \u0026 prod SecurityMarks are attached on prod resources. In CAS preprod/prod, both staging \u0026 prod SecurityMarks are ingested and returned in the following `security_marks` map. In that case, the prefix \"staging.\" will be added to the keys of all the staging marks. To search against SCC SecurityMarks field: * Use a field query: - query by a given key value pair. Example: `sccSecurityMarks.foo=bar` - query by a given key's existence. Example: `sccSecurityMarks.foo:*`", + "type": "object" + }, "state": { "description": "The state of this resource. Different resources types have different state definitions that are mapped from various fields of different resource types. This field is available only when the resource's Protobuf contains it. Example: If the resource is an instance provided by Compute Engine, its state will include PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition in [API Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). If the resource is a project provided by Resource Manager, its state will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and DELETE_IN_PROGRESS. See `lifecycleState` definition in [API Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). To search against the `state`: * Use a field query. Example: `state:RUNNING` * Use a free text query. Example: `RUNNING`", "type": "string" diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index 759bc07b108..2d177d6dbd8 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/asset-inventory/docs/quickstart // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudassetService, err := cloudasset.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudassetService, err := cloudasset.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudassetService, err := cloudasset.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudasset // import "google.golang.org/api/cloudasset/v1" import ( @@ -3144,19 +3157,18 @@ type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // `organizations/{organization_id}` Parent string `json:"parent,omitempty"` - // Scopes: The scopes of a policy define which resources an ACM policy - // can restrict, and where ACM resources can be referenced. For example, - // a policy with scopes=["folders/123"] has the following behavior: - - // vpcsc perimeters can only restrict projects within folders/123 - - // access levels can only be referenced by resources within folders/123. - // If empty, there are no limitations on which resources can be - // restricted by an ACM policy, and there are no limitations on where - // ACM resources can be referenced. Only one policy can include a given - // scope (attempting to create a second policy which includes - // "folders/123" will result in an error). Currently, scopes cannot be - // modified after a policy is created. Currently, policies can only have - // a single scope. Format: list of `folders/{folder_number}` or - // `projects/{project_number}` + // Scopes: The scopes of the AccessPolicy. Scopes define which resources + // a policy can restrict and where its resources can be referenced. For + // example, policy A with `scopes=["folders/123"]` has the following + // behavior: - ServicePerimeter can only restrict projects within + // `folders/123`. - ServicePerimeter within policy A can only reference + // access levels defined within policy A. - Only one policy can include + // a given scope; thus, attempting to create a second policy which + // includes `folders/123` will result in an error. If no scopes are + // provided, then any resource within the organization can be + // restricted. Scopes cannot be modified after a policy is created. + // Policies can only have a single scope. Format: list of + // `folders/{folder_number}` or `projects/{project_number}` Scopes []string `json:"scopes,omitempty"` // Title: Required. Human readable title. Does not affect behavior. @@ -5994,6 +6006,17 @@ type ResourceSearchResult struct { // (https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). Relationships map[string]RelatedResources `json:"relationships,omitempty"` + // SccSecurityMarks: The actual content of Security Command Center + // security marks associated with the asset. Note that both staging & + // prod SecurityMarks are attached on prod resources. In CAS + // preprod/prod, both staging & prod SecurityMarks are ingested and + // returned in the following `security_marks` map. In that case, the + // prefix "staging." will be added to the keys of all the staging marks. + // To search against SCC SecurityMarks field: * Use a field query: - + // query by a given key value pair. Example: `sccSecurityMarks.foo=bar` + // - query by a given key's existence. Example: `sccSecurityMarks.foo:*` + SccSecurityMarks map[string]string `json:"sccSecurityMarks,omitempty"` + // State: The state of this resource. Different resources types have // different state definitions that are mapped from various fields of // different resource types. This field is available only when the diff --git a/cloudasset/v1beta1/cloudasset-api.json b/cloudasset/v1beta1/cloudasset-api.json index 536affdff5b..cc4702fc98b 100644 --- a/cloudasset/v1beta1/cloudasset-api.json +++ b/cloudasset/v1beta1/cloudasset-api.json @@ -411,7 +411,7 @@ } } }, - "revision": "20230805", + "revision": "20230902", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -936,7 +936,7 @@ "type": "string" }, "scopes": { - "description": "The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[\"folders/123\"] has the following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes \"folders/123\" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", + "description": "The scopes of the AccessPolicy. Scopes define which resources a policy can restrict and where its resources can be referenced. For example, policy A with `scopes=[\"folders/123\"]` has the following behavior: - ServicePerimeter can only restrict projects within `folders/123`. - ServicePerimeter within policy A can only reference access levels defined within policy A. - Only one policy can include a given scope; thus, attempting to create a second policy which includes `folders/123` will result in an error. If no scopes are provided, then any resource within the organization can be restricted. Scopes cannot be modified after a policy is created. Policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", "items": { "type": "string" }, diff --git a/cloudasset/v1beta1/cloudasset-gen.go b/cloudasset/v1beta1/cloudasset-gen.go index ec6b6b56447..35aba0ba50e 100644 --- a/cloudasset/v1beta1/cloudasset-gen.go +++ b/cloudasset/v1beta1/cloudasset-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/asset-inventory/docs/quickstart // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudassetService, err := cloudasset.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudassetService, err := cloudasset.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudassetService, err := cloudasset.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudasset // import "google.golang.org/api/cloudasset/v1beta1" import ( @@ -1314,19 +1327,18 @@ type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // `organizations/{organization_id}` Parent string `json:"parent,omitempty"` - // Scopes: The scopes of a policy define which resources an ACM policy - // can restrict, and where ACM resources can be referenced. For example, - // a policy with scopes=["folders/123"] has the following behavior: - - // vpcsc perimeters can only restrict projects within folders/123 - - // access levels can only be referenced by resources within folders/123. - // If empty, there are no limitations on which resources can be - // restricted by an ACM policy, and there are no limitations on where - // ACM resources can be referenced. Only one policy can include a given - // scope (attempting to create a second policy which includes - // "folders/123" will result in an error). Currently, scopes cannot be - // modified after a policy is created. Currently, policies can only have - // a single scope. Format: list of `folders/{folder_number}` or - // `projects/{project_number}` + // Scopes: The scopes of the AccessPolicy. Scopes define which resources + // a policy can restrict and where its resources can be referenced. For + // example, policy A with `scopes=["folders/123"]` has the following + // behavior: - ServicePerimeter can only restrict projects within + // `folders/123`. - ServicePerimeter within policy A can only reference + // access levels defined within policy A. - Only one policy can include + // a given scope; thus, attempting to create a second policy which + // includes `folders/123` will result in an error. If no scopes are + // provided, then any resource within the organization can be + // restricted. Scopes cannot be modified after a policy is created. + // Policies can only have a single scope. Format: list of + // `folders/{folder_number}` or `projects/{project_number}` Scopes []string `json:"scopes,omitempty"` // Title: Required. Human readable title. Does not affect behavior. diff --git a/cloudasset/v1p1beta1/cloudasset-api.json b/cloudasset/v1p1beta1/cloudasset-api.json index 96cd221c40a..775c2bb02a2 100644 --- a/cloudasset/v1p1beta1/cloudasset-api.json +++ b/cloudasset/v1p1beta1/cloudasset-api.json @@ -207,7 +207,7 @@ } } }, - "revision": "20230805", + "revision": "20230902", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -638,7 +638,7 @@ "type": "string" }, "scopes": { - "description": "The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[\"folders/123\"] has the following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes \"folders/123\" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", + "description": "The scopes of the AccessPolicy. Scopes define which resources a policy can restrict and where its resources can be referenced. For example, policy A with `scopes=[\"folders/123\"]` has the following behavior: - ServicePerimeter can only restrict projects within `folders/123`. - ServicePerimeter within policy A can only reference access levels defined within policy A. - Only one policy can include a given scope; thus, attempting to create a second policy which includes `folders/123` will result in an error. If no scopes are provided, then any resource within the organization can be restricted. Scopes cannot be modified after a policy is created. Policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", "items": { "type": "string" }, diff --git a/cloudasset/v1p1beta1/cloudasset-gen.go b/cloudasset/v1p1beta1/cloudasset-gen.go index 847e9d40abc..077f5be0710 100644 --- a/cloudasset/v1p1beta1/cloudasset-gen.go +++ b/cloudasset/v1p1beta1/cloudasset-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/asset-inventory/docs/quickstart // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudassetService, err := cloudasset.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudassetService, err := cloudasset.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudassetService, err := cloudasset.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudasset // import "google.golang.org/api/cloudasset/v1p1beta1" import ( @@ -1096,19 +1109,18 @@ type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // `organizations/{organization_id}` Parent string `json:"parent,omitempty"` - // Scopes: The scopes of a policy define which resources an ACM policy - // can restrict, and where ACM resources can be referenced. For example, - // a policy with scopes=["folders/123"] has the following behavior: - - // vpcsc perimeters can only restrict projects within folders/123 - - // access levels can only be referenced by resources within folders/123. - // If empty, there are no limitations on which resources can be - // restricted by an ACM policy, and there are no limitations on where - // ACM resources can be referenced. Only one policy can include a given - // scope (attempting to create a second policy which includes - // "folders/123" will result in an error). Currently, scopes cannot be - // modified after a policy is created. Currently, policies can only have - // a single scope. Format: list of `folders/{folder_number}` or - // `projects/{project_number}` + // Scopes: The scopes of the AccessPolicy. Scopes define which resources + // a policy can restrict and where its resources can be referenced. For + // example, policy A with `scopes=["folders/123"]` has the following + // behavior: - ServicePerimeter can only restrict projects within + // `folders/123`. - ServicePerimeter within policy A can only reference + // access levels defined within policy A. - Only one policy can include + // a given scope; thus, attempting to create a second policy which + // includes `folders/123` will result in an error. If no scopes are + // provided, then any resource within the organization can be + // restricted. Scopes cannot be modified after a policy is created. + // Policies can only have a single scope. Format: list of + // `folders/{folder_number}` or `projects/{project_number}` Scopes []string `json:"scopes,omitempty"` // Title: Required. Human readable title. Does not affect behavior. diff --git a/cloudasset/v1p5beta1/cloudasset-api.json b/cloudasset/v1p5beta1/cloudasset-api.json index 37d13423613..6689337fe46 100644 --- a/cloudasset/v1p5beta1/cloudasset-api.json +++ b/cloudasset/v1p5beta1/cloudasset-api.json @@ -177,7 +177,7 @@ } } }, - "revision": "20230805", + "revision": "20230902", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -643,7 +643,7 @@ "type": "string" }, "scopes": { - "description": "The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[\"folders/123\"] has the following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes \"folders/123\" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", + "description": "The scopes of the AccessPolicy. Scopes define which resources a policy can restrict and where its resources can be referenced. For example, policy A with `scopes=[\"folders/123\"]` has the following behavior: - ServicePerimeter can only restrict projects within `folders/123`. - ServicePerimeter within policy A can only reference access levels defined within policy A. - Only one policy can include a given scope; thus, attempting to create a second policy which includes `folders/123` will result in an error. If no scopes are provided, then any resource within the organization can be restricted. Scopes cannot be modified after a policy is created. Policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", "items": { "type": "string" }, diff --git a/cloudasset/v1p5beta1/cloudasset-gen.go b/cloudasset/v1p5beta1/cloudasset-gen.go index 62ea9260a80..f9466497fdb 100644 --- a/cloudasset/v1p5beta1/cloudasset-gen.go +++ b/cloudasset/v1p5beta1/cloudasset-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/asset-inventory/docs/quickstart // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudassetService, err := cloudasset.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudassetService, err := cloudasset.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudassetService, err := cloudasset.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudasset // import "google.golang.org/api/cloudasset/v1p5beta1" import ( @@ -1137,19 +1150,18 @@ type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // `organizations/{organization_id}` Parent string `json:"parent,omitempty"` - // Scopes: The scopes of a policy define which resources an ACM policy - // can restrict, and where ACM resources can be referenced. For example, - // a policy with scopes=["folders/123"] has the following behavior: - - // vpcsc perimeters can only restrict projects within folders/123 - - // access levels can only be referenced by resources within folders/123. - // If empty, there are no limitations on which resources can be - // restricted by an ACM policy, and there are no limitations on where - // ACM resources can be referenced. Only one policy can include a given - // scope (attempting to create a second policy which includes - // "folders/123" will result in an error). Currently, scopes cannot be - // modified after a policy is created. Currently, policies can only have - // a single scope. Format: list of `folders/{folder_number}` or - // `projects/{project_number}` + // Scopes: The scopes of the AccessPolicy. Scopes define which resources + // a policy can restrict and where its resources can be referenced. For + // example, policy A with `scopes=["folders/123"]` has the following + // behavior: - ServicePerimeter can only restrict projects within + // `folders/123`. - ServicePerimeter within policy A can only reference + // access levels defined within policy A. - Only one policy can include + // a given scope; thus, attempting to create a second policy which + // includes `folders/123` will result in an error. If no scopes are + // provided, then any resource within the organization can be + // restricted. Scopes cannot be modified after a policy is created. + // Policies can only have a single scope. Format: list of + // `folders/{folder_number}` or `projects/{project_number}` Scopes []string `json:"scopes,omitempty"` // Title: Required. Human readable title. Does not affect behavior. diff --git a/cloudasset/v1p7beta1/cloudasset-api.json b/cloudasset/v1p7beta1/cloudasset-api.json index 3a790d7dd78..9633fe15a5e 100644 --- a/cloudasset/v1p7beta1/cloudasset-api.json +++ b/cloudasset/v1p7beta1/cloudasset-api.json @@ -167,7 +167,7 @@ } } }, - "revision": "20230805", + "revision": "20230902", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -712,7 +712,7 @@ "type": "string" }, "scopes": { - "description": "The scopes of a policy define which resources an ACM policy can restrict, and where ACM resources can be referenced. For example, a policy with scopes=[\"folders/123\"] has the following behavior: - vpcsc perimeters can only restrict projects within folders/123 - access levels can only be referenced by resources within folders/123. If empty, there are no limitations on which resources can be restricted by an ACM policy, and there are no limitations on where ACM resources can be referenced. Only one policy can include a given scope (attempting to create a second policy which includes \"folders/123\" will result in an error). Currently, scopes cannot be modified after a policy is created. Currently, policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", + "description": "The scopes of the AccessPolicy. Scopes define which resources a policy can restrict and where its resources can be referenced. For example, policy A with `scopes=[\"folders/123\"]` has the following behavior: - ServicePerimeter can only restrict projects within `folders/123`. - ServicePerimeter within policy A can only reference access levels defined within policy A. - Only one policy can include a given scope; thus, attempting to create a second policy which includes `folders/123` will result in an error. If no scopes are provided, then any resource within the organization can be restricted. Scopes cannot be modified after a policy is created. Policies can only have a single scope. Format: list of `folders/{folder_number}` or `projects/{project_number}`", "items": { "type": "string" }, diff --git a/cloudasset/v1p7beta1/cloudasset-gen.go b/cloudasset/v1p7beta1/cloudasset-gen.go index 674e800f148..1d25d322345 100644 --- a/cloudasset/v1p7beta1/cloudasset-gen.go +++ b/cloudasset/v1p7beta1/cloudasset-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/asset-inventory/docs/quickstart // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudassetService, err := cloudasset.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudassetService, err := cloudasset.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudassetService, err := cloudasset.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudasset // import "google.golang.org/api/cloudasset/v1p7beta1" import ( @@ -1348,19 +1361,18 @@ type GoogleIdentityAccesscontextmanagerV1AccessPolicy struct { // `organizations/{organization_id}` Parent string `json:"parent,omitempty"` - // Scopes: The scopes of a policy define which resources an ACM policy - // can restrict, and where ACM resources can be referenced. For example, - // a policy with scopes=["folders/123"] has the following behavior: - - // vpcsc perimeters can only restrict projects within folders/123 - - // access levels can only be referenced by resources within folders/123. - // If empty, there are no limitations on which resources can be - // restricted by an ACM policy, and there are no limitations on where - // ACM resources can be referenced. Only one policy can include a given - // scope (attempting to create a second policy which includes - // "folders/123" will result in an error). Currently, scopes cannot be - // modified after a policy is created. Currently, policies can only have - // a single scope. Format: list of `folders/{folder_number}` or - // `projects/{project_number}` + // Scopes: The scopes of the AccessPolicy. Scopes define which resources + // a policy can restrict and where its resources can be referenced. For + // example, policy A with `scopes=["folders/123"]` has the following + // behavior: - ServicePerimeter can only restrict projects within + // `folders/123`. - ServicePerimeter within policy A can only reference + // access levels defined within policy A. - Only one policy can include + // a given scope; thus, attempting to create a second policy which + // includes `folders/123` will result in an error. If no scopes are + // provided, then any resource within the organization can be + // restricted. Scopes cannot be modified after a policy is created. + // Policies can only have a single scope. Format: list of + // `folders/{folder_number}` or `projects/{project_number}` Scopes []string `json:"scopes,omitempty"` // Title: Required. Human readable title. Does not affect behavior. diff --git a/cloudbilling/v1/cloudbilling-gen.go b/cloudbilling/v1/cloudbilling-gen.go index 49dc5385ab9..92a85f8d31a 100644 --- a/cloudbilling/v1/cloudbilling-gen.go +++ b/cloudbilling/v1/cloudbilling-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/billing/docs/apis // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudbillingService, err := cloudbilling.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudbillingService, err := cloudbilling.NewService(ctx, option.WithScopes(cloudbilling.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudbillingService, err := cloudbilling.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudbillingService, err := cloudbilling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudbilling // import "google.golang.org/api/cloudbilling/v1" import ( diff --git a/cloudbilling/v1beta/cloudbilling-api.json b/cloudbilling/v1beta/cloudbilling-api.json index 9fc0271f178..21c8767fee8 100644 --- a/cloudbilling/v1beta/cloudbilling-api.json +++ b/cloudbilling/v1beta/cloudbilling-api.json @@ -664,7 +664,7 @@ } } }, - "revision": "20230811", + "revision": "20230901", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "CacheFillRegions": { @@ -1302,7 +1302,7 @@ "description": "Percentage of the fixed discount." }, "discountScopeType": { - "description": "Type of the fixed discount scope which indicates the source of the discount. It can have values such as 'sku-group'.", + "description": "Type of the fixed discount scope which indicates the source of the discount. It can have values such as 'unspecified' and 'sku-group'.", "type": "string" }, "fixTime": { @@ -1332,7 +1332,7 @@ "description": "Percentage of the floating discount." }, "discountScopeType": { - "description": "Type of the floating discount scope which indicates the source of the discount. It can have values such as 'sku-group'.", + "description": "Type of the floating discount scope which indicates the source of the discount. It can have values such as 'unspecified' and 'sku-group'.", "type": "string" }, "skuGroup": { @@ -1358,16 +1358,8 @@ "description": "Encapsulates a price migrated from other SKUs.", "id": "GoogleCloudBillingBillingaccountpricesV1betaMigratedPrice", "properties": { - "sourceDiscountOnTargetPrice": { - "$ref": "GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice", - "description": "The source SKU floating discount is applied on the target SKU's default price." - }, "sourceSku": { - "description": "Source SKU where the discount is migrated from.", - "type": "string" - }, - "type": { - "description": "Type of the migrated price. It can have values such as 'source-discount-on-target-price'.", + "description": "Source SKU where the discount is migrated from. Format: billingAccounts/{billing_account}/skus/{sku}", "type": "string" } }, @@ -1406,7 +1398,7 @@ "description": "Price migrated from other SKUs." }, "type": { - "description": "Type of the price reason. It can values such as 'default-price', 'fixed-price', 'fixed-discount', 'floating-discount', 'migrated-price', 'merged-price', 'list-price-as-ceiling'.", + "description": "Type of the price reason. It can have values such as 'unspecified', 'default-price', 'fixed-price', 'fixed-discount', 'floating-discount', 'migrated-price', 'merged-price', 'list-price-as-ceiling'.", "type": "string" } }, @@ -1457,17 +1449,6 @@ }, "type": "object" }, - "GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice": { - "description": "Encapsulates a type of MigratedPrice where the source SKU floating discount is applied on the target SKU's default price.", - "id": "GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice", - "properties": { - "migratedDiscountPercent": { - "$ref": "Decimal", - "description": "Discount percent of the source SKU that is applied on the target SKU's default price." - } - }, - "type": "object" - }, "GoogleCloudBillingBillingaccountpricesV1betaUnitInfo": { "description": "Encapsulates the unit information for a Rate", "id": "GoogleCloudBillingBillingaccountpricesV1betaUnitInfo", diff --git a/cloudbilling/v1beta/cloudbilling-gen.go b/cloudbilling/v1beta/cloudbilling-gen.go index bc91eb0408a..c54c6a1cfbe 100644 --- a/cloudbilling/v1beta/cloudbilling-gen.go +++ b/cloudbilling/v1beta/cloudbilling-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/billing/docs/apis // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudbillingService, err := cloudbilling.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudbillingService, err := cloudbilling.NewService(ctx, option.WithScopes(cloudbilling.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudbillingService, err := cloudbilling.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudbillingService, err := cloudbilling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudbilling // import "google.golang.org/api/cloudbilling/v1beta" import ( @@ -1350,7 +1364,8 @@ type GoogleCloudBillingBillingaccountpricesV1betaFixedDiscount struct { DiscountPercent *Decimal `json:"discountPercent,omitempty"` // DiscountScopeType: Type of the fixed discount scope which indicates - // the source of the discount. It can have values such as 'sku-group'. + // the source of the discount. It can have values such as 'unspecified' + // and 'sku-group'. DiscountScopeType string `json:"discountScopeType,omitempty"` // FixTime: Time that the fixed discount is anchored to. @@ -1398,7 +1413,7 @@ type GoogleCloudBillingBillingaccountpricesV1betaFloatingDiscount struct { // DiscountScopeType: Type of the floating discount scope which // indicates the source of the discount. It can have values such as - // 'sku-group'. + // 'unspecified' and 'sku-group'. DiscountScopeType string `json:"discountScopeType,omitempty"` // SkuGroup: SKU group where the floating discount comes from. @@ -1447,33 +1462,24 @@ type GoogleCloudBillingBillingaccountpricesV1betaMergedPrice struct { // GoogleCloudBillingBillingaccountpricesV1betaMigratedPrice: // Encapsulates a price migrated from other SKUs. type GoogleCloudBillingBillingaccountpricesV1betaMigratedPrice struct { - // SourceDiscountOnTargetPrice: The source SKU floating discount is - // applied on the target SKU's default price. - SourceDiscountOnTargetPrice *GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice `json:"sourceDiscountOnTargetPrice,omitempty"` - - // SourceSku: Source SKU where the discount is migrated from. + // SourceSku: Source SKU where the discount is migrated from. Format: + // billingAccounts/{billing_account}/skus/{sku} SourceSku string `json:"sourceSku,omitempty"` - // Type: Type of the migrated price. It can have values such as - // 'source-discount-on-target-price'. - Type string `json:"type,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SourceDiscountOnTargetPrice") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "SourceSku") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "SourceDiscountOnTargetPrice") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "SourceSku") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -1516,8 +1522,8 @@ type GoogleCloudBillingBillingaccountpricesV1betaPriceReason struct { // MigratedPrice: Price migrated from other SKUs. MigratedPrice *GoogleCloudBillingBillingaccountpricesV1betaMigratedPrice `json:"migratedPrice,omitempty"` - // Type: Type of the price reason. It can values such as - // 'default-price', 'fixed-price', 'fixed-discount', + // Type: Type of the price reason. It can have values such as + // 'unspecified', 'default-price', 'fixed-price', 'fixed-discount', // 'floating-discount', 'migrated-price', 'merged-price', // 'list-price-as-ceiling'. Type string `json:"type,omitempty"` @@ -1634,39 +1640,6 @@ func (s *GoogleCloudBillingBillingaccountpricesV1betaRateTier) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPric -// e: Encapsulates a type of MigratedPrice where the source SKU floating -// discount is applied on the target SKU's default price. -type GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice struct { - // MigratedDiscountPercent: Discount percent of the source SKU that is - // applied on the target SKU's default price. - MigratedDiscountPercent *Decimal `json:"migratedDiscountPercent,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "MigratedDiscountPercent") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "MigratedDiscountPercent") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBillingBillingaccountpricesV1betaSourceDiscountOnTargetPrice - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudBillingBillingaccountpricesV1betaUnitInfo: Encapsulates // the unit information for a Rate type GoogleCloudBillingBillingaccountpricesV1betaUnitInfo struct { diff --git a/cloudbuild/v1/cloudbuild-gen.go b/cloudbuild/v1/cloudbuild-gen.go index 159176f9e1c..80f1bb4145f 100644 --- a/cloudbuild/v1/cloudbuild-gen.go +++ b/cloudbuild/v1/cloudbuild-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/cloud-build/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudbuildService, err := cloudbuild.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudbuild // import "google.golang.org/api/cloudbuild/v1" import ( diff --git a/cloudbuild/v2/cloudbuild-api.json b/cloudbuild/v2/cloudbuild-api.json new file mode 100644 index 00000000000..d35d9048c3c --- /dev/null +++ b/cloudbuild/v2/cloudbuild-api.json @@ -0,0 +1,2633 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://cloudbuild.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Build", + "description": "Creates and manages builds on Google Cloud Platform.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/cloud-build/docs/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "cloudbuild:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://cloudbuild.mtls.googleapis.com/", + "name": "cloudbuild", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "connections": { + "methods": { + "create": { + "description": "Creates a Connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "connectionId": { + "description": "Required. The ID to use for the Connection, which will become the final component of the Connection's resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$\u0026'()*+,;=@.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Project and location where the connection will be created. Format: `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections", + "request": { + "$ref": "Connection" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + "httpMethod": "DELETE", + "id": "cloudbuild.projects.locations.connections.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "The current etag of the connection. If an etag is provided and does not match the current etag of the connection, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the Connection to delete. Format: `projects/*/locations/*/connections/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request, but do not actually post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "fetchLinkableRepositories": { + "description": "FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:fetchLinkableRepositories", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.fetchLinkableRepositories", + "parameterOrder": [ + "connection" + ], + "parameters": { + "connection": { + "description": "Required. The name of the Connection. Format: `projects/*/locations/*/connections/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Number of results to return in the list. Default to 20.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page start.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+connection}:fetchLinkableRepositories", + "response": { + "$ref": "FetchLinkableRepositoriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Connection to retrieve. Format: `projects/*/locations/*/connections/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Connection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:getIamPolicy", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Connections in a given project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Number of results to return in the list.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page start.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of Connections. Format: `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/connections", + "response": { + "$ref": "ListConnectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a single connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + "httpMethod": "PATCH", + "id": "cloudbuild.projects.locations.connections.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "If set to true, and the connection is not found a new connection will be created. In this situation `update_mask` is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties).", + "location": "query", + "type": "boolean" + }, + "etag": { + "description": "The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "Connection" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "processWebhook": { + "description": "ProcessWebhook is called by the external SCM for notifying of events.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections:processWebhook", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.processWebhook", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Project and location where the webhook will be received. Format: `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "webhookKey": { + "description": "Arbitrary additional key to find the maching repository for a webhook event if needed.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/connections:processWebhook", + "request": { + "$ref": "HttpBody" + }, + "response": { + "$ref": "Empty" + } + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:testIamPermissions", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "repositories": { + "methods": { + "accessReadToken": { + "description": "Fetches read token of a given repository.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:accessReadToken", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.repositories.accessReadToken", + "parameterOrder": [ + "repository" + ], + "parameters": { + "repository": { + "description": "Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+repository}:accessReadToken", + "request": { + "$ref": "FetchReadTokenRequest" + }, + "response": { + "$ref": "FetchReadTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "accessReadWriteToken": { + "description": "Fetches read/write token of a given repository.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:accessReadWriteToken", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.repositories.accessReadWriteToken", + "parameterOrder": [ + "repository" + ], + "parameters": { + "repository": { + "description": "Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+repository}:accessReadWriteToken", + "request": { + "$ref": "FetchReadWriteTokenRequest" + }, + "response": { + "$ref": "FetchReadWriteTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "batchCreate": { + "description": "Creates multiple repositories inside a connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories:batchCreate", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.repositories.batchCreate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The connection to contain all the repositories being created. Format: projects/*/locations/*/connections/* The parent field in the CreateRepositoryRequest messages must either be empty or match this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/repositories:batchCreate", + "request": { + "$ref": "BatchCreateRepositoriesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a Repository.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.connections.repositories.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + }, + "repositoryId": { + "description": "Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$\u0026'()*+,;=@.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/repositories", + "request": { + "$ref": "Repository" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single repository.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}", + "httpMethod": "DELETE", + "id": "cloudbuild.projects.locations.connections.repositories.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the Repository to delete. Format: `projects/*/locations/*/connections/*/repositories/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "If set, validate the request, but do not actually post it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "fetchGitRefs": { + "description": "Fetch the list of branches or tags for a given repository.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:fetchGitRefs", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.repositories.fetchGitRefs", + "parameterOrder": [ + "repository" + ], + "parameters": { + "pageSize": { + "description": "Optional. Number of results to return in the list. Default to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page start.", + "location": "query", + "type": "string" + }, + "refType": { + "description": "Type of refs to fetch", + "enum": [ + "REF_TYPE_UNSPECIFIED", + "TAG", + "BRANCH" + ], + "enumDescriptions": [ + "No type specified.", + "To fetch tags.", + "To fetch branches." + ], + "location": "query", + "type": "string" + }, + "repository": { + "description": "Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+repository}:fetchGitRefs", + "response": { + "$ref": "FetchGitRefsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single repository.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.repositories.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Repository to retrieve. Format: `projects/*/locations/*/connections/*/repositories/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Repository" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Repositories in a given connection.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.connections.repositories.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. `remote_uri:\"https://github.com*\"`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Number of results to return in the list.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page start.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of Repositories. Format: `projects/*/locations/*/connections/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/repositories", + "response": { + "$ref": "ListRepositoriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "cloudbuild.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "cloudbuild.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20230811", + "rootUrl": "https://cloudbuild.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "BatchCreateRepositoriesRequest": { + "description": "Message for creating repositoritories in batch.", + "id": "BatchCreateRepositoriesRequest", + "properties": { + "requests": { + "description": "Required. The request messages specifying the repositories to create.", + "items": { + "$ref": "CreateRepositoryRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchCreateRepositoriesResponse": { + "description": "Message for response of creating repositories in batch.", + "id": "BatchCreateRepositoriesResponse", + "properties": { + "repositories": { + "description": "Repository resources created.", + "items": { + "$ref": "Repository" + }, + "type": "array" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ChildStatusReference": { + "description": "ChildStatusReference is used to point to the statuses of individual TaskRuns and Runs within this PipelineRun.", + "id": "ChildStatusReference", + "properties": { + "name": { + "description": "Name is the name of the TaskRun or Run this is referencing.", + "type": "string" + }, + "pipelineTaskName": { + "description": "PipelineTaskName is the name of the PipelineTask this is referencing.", + "type": "string" + }, + "type": { + "description": "Output only. Type of the child reference.", + "enum": [ + "TYPE_UNSPECIFIED", + "TASK_RUN", + "CUSTOM_RUN" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "TaskRun.", + "CustomRun." + ], + "readOnly": true, + "type": "string" + }, + "whenExpressions": { + "description": "WhenExpressions is the list of checks guarding the execution of the PipelineTask", + "items": { + "$ref": "WhenExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "Connection": { + "description": "A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Server or GitLab.", + "id": "Connection", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Allows clients to store small amounts of arbitrary data.", + "type": "object" + }, + "createTime": { + "description": "Output only. Server assigned timestamp for when the connection was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disabled": { + "description": "If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled.", + "type": "boolean" + }, + "etag": { + "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "githubConfig": { + "$ref": "GitHubConfig", + "description": "Configuration for connections to github.com." + }, + "githubEnterpriseConfig": { + "$ref": "GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig", + "description": "Configuration for connections to an instance of GitHub Enterprise." + }, + "gitlabConfig": { + "$ref": "GoogleDevtoolsCloudbuildV2GitLabConfig", + "description": "Configuration for connections to gitlab.com or an instance of GitLab Enterprise." + }, + "installationState": { + "$ref": "InstallationState", + "description": "Output only. Installation state of the Connection.", + "readOnly": true + }, + "name": { + "description": "Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Set to true when the connection is being set up or updated in the background.", + "readOnly": true, + "type": "boolean" + }, + "updateTime": { + "description": "Output only. Server assigned timestamp for when the connection was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CreateRepositoryRequest": { + "description": "Message for creating a Repository.", + "id": "CreateRepositoryRequest", + "properties": { + "parent": { + "description": "Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there.", + "type": "string" + }, + "repository": { + "$ref": "Repository", + "description": "Required. The repository to create." + }, + "repositoryId": { + "description": "Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$\u0026'()*+,;=@.", + "type": "string" + } + }, + "type": "object" + }, + "EmbeddedTask": { + "description": "EmbeddedTask defines a Task that is embedded in a Pipeline.", + "id": "EmbeddedTask", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "User annotations. See https://google.aip.dev/128#annotations", + "type": "object" + }, + "taskSpec": { + "$ref": "TaskSpec", + "description": "Spec to instantiate this TaskRun." + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EmptyDirVolumeSource": { + "description": "Represents an empty Volume source.", + "id": "EmptyDirVolumeSource", + "properties": {}, + "type": "object" + }, + "EnvVar": { + "description": "Environment variable.", + "id": "EnvVar", + "properties": { + "name": { + "description": "Name of the environment variable.", + "type": "string" + }, + "value": { + "description": "Value of the environment variable.", + "type": "string" + } + }, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "FetchGitRefsResponse": { + "description": "Response for fetching git refs", + "id": "FetchGitRefsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "refNames": { + "description": "Name of the refs fetched.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "FetchLinkableRepositoriesResponse": { + "description": "Response message for FetchLinkableRepositories.", + "id": "FetchLinkableRepositoriesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "repositories": { + "description": "repositories ready to be created.", + "items": { + "$ref": "Repository" + }, + "type": "array" + } + }, + "type": "object" + }, + "FetchReadTokenRequest": { + "description": "Message for fetching SCM read token.", + "id": "FetchReadTokenRequest", + "properties": {}, + "type": "object" + }, + "FetchReadTokenResponse": { + "description": "Message for responding to get read token.", + "id": "FetchReadTokenResponse", + "properties": { + "expirationTime": { + "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", + "format": "google-datetime", + "type": "string" + }, + "token": { + "description": "The token content.", + "type": "string" + } + }, + "type": "object" + }, + "FetchReadWriteTokenRequest": { + "description": "Message for fetching SCM read/write token.", + "id": "FetchReadWriteTokenRequest", + "properties": {}, + "type": "object" + }, + "FetchReadWriteTokenResponse": { + "description": "Message for responding to get read/write token.", + "id": "FetchReadWriteTokenResponse", + "properties": { + "expirationTime": { + "description": "Expiration timestamp. Can be empty if unknown or non-expiring.", + "format": "google-datetime", + "type": "string" + }, + "token": { + "description": "The token content.", + "type": "string" + } + }, + "type": "object" + }, + "GitHubConfig": { + "description": "Configuration for connections to github.com.", + "id": "GitHubConfig", + "properties": { + "appInstallationId": { + "description": "GitHub App installation id.", + "format": "int64", + "type": "string" + }, + "authorizerCredential": { + "$ref": "OAuthCredential", + "description": "OAuth credential of the account that authorized the Cloud Build GitHub App. It is recommended to use a robot account instead of a human user account. The OAuth token must be tied to the Cloud Build GitHub App." + } + }, + "type": "object" + }, + "GoogleDevtoolsCloudbuildV2Condition": { + "description": "Conditions defines a readiness condition for a Knative resource.", + "id": "GoogleDevtoolsCloudbuildV2Condition", + "properties": { + "lastTransitionTime": { + "description": "LastTransitionTime is the last time the condition transitioned from one status to another.", + "format": "google-datetime", + "type": "string" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "severity": { + "description": "Severity with which to treat failures of this type of condition.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Severity is warning.", + "Severity is informational only." + ], + "type": "string" + }, + "status": { + "description": "Status of the condition.", + "enum": [ + "UNKNOWN", + "TRUE", + "FALSE" + ], + "enumDescriptions": [ + "Default enum type indicating execution is still ongoing.", + "Success", + "Failure" + ], + "type": "string" + }, + "type": { + "description": "Type of condition.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig": { + "description": "Configuration for connections to an instance of GitHub Enterprise.", + "id": "GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig", + "properties": { + "apiKey": { + "description": "Required. API Key used for authentication of webhook events.", + "type": "string" + }, + "appId": { + "description": "Id of the GitHub App created from the manifest.", + "format": "int64", + "type": "string" + }, + "appInstallationId": { + "description": "ID of the installation of the GitHub App.", + "format": "int64", + "type": "string" + }, + "appSlug": { + "description": "The URL-friendly name of the GitHub App.", + "type": "string" + }, + "hostUri": { + "description": "Required. The URI of the GitHub Enterprise host this connection is for.", + "type": "string" + }, + "privateKeySecretVersion": { + "description": "SecretManager resource containing the private key of the GitHub App, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "serverVersion": { + "description": "Output only. GitHub Enterprise version installed at the host_uri.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "$ref": "GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig", + "description": "Configuration for using Service Directory to privately connect to a GitHub Enterprise server. This should only be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitHub Enterprise server will be made over the public internet." + }, + "sslCa": { + "description": "SSL certificate to use for requests to GitHub Enterprise.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsCloudbuildV2GitLabConfig": { + "description": "Configuration for connections to gitlab.com or an instance of GitLab Enterprise.", + "id": "GoogleDevtoolsCloudbuildV2GitLabConfig", + "properties": { + "authorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A GitLab personal access token with the `api` scope access." + }, + "hostUri": { + "description": "The URI of the GitLab Enterprise host this connection is for. If not specified, the default value is https://gitlab.com.", + "type": "string" + }, + "readAuthorizerCredential": { + "$ref": "UserCredential", + "description": "Required. A GitLab personal access token with the minimum `read_api` scope access." + }, + "serverVersion": { + "description": "Output only. Version of the GitLab Enterprise server running on the `host_uri`.", + "readOnly": true, + "type": "string" + }, + "serviceDirectoryConfig": { + "$ref": "GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig", + "description": "Configuration for using Service Directory to privately connect to a GitLab Enterprise server. This should only be set if the GitLab Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, calls to the GitLab Enterprise server will be made over the public internet." + }, + "sslCa": { + "description": "SSL certificate to use for requests to GitLab Enterprise.", + "type": "string" + }, + "webhookSecretSecretVersion": { + "description": "Required. Immutable. SecretManager resource containing the webhook secret of a GitLab Enterprise project, formatted as `projects/*/secrets/*/versions/*`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsCloudbuildV2OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleDevtoolsCloudbuildV2OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig": { + "description": "ServiceDirectoryConfig represents Service Directory configuration for a connection.", + "id": "GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig", + "properties": { + "service": { + "description": "Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.", + "type": "string" + } + }, + "type": "object" + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "HttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstallationState": { + "description": "Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.", + "id": "InstallationState", + "properties": { + "actionUri": { + "description": "Output only. Link to follow for next action. Empty string if the installation is already complete.", + "readOnly": true, + "type": "string" + }, + "message": { + "description": "Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete.", + "readOnly": true, + "type": "string" + }, + "stage": { + "description": "Output only. Current step of the installation process.", + "enum": [ + "STAGE_UNSPECIFIED", + "PENDING_CREATE_APP", + "PENDING_USER_OAUTH", + "PENDING_INSTALL_APP", + "COMPLETE" + ], + "enumDescriptions": [ + "No stage specified.", + "Only for GitHub Enterprise. An App creation has been requested. The user needs to confirm the creation in their GitHub enterprise host.", + "User needs to authorize the GitHub (or Enterprise) App via OAuth.", + "User needs to follow the link to install the GitHub (or Enterprise) App.", + "Installation process has been completed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListConnectionsResponse": { + "description": "Message for response to listing Connections.", + "id": "ListConnectionsResponse", + "properties": { + "connections": { + "description": "The list of Connections.", + "items": { + "$ref": "Connection" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListRepositoriesResponse": { + "description": "Message for response to listing Repositories.", + "id": "ListRepositoriesResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "repositories": { + "description": "The list of Repositories.", + "items": { + "$ref": "Repository" + }, + "type": "array" + } + }, + "type": "object" + }, + "OAuthCredential": { + "description": "Represents an OAuth token of the account that authorized the Connection, and associated metadata.", + "id": "OAuthCredential", + "properties": { + "oauthTokenSecretVersion": { + "description": "A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated to this token.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "cancelRequested": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "statusDetail": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Param": { + "description": "Param defined with name and value. PipelineRef can be used to refer to a specific instance of a Pipeline.", + "id": "Param", + "properties": { + "name": { + "description": "Name of the parameter.", + "type": "string" + }, + "value": { + "$ref": "ParamValue", + "description": "Value of the parameter." + } + }, + "type": "object" + }, + "ParamSpec": { + "description": "ParamSpec defines parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun.", + "id": "ParamSpec", + "properties": { + "default": { + "$ref": "ParamValue", + "description": "The default value a parameter takes if no input value is supplied" + }, + "description": { + "description": "Description of the ParamSpec", + "type": "string" + }, + "name": { + "description": "Name of the ParamSpec", + "type": "string" + }, + "type": { + "description": "Type of ParamSpec", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "ARRAY" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Default", + "Arrary type." + ], + "type": "string" + } + }, + "type": "object" + }, + "ParamValue": { + "description": "Parameter value.", + "id": "ParamValue", + "properties": { + "arrayVal": { + "description": "Value of the parameter if type is array.", + "items": { + "type": "string" + }, + "type": "array" + }, + "stringVal": { + "description": "Value of the parameter if type is string.", + "type": "string" + }, + "type": { + "description": "Type of parameter.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "ARRAY" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Default", + "Array type" + ], + "type": "string" + } + }, + "type": "object" + }, + "PipelineRef": { + "description": "PipelineRef can be used to refer to a specific instance of a Pipeline.", + "id": "PipelineRef", + "properties": { + "name": { + "deprecated": true, + "description": "Name of the Pipeline.", + "type": "string" + }, + "params": { + "description": "Params contains the parameters used to identify the referenced Tekton resource. Example entries might include \"repo\" or \"path\" but the set of params ultimately depends on the chosen resolver.", + "items": { + "$ref": "Param" + }, + "type": "array" + }, + "resolver": { + "description": "Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource.", + "enum": [ + "RESOLVER_NAME_UNSPECIFIED", + "BUNDLES", + "GCB_REPO", + "GIT" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Bundles resolver. https://tekton.dev/docs/pipelines/bundle-resolver/", + "GCB repo resolver.", + "Simple Git resolver. https://tekton.dev/docs/pipelines/git-resolver/" + ], + "type": "string" + } + }, + "type": "object" + }, + "PipelineRun": { + "description": "Message describing PipelineRun object", + "id": "PipelineRun", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "User annotations. See https://google.aip.dev/128#annotations", + "type": "object" + }, + "childReferences": { + "description": "Output only. List of TaskRun and Run names and PipelineTask names for children of this PipelineRun.", + "items": { + "$ref": "ChildStatusReference" + }, + "readOnly": true, + "type": "array" + }, + "completionTime": { + "description": "Output only. Time the pipeline completed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "conditions": { + "description": "Output only. Kubernetes Conditions convention for PipelineRun status and error.", + "items": { + "$ref": "GoogleDevtoolsCloudbuildV2Condition" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Time at which the request to create the `PipelineRun` was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "Needed for declarative-friendly resources.", + "type": "string" + }, + "name": { + "description": "Output only. The `PipelineRun` name with format `projects/{project}/locations/{location}/pipelineRuns/{pipeline_run}`", + "readOnly": true, + "type": "string" + }, + "params": { + "description": "Params is a list of parameter names and values.", + "items": { + "$ref": "Param" + }, + "type": "array" + }, + "pipelineRef": { + "$ref": "PipelineRef", + "description": "PipelineRef refer to a specific instance of a Pipeline." + }, + "pipelineRunStatus": { + "description": "Status of the PipelineRun.", + "enum": [ + "PIPELINE_RUN_STATUS_UNSPECIFIED", + "PIPELINE_RUN_CANCELLED" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Cancelled status." + ], + "type": "string" + }, + "pipelineSpec": { + "$ref": "PipelineSpec", + "description": "PipelineSpec defines the desired state of Pipeline." + }, + "resolvedPipelineSpec": { + "$ref": "PipelineSpec", + "description": "Output only. The exact PipelineSpec used to instantiate the run.", + "readOnly": true + }, + "serviceAccount": { + "description": "Service account used in the Pipeline.", + "type": "string" + }, + "skippedTasks": { + "description": "Output only. List of tasks that were skipped due to when expressions evaluating to false.", + "items": { + "$ref": "SkippedTask" + }, + "readOnly": true, + "type": "array" + }, + "startTime": { + "description": "Output only. Time the pipeline is actually started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeouts": { + "$ref": "TimeoutFields", + "description": "Time after which the Pipeline times out. Currently three keys are accepted in the map pipeline, tasks and finally with Timeouts.pipeline \u003e= Timeouts.tasks + Timeouts.finally" + }, + "uid": { + "description": "Output only. A unique identifier for the `PipelineRun`.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time at which the request to update the `PipelineRun` was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "workerPool": { + "description": "Output only. The WorkerPool used to run this PipelineRun.", + "readOnly": true, + "type": "string" + }, + "workflow": { + "description": "Output only. The Workflow used to create this PipelineRun.", + "readOnly": true, + "type": "string" + }, + "workspaces": { + "description": "Workspaces is a list of WorkspaceBindings from volumes to workspaces.", + "items": { + "$ref": "WorkspaceBinding" + }, + "type": "array" + } + }, + "type": "object" + }, + "PipelineSpec": { + "description": "PipelineSpec defines the desired state of Pipeline.", + "id": "PipelineSpec", + "properties": { + "finallyTasks": { + "description": "List of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline.", + "items": { + "$ref": "PipelineTask" + }, + "type": "array" + }, + "params": { + "description": "List of parameters.", + "items": { + "$ref": "ParamSpec" + }, + "type": "array" + }, + "tasks": { + "description": "List of Tasks that execute when this Pipeline is run.", + "items": { + "$ref": "PipelineTask" + }, + "type": "array" + }, + "workspaces": { + "description": "Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun.", + "items": { + "$ref": "PipelineWorkspaceDeclaration" + }, + "type": "array" + } + }, + "type": "object" + }, + "PipelineTask": { + "description": "PipelineTask defines a task in a Pipeline.", + "id": "PipelineTask", + "properties": { + "name": { + "description": "Name of the task.", + "type": "string" + }, + "params": { + "description": "Params is a list of parameter names and values.", + "items": { + "$ref": "Param" + }, + "type": "array" + }, + "retries": { + "description": "Retries represents how many times this task should be retried in case of task failure.", + "format": "int32", + "type": "integer" + }, + "runAfter": { + "description": "RunAfter is the list of PipelineTask names that should be executed before this Task executes. (Used to force a specific ordering in graph execution.)", + "items": { + "type": "string" + }, + "type": "array" + }, + "taskRef": { + "$ref": "TaskRef", + "description": "Reference to a specific instance of a task." + }, + "taskSpec": { + "$ref": "EmbeddedTask", + "description": "Spec to instantiate this TaskRun." + }, + "timeout": { + "description": "Time after which the TaskRun times out. Defaults to 1 hour. Specified TaskRun timeout should be less than 24h.", + "format": "google-duration", + "type": "string" + }, + "whenExpressions": { + "description": "Conditions that need to be true for the task to run.", + "items": { + "$ref": "WhenExpression" + }, + "type": "array" + }, + "workspaces": { + "description": "Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task.", + "items": { + "$ref": "WorkspacePipelineTaskBinding" + }, + "type": "array" + } + }, + "type": "object" + }, + "PipelineWorkspaceDeclaration": { + "description": "Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun.", + "id": "PipelineWorkspaceDeclaration", + "properties": { + "description": { + "description": "Description is a human readable string describing how the workspace will be used in the Pipeline.", + "type": "string" + }, + "name": { + "description": "Name is the name of a workspace to be provided by a PipelineRun.", + "type": "string" + }, + "optional": { + "description": "Optional marks a Workspace as not being required in PipelineRuns. By default this field is false and so declared workspaces are required.", + "type": "boolean" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PropertySpec": { + "description": "PropertySpec holds information about a property in an object.", + "id": "PropertySpec", + "properties": { + "type": { + "description": "A type for the object.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Default" + ], + "type": "string" + } + }, + "type": "object" + }, + "Repository": { + "description": "A repository associated to a parent connection.", + "id": "Repository", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Allows clients to store small amounts of arbitrary data.", + "type": "object" + }, + "createTime": { + "description": "Output only. Server assigned timestamp for when the connection was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "etag": { + "description": "This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", + "type": "string" + }, + "name": { + "description": "Immutable. Resource name of the repository, in the format `projects/*/locations/*/connections/*/repositories/*`.", + "type": "string" + }, + "remoteUri": { + "description": "Required. Git Clone HTTPS URI.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Server assigned timestamp for when the connection was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "webhookId": { + "description": "Output only. External ID of the webhook created for the repository.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RunWorkflowCustomOperationMetadata": { + "description": "Represents the custom metadata of the RunWorkflow long-running operation.", + "id": "RunWorkflowCustomOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "pipelineRunId": { + "description": "Output only. ID of the pipeline run created by RunWorkflow.", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SecretVolumeSource": { + "description": "Secret Volume Source.", + "id": "SecretVolumeSource", + "properties": { + "secretName": { + "description": "Name of the secret referenced by the WorkspaceBinding.", + "type": "string" + }, + "secretVersion": { + "description": "Output only. Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SecurityContext": { + "description": "Security options the container should be run with.", + "id": "SecurityContext", + "properties": { + "privileged": { + "description": "Run container in privileged mode.", + "type": "boolean" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Sidecar": { + "description": "Sidecars run alongside the Task's step containers.", + "id": "Sidecar", + "properties": { + "args": { + "description": "Arguments to the entrypoint.", + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "description": "Entrypoint array.", + "items": { + "type": "string" + }, + "type": "array" + }, + "env": { + "description": "List of environment variables to set in the container.", + "items": { + "$ref": "EnvVar" + }, + "type": "array" + }, + "image": { + "description": "Docker image name.", + "type": "string" + }, + "name": { + "description": "Name of the Sidecar.", + "type": "string" + }, + "script": { + "description": "The contents of an executable file to execute.", + "type": "string" + }, + "securityContext": { + "$ref": "SecurityContext", + "description": "Security options the container should be run with." + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem.", + "items": { + "$ref": "VolumeMount" + }, + "type": "array" + }, + "workingDir": { + "description": "Container's working directory.", + "type": "string" + } + }, + "type": "object" + }, + "SkippedTask": { + "description": "SkippedTask is used to describe the Tasks that were skipped due to their When Expressions evaluating to False.", + "id": "SkippedTask", + "properties": { + "name": { + "description": "Name is the Pipeline Task name", + "type": "string" + }, + "reason": { + "description": "Output only. Reason is the cause of the PipelineTask being skipped.", + "readOnly": true, + "type": "string" + }, + "whenExpressions": { + "description": "WhenExpressions is the list of checks guarding the execution of the PipelineTask", + "items": { + "$ref": "WhenExpression" + }, + "type": "array" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "Step": { + "description": "Step embeds the Container type, which allows it to include fields not provided by Container.", + "id": "Step", + "properties": { + "args": { + "description": "Arguments to the entrypoint.", + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "description": "Entrypoint array.", + "items": { + "type": "string" + }, + "type": "array" + }, + "env": { + "description": "List of environment variables to set in the container.", + "items": { + "$ref": "EnvVar" + }, + "type": "array" + }, + "image": { + "description": "Docker image name.", + "type": "string" + }, + "name": { + "description": "Name of the container specified as a DNS_LABEL.", + "type": "string" + }, + "script": { + "description": "The contents of an executable file to execute.", + "type": "string" + }, + "timeout": { + "description": "Time after which the Step times out. Defaults to never.", + "format": "google-duration", + "type": "string" + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem.", + "items": { + "$ref": "VolumeMount" + }, + "type": "array" + }, + "workingDir": { + "description": "Container's working directory.", + "type": "string" + } + }, + "type": "object" + }, + "TaskRef": { + "description": "TaskRef can be used to refer to a specific instance of a task. PipelineRef can be used to refer to a specific instance of a Pipeline.", + "id": "TaskRef", + "properties": { + "customTask": { + "description": "Optional. The CustomTask definition to use.", + "enum": [ + "CUSTOM_TASK_UNSPECIFIED", + "DOCKER" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Sets up a Docker Daemon." + ], + "type": "string" + }, + "name": { + "deprecated": true, + "description": "Name of the task.", + "type": "string" + }, + "params": { + "description": "Params contains the parameters used to identify the referenced Tekton resource. Example entries might include \"repo\" or \"path\" but the set of params ultimately depends on the chosen resolver.", + "items": { + "$ref": "Param" + }, + "type": "array" + }, + "resolver": { + "description": "Resolver is the name of the resolver that should perform resolution of the referenced Tekton resource.", + "enum": [ + "RESOLVER_NAME_UNSPECIFIED", + "BUNDLES", + "GCB_REPO", + "GIT" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Bundles resolver. https://tekton.dev/docs/pipelines/bundle-resolver/", + "GCB repo resolver.", + "Simple Git resolver. https://tekton.dev/docs/pipelines/git-resolver/" + ], + "type": "string" + } + }, + "type": "object" + }, + "TaskResult": { + "description": "TaskResult is used to describe the results of a task.", + "id": "TaskResult", + "properties": { + "description": { + "description": "Description of the result.", + "type": "string" + }, + "name": { + "description": "Name of the result.", + "type": "string" + }, + "properties": { + "additionalProperties": { + "$ref": "PropertySpec" + }, + "description": "When type is OBJECT, this map holds the names of fields inside that object along with the type of data each field holds.", + "type": "object" + }, + "type": { + "description": "The type of data that the result holds.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "ARRAY", + "OBJECT" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Default", + "Array type", + "Object type" + ], + "type": "string" + } + }, + "type": "object" + }, + "TaskSpec": { + "description": "TaskSpec contains the Spec to instantiate a TaskRun.", + "id": "TaskSpec", + "properties": { + "description": { + "description": "Description of the task.", + "type": "string" + }, + "managedSidecars": { + "description": "Sidecars that run alongside the Task’s step containers that should be added to this Task.", + "items": { + "enum": [ + "MANAGED_SIDECAR_UNSPECIFIED", + "PRIVILEGED_DOCKER_DAEMON" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Sidecar for a privileged docker daemon." + ], + "type": "string" + }, + "type": "array" + }, + "params": { + "description": "List of parameters.", + "items": { + "$ref": "ParamSpec" + }, + "type": "array" + }, + "results": { + "description": "Values that this Task can output.", + "items": { + "$ref": "TaskResult" + }, + "type": "array" + }, + "sidecars": { + "description": "Sidecars that run alongside the Task's step containers.", + "items": { + "$ref": "Sidecar" + }, + "type": "array" + }, + "steps": { + "description": "Steps of the task.", + "items": { + "$ref": "Step" + }, + "type": "array" + }, + "volumes": { + "description": "A collection of volumes that are available to mount into steps.", + "items": { + "$ref": "VolumeSource" + }, + "type": "array" + }, + "workspaces": { + "description": "The volumes that this Task requires.", + "items": { + "$ref": "WorkspaceDeclaration" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TimeoutFields": { + "description": "TimeoutFields allows granular specification of pipeline, task, and finally timeouts", + "id": "TimeoutFields", + "properties": { + "finally": { + "description": "Finally sets the maximum allowed duration of this pipeline's finally", + "format": "google-duration", + "type": "string" + }, + "pipeline": { + "description": "Pipeline sets the maximum allowed duration for execution of the entire pipeline. The sum of individual timeouts for tasks and finally must not exceed this value.", + "format": "google-duration", + "type": "string" + }, + "tasks": { + "description": "Tasks sets the maximum allowed duration of this pipeline's tasks", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "UserCredential": { + "description": "Represents a personal access token that authorized the Connection, and associated metadata.", + "id": "UserCredential", + "properties": { + "userTokenSecretVersion": { + "description": "Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.", + "type": "string" + }, + "username": { + "description": "Output only. The username associated to this token.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "VolumeClaim": { + "description": "VolumeClaim is a user's request for a volume.", + "id": "VolumeClaim", + "properties": { + "storage": { + "description": "Volume size, e.g. 1gb.", + "type": "string" + } + }, + "type": "object" + }, + "VolumeMount": { + "description": "Pod volumes to mount into the container's filesystem.", + "id": "VolumeMount", + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "type": "string" + }, + "name": { + "description": "Name of the volume.", + "type": "string" + }, + "readOnly": { + "description": "Mounted read-only if true, read-write otherwise (false or unspecified).", + "type": "boolean" + }, + "subPath": { + "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "type": "string" + }, + "subPathExpr": { + "description": "Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root).", + "type": "string" + } + }, + "type": "object" + }, + "VolumeSource": { + "description": "Volumes available to mount.", + "id": "VolumeSource", + "properties": { + "emptyDir": { + "$ref": "EmptyDirVolumeSource", + "description": "A temporary directory that shares a pod's lifetime." + }, + "name": { + "description": "Name of the Volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + } + }, + "type": "object" + }, + "WhenExpression": { + "description": "Conditions that need to be true for the task to run.", + "id": "WhenExpression", + "properties": { + "expressionOperator": { + "description": "Operator that represents an Input's relationship to the values", + "enum": [ + "EXPRESSION_OPERATOR_UNSPECIFIED", + "DOES_NOT_EXIST", + "EQUALS", + "DOUBLE_EQUALS", + "IN", + "NOT_EQUALS", + "NOT_IN", + "EXISTS", + "GREATER_THAN", + "LESS_THAN" + ], + "enumDescriptions": [ + "Default enum type; should not be used.", + "Input does not exist.", + "Input equals values.", + "Input double equals values.", + "Input is in values.", + "Input does not equal values.", + "Input is not in values.", + "Input exists.", + "Input is greater than values.", + "Input is less than values." + ], + "type": "string" + }, + "input": { + "description": "Input is the string for guard checking which can be a static input or an output from a parent Task.", + "type": "string" + }, + "values": { + "description": "Values is an array of strings, which is compared against the input, for guard checking.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "WorkspaceBinding": { + "description": "WorkspaceBinding maps a workspace to a Volume. PipelineRef can be used to refer to a specific instance of a Pipeline.", + "id": "WorkspaceBinding", + "properties": { + "name": { + "description": "Name of the workspace.", + "type": "string" + }, + "secret": { + "$ref": "SecretVolumeSource", + "description": "Secret Volume Source." + }, + "volumeClaim": { + "$ref": "VolumeClaim", + "description": "Volume claim that will be created in the same namespace." + } + }, + "type": "object" + }, + "WorkspaceDeclaration": { + "description": "WorkspaceDeclaration is a declaration of a volume that a Task requires.", + "id": "WorkspaceDeclaration", + "properties": { + "description": { + "description": "Description is a human readable description of this volume.", + "type": "string" + }, + "mountPath": { + "description": "MountPath overrides the directory that the volume will be made available at.", + "type": "string" + }, + "name": { + "description": "Name is the name by which you can bind the volume at runtime.", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly dictates whether a mounted volume is writable.", + "type": "boolean" + } + }, + "type": "object" + }, + "WorkspacePipelineTaskBinding": { + "description": "WorkspacePipelineTaskBinding maps workspaces from the PipelineSpec to the workspaces declared in the Task.", + "id": "WorkspacePipelineTaskBinding", + "properties": { + "name": { + "description": "Name of the workspace as declared by the task.", + "type": "string" + }, + "workspace": { + "description": "Name of the workspace declared by the pipeline.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Build API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/cloudbuild/v2/cloudbuild-gen.go b/cloudbuild/v2/cloudbuild-gen.go new file mode 100644 index 00000000000..04845ff7a22 --- /dev/null +++ b/cloudbuild/v2/cloudbuild-gen.go @@ -0,0 +1,6318 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package cloudbuild provides access to the Cloud Build API. +// +// For product documentation, see: https://cloud.google.com/cloud-build/docs/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/cloudbuild/v2" +// ... +// ctx := context.Background() +// cloudbuildService, err := cloudbuild.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package cloudbuild // import "google.golang.org/api/cloudbuild/v2" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "cloudbuild:v2" +const apiName = "cloudbuild" +const apiVersion = "v2" +const basePath = "https://cloudbuild.googleapis.com/" +const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Connections = NewProjectsLocationsConnectionsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Connections *ProjectsLocationsConnectionsService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService { + rs := &ProjectsLocationsConnectionsService{s: s} + rs.Repositories = NewProjectsLocationsConnectionsRepositoriesService(s) + return rs +} + +type ProjectsLocationsConnectionsService struct { + s *Service + + Repositories *ProjectsLocationsConnectionsRepositoriesService +} + +func NewProjectsLocationsConnectionsRepositoriesService(s *Service) *ProjectsLocationsConnectionsRepositoriesService { + rs := &ProjectsLocationsConnectionsRepositoriesService{s: s} + return rs +} + +type ProjectsLocationsConnectionsRepositoriesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateRepositoriesRequest: Message for creating repositoritories +// in batch. +type BatchCreateRepositoriesRequest struct { + // Requests: Required. The request messages specifying the repositories + // to create. + Requests []*CreateRepositoryRequest `json:"requests,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateRepositoriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateRepositoriesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchCreateRepositoriesResponse: Message for response of creating +// repositories in batch. +type BatchCreateRepositoriesResponse struct { + // Repositories: Repository resources created. + Repositories []*Repository `json:"repositories,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Repositories") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Repositories") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchCreateRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchCreateRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// ChildStatusReference: ChildStatusReference is used to point to the +// statuses of individual TaskRuns and Runs within this PipelineRun. +type ChildStatusReference struct { + // Name: Name is the name of the TaskRun or Run this is referencing. + Name string `json:"name,omitempty"` + + // PipelineTaskName: PipelineTaskName is the name of the PipelineTask + // this is referencing. + PipelineTaskName string `json:"pipelineTaskName,omitempty"` + + // Type: Output only. Type of the child reference. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default enum type; should not be used. + // "TASK_RUN" - TaskRun. + // "CUSTOM_RUN" - CustomRun. + Type string `json:"type,omitempty"` + + // WhenExpressions: WhenExpressions is the list of checks guarding the + // execution of the PipelineTask + WhenExpressions []*WhenExpression `json:"whenExpressions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ChildStatusReference) MarshalJSON() ([]byte, error) { + type NoMethod ChildStatusReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Connection: A connection to a SCM like GitHub, GitHub Enterprise, +// Bitbucket Server or GitLab. +type Connection struct { + // Annotations: Allows clients to store small amounts of arbitrary data. + Annotations map[string]string `json:"annotations,omitempty"` + + // CreateTime: Output only. Server assigned timestamp for when the + // connection was created. + CreateTime string `json:"createTime,omitempty"` + + // Disabled: If disabled is set to true, functionality is disabled for + // this connection. Repository based API methods and webhooks processing + // for repositories in this connection will be disabled. + Disabled bool `json:"disabled,omitempty"` + + // Etag: This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // GithubConfig: Configuration for connections to github.com. + GithubConfig *GitHubConfig `json:"githubConfig,omitempty"` + + // GithubEnterpriseConfig: Configuration for connections to an instance + // of GitHub Enterprise. + GithubEnterpriseConfig *GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig `json:"githubEnterpriseConfig,omitempty"` + + // GitlabConfig: Configuration for connections to gitlab.com or an + // instance of GitLab Enterprise. + GitlabConfig *GoogleDevtoolsCloudbuildV2GitLabConfig `json:"gitlabConfig,omitempty"` + + // InstallationState: Output only. Installation state of the Connection. + InstallationState *InstallationState `json:"installationState,omitempty"` + + // Name: Immutable. The resource name of the connection, in the format + // `projects/{project}/locations/{location}/connections/{connection_id}`. + Name string `json:"name,omitempty"` + + // Reconciling: Output only. Set to true when the connection is being + // set up or updated in the background. + Reconciling bool `json:"reconciling,omitempty"` + + // UpdateTime: Output only. Server assigned timestamp for when the + // connection was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Connection) MarshalJSON() ([]byte, error) { + type NoMethod Connection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateRepositoryRequest: Message for creating a Repository. +type CreateRepositoryRequest struct { + // Parent: Required. The connection to contain the repository. If the + // request is part of a BatchCreateRepositoriesRequest, this field + // should be empty or match the parent specified there. + Parent string `json:"parent,omitempty"` + + // Repository: Required. The repository to create. + Repository *Repository `json:"repository,omitempty"` + + // RepositoryId: Required. The ID to use for the repository, which will + // become the final component of the repository's resource name. This ID + // should be unique in the connection. Allows alphanumeric characters + // and any of -._~%!$&'()*+,;=@. + RepositoryId string `json:"repositoryId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Parent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateRepositoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateRepositoryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EmbeddedTask: EmbeddedTask defines a Task that is embedded in a +// Pipeline. +type EmbeddedTask struct { + // Annotations: User annotations. See + // https://google.aip.dev/128#annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // TaskSpec: Spec to instantiate this TaskRun. + TaskSpec *TaskSpec `json:"taskSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EmbeddedTask) MarshalJSON() ([]byte, error) { + type NoMethod EmbeddedTask + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EmptyDirVolumeSource: Represents an empty Volume source. +type EmptyDirVolumeSource struct { +} + +// EnvVar: Environment variable. +type EnvVar struct { + // Name: Name of the environment variable. + Name string `json:"name,omitempty"` + + // Value: Value of the environment variable. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EnvVar) MarshalJSON() ([]byte, error) { + type NoMethod EnvVar + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FetchGitRefsResponse: Response for fetching git refs +type FetchGitRefsResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // RefNames: Name of the refs fetched. + RefNames []string `json:"refNames,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FetchGitRefsResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchGitRefsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FetchLinkableRepositoriesResponse: Response message for +// FetchLinkableRepositories. +type FetchLinkableRepositoriesResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Repositories: repositories ready to be created. + Repositories []*Repository `json:"repositories,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FetchLinkableRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchLinkableRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FetchReadTokenRequest: Message for fetching SCM read token. +type FetchReadTokenRequest struct { +} + +// FetchReadTokenResponse: Message for responding to get read token. +type FetchReadTokenResponse struct { + // ExpirationTime: Expiration timestamp. Can be empty if unknown or + // non-expiring. + ExpirationTime string `json:"expirationTime,omitempty"` + + // Token: The token content. + Token string `json:"token,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExpirationTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpirationTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FetchReadTokenResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchReadTokenResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// FetchReadWriteTokenRequest: Message for fetching SCM read/write +// token. +type FetchReadWriteTokenRequest struct { +} + +// FetchReadWriteTokenResponse: Message for responding to get read/write +// token. +type FetchReadWriteTokenResponse struct { + // ExpirationTime: Expiration timestamp. Can be empty if unknown or + // non-expiring. + ExpirationTime string `json:"expirationTime,omitempty"` + + // Token: The token content. + Token string `json:"token,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExpirationTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpirationTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *FetchReadWriteTokenResponse) MarshalJSON() ([]byte, error) { + type NoMethod FetchReadWriteTokenResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GitHubConfig: Configuration for connections to github.com. +type GitHubConfig struct { + // AppInstallationId: GitHub App installation id. + AppInstallationId int64 `json:"appInstallationId,omitempty,string"` + + // AuthorizerCredential: OAuth credential of the account that authorized + // the Cloud Build GitHub App. It is recommended to use a robot account + // instead of a human user account. The OAuth token must be tied to the + // Cloud Build GitHub App. + AuthorizerCredential *OAuthCredential `json:"authorizerCredential,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppInstallationId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppInstallationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GitHubConfig) MarshalJSON() ([]byte, error) { + type NoMethod GitHubConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsCloudbuildV2Condition: Conditions defines a readiness +// condition for a Knative resource. +type GoogleDevtoolsCloudbuildV2Condition struct { + // LastTransitionTime: LastTransitionTime is the last time the condition + // transitioned from one status to another. + LastTransitionTime string `json:"lastTransitionTime,omitempty"` + + // Message: A human readable message indicating details about the + // transition. + Message string `json:"message,omitempty"` + + // Reason: The reason for the condition's last transition. + Reason string `json:"reason,omitempty"` + + // Severity: Severity with which to treat failures of this type of + // condition. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Default enum type; should not be used. + // "WARNING" - Severity is warning. + // "INFO" - Severity is informational only. + Severity string `json:"severity,omitempty"` + + // Status: Status of the condition. + // + // Possible values: + // "UNKNOWN" - Default enum type indicating execution is still + // ongoing. + // "TRUE" - Success + // "FALSE" - Failure + Status string `json:"status,omitempty"` + + // Type: Type of condition. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LastTransitionTime") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LastTransitionTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsCloudbuildV2Condition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsCloudbuildV2Condition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig: Configuration for +// connections to an instance of GitHub Enterprise. +type GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig struct { + // ApiKey: Required. API Key used for authentication of webhook events. + ApiKey string `json:"apiKey,omitempty"` + + // AppId: Id of the GitHub App created from the manifest. + AppId int64 `json:"appId,omitempty,string"` + + // AppInstallationId: ID of the installation of the GitHub App. + AppInstallationId int64 `json:"appInstallationId,omitempty,string"` + + // AppSlug: The URL-friendly name of the GitHub App. + AppSlug string `json:"appSlug,omitempty"` + + // HostUri: Required. The URI of the GitHub Enterprise host this + // connection is for. + HostUri string `json:"hostUri,omitempty"` + + // PrivateKeySecretVersion: SecretManager resource containing the + // private key of the GitHub App, formatted as + // `projects/*/secrets/*/versions/*`. + PrivateKeySecretVersion string `json:"privateKeySecretVersion,omitempty"` + + // ServerVersion: Output only. GitHub Enterprise version installed at + // the host_uri. + ServerVersion string `json:"serverVersion,omitempty"` + + // ServiceDirectoryConfig: Configuration for using Service Directory to + // privately connect to a GitHub Enterprise server. This should only be + // set if the GitHub Enterprise server is hosted on-premises and not + // reachable by public internet. If this field is left empty, calls to + // the GitHub Enterprise server will be made over the public internet. + ServiceDirectoryConfig *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + + // SslCa: SSL certificate to use for requests to GitHub Enterprise. + SslCa string `json:"sslCa,omitempty"` + + // WebhookSecretSecretVersion: SecretManager resource containing the + // webhook secret of the GitHub App, formatted as + // `projects/*/secrets/*/versions/*`. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiKey") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsCloudbuildV2GitLabConfig: Configuration for connections +// to gitlab.com or an instance of GitLab Enterprise. +type GoogleDevtoolsCloudbuildV2GitLabConfig struct { + // AuthorizerCredential: Required. A GitLab personal access token with + // the `api` scope access. + AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` + + // HostUri: The URI of the GitLab Enterprise host this connection is + // for. If not specified, the default value is https://gitlab.com. + HostUri string `json:"hostUri,omitempty"` + + // ReadAuthorizerCredential: Required. A GitLab personal access token + // with the minimum `read_api` scope access. + ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` + + // ServerVersion: Output only. Version of the GitLab Enterprise server + // running on the `host_uri`. + ServerVersion string `json:"serverVersion,omitempty"` + + // ServiceDirectoryConfig: Configuration for using Service Directory to + // privately connect to a GitLab Enterprise server. This should only be + // set if the GitLab Enterprise server is hosted on-premises and not + // reachable by public internet. If this field is left empty, calls to + // the GitLab Enterprise server will be made over the public internet. + ServiceDirectoryConfig *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` + + // SslCa: SSL certificate to use for requests to GitLab Enterprise. + SslCa string `json:"sslCa,omitempty"` + + // WebhookSecretSecretVersion: Required. Immutable. SecretManager + // resource containing the webhook secret of a GitLab Enterprise + // project, formatted as `projects/*/secrets/*/versions/*`. + WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AuthorizerCredential") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthorizerCredential") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsCloudbuildV2GitLabConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsCloudbuildV2GitLabConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata +// of the long-running operation. +type GoogleDevtoolsCloudbuildV2OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsCloudbuildV2OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsCloudbuildV2OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig: +// ServiceDirectoryConfig represents Service Directory configuration for +// a connection. +type GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig struct { + // Service: Required. The Service Directory service name. Format: + // projects/{project}/locations/{location}/namespaces/{namespace}/service + // s/{service}. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpBody: Message that represents an arbitrary HTTP body. It should +// only be used for payload formats that can't be represented as JSON, +// such as raw binary or an HTML page. This message can be used both in +// streaming and non-streaming API methods in the request as well as the +// response. It can be used as a top-level request field, which is +// convenient if one wants to extract parameters from either the URL or +// HTTP template into the request fields and also want access to the raw +// HTTP body. Example: message GetResourceRequest { // A unique request +// id. string request_id = 1; // The raw HTTP body is bound to this +// field. google.api.HttpBody http_body = 2; } service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); } Example with streaming methods: service +// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns +// (stream google.api.HttpBody); rpc UpdateCalendar(stream +// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of +// this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +type HttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the + // content type of the body. + ContentType string `json:"contentType,omitempty"` + + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + + // Extensions: Application specific response metadata. Must be set in + // the first response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpBody) MarshalJSON() ([]byte, error) { + type NoMethod HttpBody + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstallationState: Describes stage and necessary actions to be taken +// by the user to complete the installation. Used for GitHub and GitHub +// Enterprise based connections. +type InstallationState struct { + // ActionUri: Output only. Link to follow for next action. Empty string + // if the installation is already complete. + ActionUri string `json:"actionUri,omitempty"` + + // Message: Output only. Message of what the user should do next to + // continue the installation. Empty string if the installation is + // already complete. + Message string `json:"message,omitempty"` + + // Stage: Output only. Current step of the installation process. + // + // Possible values: + // "STAGE_UNSPECIFIED" - No stage specified. + // "PENDING_CREATE_APP" - Only for GitHub Enterprise. An App creation + // has been requested. The user needs to confirm the creation in their + // GitHub enterprise host. + // "PENDING_USER_OAUTH" - User needs to authorize the GitHub (or + // Enterprise) App via OAuth. + // "PENDING_INSTALL_APP" - User needs to follow the link to install + // the GitHub (or Enterprise) App. + // "COMPLETE" - Installation process has been completed. + Stage string `json:"stage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActionUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstallationState) MarshalJSON() ([]byte, error) { + type NoMethod InstallationState + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListConnectionsResponse: Message for response to listing Connections. +type ListConnectionsResponse struct { + // Connections: The list of Connections. + Connections []*Connection `json:"connections,omitempty"` + + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Connections") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Connections") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListConnectionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListRepositoriesResponse: Message for response to listing +// Repositories. +type ListRepositoriesResponse struct { + // NextPageToken: A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Repositories: The list of Repositories. + Repositories []*Repository `json:"repositories,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRepositoriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRepositoriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OAuthCredential: Represents an OAuth token of the account that +// authorized the Connection, and associated metadata. +type OAuthCredential struct { + // OauthTokenSecretVersion: A SecretManager resource containing the + // OAuth token that authorizes the Cloud Build connection. Format: + // `projects/*/secrets/*/versions/*`. + OauthTokenSecretVersion string `json:"oauthTokenSecretVersion,omitempty"` + + // Username: Output only. The username associated to this token. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "OauthTokenSecretVersion") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OauthTokenSecretVersion") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *OAuthCredential) MarshalJSON() ([]byte, error) { + type NoMethod OAuthCredential + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CancelRequested: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // StatusDetail: Output only. Human-readable status of the operation, if + // any. + StatusDetail string `json:"statusDetail,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Param: Param defined with name and value. PipelineRef can be used to +// refer to a specific instance of a Pipeline. +type Param struct { + // Name: Name of the parameter. + Name string `json:"name,omitempty"` + + // Value: Value of the parameter. + Value *ParamValue `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Param) MarshalJSON() ([]byte, error) { + type NoMethod Param + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ParamSpec: ParamSpec defines parameters needed beyond typed inputs +// (such as resources). Parameter values are provided by users as inputs +// on a TaskRun or PipelineRun. +type ParamSpec struct { + // Default: The default value a parameter takes if no input value is + // supplied + Default *ParamValue `json:"default,omitempty"` + + // Description: Description of the ParamSpec + Description string `json:"description,omitempty"` + + // Name: Name of the ParamSpec + Name string `json:"name,omitempty"` + + // Type: Type of ParamSpec + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default enum type; should not be used. + // "STRING" - Default + // "ARRAY" - Arrary type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Default") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Default") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ParamSpec) MarshalJSON() ([]byte, error) { + type NoMethod ParamSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ParamValue: Parameter value. +type ParamValue struct { + // ArrayVal: Value of the parameter if type is array. + ArrayVal []string `json:"arrayVal,omitempty"` + + // StringVal: Value of the parameter if type is string. + StringVal string `json:"stringVal,omitempty"` + + // Type: Type of parameter. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default enum type; should not be used. + // "STRING" - Default + // "ARRAY" - Array type + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ArrayVal") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ArrayVal") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ParamValue) MarshalJSON() ([]byte, error) { + type NoMethod ParamValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PipelineRef: PipelineRef can be used to refer to a specific instance +// of a Pipeline. +type PipelineRef struct { + // Name: Name of the Pipeline. + Name string `json:"name,omitempty"` + + // Params: Params contains the parameters used to identify the + // referenced Tekton resource. Example entries might include "repo" or + // "path" but the set of params ultimately depends on the chosen + // resolver. + Params []*Param `json:"params,omitempty"` + + // Resolver: Resolver is the name of the resolver that should perform + // resolution of the referenced Tekton resource. + // + // Possible values: + // "RESOLVER_NAME_UNSPECIFIED" - Default enum type; should not be + // used. + // "BUNDLES" - Bundles resolver. + // https://tekton.dev/docs/pipelines/bundle-resolver/ + // "GCB_REPO" - GCB repo resolver. + // "GIT" - Simple Git resolver. + // https://tekton.dev/docs/pipelines/git-resolver/ + Resolver string `json:"resolver,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PipelineRef) MarshalJSON() ([]byte, error) { + type NoMethod PipelineRef + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PipelineRun: Message describing PipelineRun object +type PipelineRun struct { + // Annotations: User annotations. See + // https://google.aip.dev/128#annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // ChildReferences: Output only. List of TaskRun and Run names and + // PipelineTask names for children of this PipelineRun. + ChildReferences []*ChildStatusReference `json:"childReferences,omitempty"` + + // CompletionTime: Output only. Time the pipeline completed. + CompletionTime string `json:"completionTime,omitempty"` + + // Conditions: Output only. Kubernetes Conditions convention for + // PipelineRun status and error. + Conditions []*GoogleDevtoolsCloudbuildV2Condition `json:"conditions,omitempty"` + + // CreateTime: Output only. Time at which the request to create the + // `PipelineRun` was received. + CreateTime string `json:"createTime,omitempty"` + + // Etag: Needed for declarative-friendly resources. + Etag string `json:"etag,omitempty"` + + // Name: Output only. The `PipelineRun` name with format + // `projects/{project}/locations/{location}/pipelineRuns/{pipeline_run}` + Name string `json:"name,omitempty"` + + // Params: Params is a list of parameter names and values. + Params []*Param `json:"params,omitempty"` + + // PipelineRef: PipelineRef refer to a specific instance of a Pipeline. + PipelineRef *PipelineRef `json:"pipelineRef,omitempty"` + + // PipelineRunStatus: Status of the PipelineRun. + // + // Possible values: + // "PIPELINE_RUN_STATUS_UNSPECIFIED" - Default enum type; should not + // be used. + // "PIPELINE_RUN_CANCELLED" - Cancelled status. + PipelineRunStatus string `json:"pipelineRunStatus,omitempty"` + + // PipelineSpec: PipelineSpec defines the desired state of Pipeline. + PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"` + + // ResolvedPipelineSpec: Output only. The exact PipelineSpec used to + // instantiate the run. + ResolvedPipelineSpec *PipelineSpec `json:"resolvedPipelineSpec,omitempty"` + + // ServiceAccount: Service account used in the Pipeline. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // SkippedTasks: Output only. List of tasks that were skipped due to + // when expressions evaluating to false. + SkippedTasks []*SkippedTask `json:"skippedTasks,omitempty"` + + // StartTime: Output only. Time the pipeline is actually started. + StartTime string `json:"startTime,omitempty"` + + // Timeouts: Time after which the Pipeline times out. Currently three + // keys are accepted in the map pipeline, tasks and finally with + // Timeouts.pipeline >= Timeouts.tasks + Timeouts.finally + Timeouts *TimeoutFields `json:"timeouts,omitempty"` + + // Uid: Output only. A unique identifier for the `PipelineRun`. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time at which the request to update the + // `PipelineRun` was received. + UpdateTime string `json:"updateTime,omitempty"` + + // WorkerPool: Output only. The WorkerPool used to run this PipelineRun. + WorkerPool string `json:"workerPool,omitempty"` + + // Workflow: Output only. The Workflow used to create this PipelineRun. + Workflow string `json:"workflow,omitempty"` + + // Workspaces: Workspaces is a list of WorkspaceBindings from volumes to + // workspaces. + Workspaces []*WorkspaceBinding `json:"workspaces,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PipelineRun) MarshalJSON() ([]byte, error) { + type NoMethod PipelineRun + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PipelineSpec: PipelineSpec defines the desired state of Pipeline. +type PipelineSpec struct { + // FinallyTasks: List of Tasks that execute just before leaving the + // Pipeline i.e. either after all Tasks are finished executing + // successfully or after a failure which would result in ending the + // Pipeline. + FinallyTasks []*PipelineTask `json:"finallyTasks,omitempty"` + + // Params: List of parameters. + Params []*ParamSpec `json:"params,omitempty"` + + // Tasks: List of Tasks that execute when this Pipeline is run. + Tasks []*PipelineTask `json:"tasks,omitempty"` + + // Workspaces: Workspaces declares a set of named workspaces that are + // expected to be provided by a PipelineRun. + Workspaces []*PipelineWorkspaceDeclaration `json:"workspaces,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FinallyTasks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FinallyTasks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PipelineSpec) MarshalJSON() ([]byte, error) { + type NoMethod PipelineSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PipelineTask: PipelineTask defines a task in a Pipeline. +type PipelineTask struct { + // Name: Name of the task. + Name string `json:"name,omitempty"` + + // Params: Params is a list of parameter names and values. + Params []*Param `json:"params,omitempty"` + + // Retries: Retries represents how many times this task should be + // retried in case of task failure. + Retries int64 `json:"retries,omitempty"` + + // RunAfter: RunAfter is the list of PipelineTask names that should be + // executed before this Task executes. (Used to force a specific + // ordering in graph execution.) + RunAfter []string `json:"runAfter,omitempty"` + + // TaskRef: Reference to a specific instance of a task. + TaskRef *TaskRef `json:"taskRef,omitempty"` + + // TaskSpec: Spec to instantiate this TaskRun. + TaskSpec *EmbeddedTask `json:"taskSpec,omitempty"` + + // Timeout: Time after which the TaskRun times out. Defaults to 1 hour. + // Specified TaskRun timeout should be less than 24h. + Timeout string `json:"timeout,omitempty"` + + // WhenExpressions: Conditions that need to be true for the task to run. + WhenExpressions []*WhenExpression `json:"whenExpressions,omitempty"` + + // Workspaces: Workspaces maps workspaces from the pipeline spec to the + // workspaces declared in the Task. + Workspaces []*WorkspacePipelineTaskBinding `json:"workspaces,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PipelineTask) MarshalJSON() ([]byte, error) { + type NoMethod PipelineTask + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PipelineWorkspaceDeclaration: Workspaces declares a set of named +// workspaces that are expected to be provided by a PipelineRun. +type PipelineWorkspaceDeclaration struct { + // Description: Description is a human readable string describing how + // the workspace will be used in the Pipeline. + Description string `json:"description,omitempty"` + + // Name: Name is the name of a workspace to be provided by a + // PipelineRun. + Name string `json:"name,omitempty"` + + // Optional: Optional marks a Workspace as not being required in + // PipelineRuns. By default this field is false and so declared + // workspaces are required. + Optional bool `json:"optional,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PipelineWorkspaceDeclaration) MarshalJSON() ([]byte, error) { + type NoMethod PipelineWorkspaceDeclaration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PropertySpec: PropertySpec holds information about a property in an +// object. +type PropertySpec struct { + // Type: A type for the object. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default enum type; should not be used. + // "STRING" - Default + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PropertySpec) MarshalJSON() ([]byte, error) { + type NoMethod PropertySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Repository: A repository associated to a parent connection. +type Repository struct { + // Annotations: Allows clients to store small amounts of arbitrary data. + Annotations map[string]string `json:"annotations,omitempty"` + + // CreateTime: Output only. Server assigned timestamp for when the + // connection was created. + CreateTime string `json:"createTime,omitempty"` + + // Etag: This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure + // the client has an up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Name: Immutable. Resource name of the repository, in the format + // `projects/*/locations/*/connections/*/repositories/*`. + Name string `json:"name,omitempty"` + + // RemoteUri: Required. Git Clone HTTPS URI. + RemoteUri string `json:"remoteUri,omitempty"` + + // UpdateTime: Output only. Server assigned timestamp for when the + // connection was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // WebhookId: Output only. External ID of the webhook created for the + // repository. + WebhookId string `json:"webhookId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Repository) MarshalJSON() ([]byte, error) { + type NoMethod Repository + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunWorkflowCustomOperationMetadata: Represents the custom metadata of +// the RunWorkflow long-running operation. +type RunWorkflowCustomOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // PipelineRunId: Output only. ID of the pipeline run created by + // RunWorkflow. + PipelineRunId string `json:"pipelineRunId,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunWorkflowCustomOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod RunWorkflowCustomOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecretVolumeSource: Secret Volume Source. +type SecretVolumeSource struct { + // SecretName: Name of the secret referenced by the WorkspaceBinding. + SecretName string `json:"secretName,omitempty"` + + // SecretVersion: Output only. Resource name of the SecretVersion. In + // format: projects/*/secrets/*/versions/* + SecretVersion string `json:"secretVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SecretName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SecretName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecretVolumeSource) MarshalJSON() ([]byte, error) { + type NoMethod SecretVolumeSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecurityContext: Security options the container should be run with. +type SecurityContext struct { + // Privileged: Run container in privileged mode. + Privileged bool `json:"privileged,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Privileged") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Privileged") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityContext) MarshalJSON() ([]byte, error) { + type NoMethod SecurityContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Sidecar: Sidecars run alongside the Task's step containers. +type Sidecar struct { + // Args: Arguments to the entrypoint. + Args []string `json:"args,omitempty"` + + // Command: Entrypoint array. + Command []string `json:"command,omitempty"` + + // Env: List of environment variables to set in the container. + Env []*EnvVar `json:"env,omitempty"` + + // Image: Docker image name. + Image string `json:"image,omitempty"` + + // Name: Name of the Sidecar. + Name string `json:"name,omitempty"` + + // Script: The contents of an executable file to execute. + Script string `json:"script,omitempty"` + + // SecurityContext: Security options the container should be run with. + SecurityContext *SecurityContext `json:"securityContext,omitempty"` + + // VolumeMounts: Pod volumes to mount into the container's filesystem. + VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` + + // WorkingDir: Container's working directory. + WorkingDir string `json:"workingDir,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Args") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Sidecar) MarshalJSON() ([]byte, error) { + type NoMethod Sidecar + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SkippedTask: SkippedTask is used to describe the Tasks that were +// skipped due to their When Expressions evaluating to False. +type SkippedTask struct { + // Name: Name is the Pipeline Task name + Name string `json:"name,omitempty"` + + // Reason: Output only. Reason is the cause of the PipelineTask being + // skipped. + Reason string `json:"reason,omitempty"` + + // WhenExpressions: WhenExpressions is the list of checks guarding the + // execution of the PipelineTask + WhenExpressions []*WhenExpression `json:"whenExpressions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SkippedTask) MarshalJSON() ([]byte, error) { + type NoMethod SkippedTask + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Step: Step embeds the Container type, which allows it to include +// fields not provided by Container. +type Step struct { + // Args: Arguments to the entrypoint. + Args []string `json:"args,omitempty"` + + // Command: Entrypoint array. + Command []string `json:"command,omitempty"` + + // Env: List of environment variables to set in the container. + Env []*EnvVar `json:"env,omitempty"` + + // Image: Docker image name. + Image string `json:"image,omitempty"` + + // Name: Name of the container specified as a DNS_LABEL. + Name string `json:"name,omitempty"` + + // Script: The contents of an executable file to execute. + Script string `json:"script,omitempty"` + + // Timeout: Time after which the Step times out. Defaults to never. + Timeout string `json:"timeout,omitempty"` + + // VolumeMounts: Pod volumes to mount into the container's filesystem. + VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` + + // WorkingDir: Container's working directory. + WorkingDir string `json:"workingDir,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Args") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Step) MarshalJSON() ([]byte, error) { + type NoMethod Step + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskRef: TaskRef can be used to refer to a specific instance of a +// task. PipelineRef can be used to refer to a specific instance of a +// Pipeline. +type TaskRef struct { + // CustomTask: Optional. The CustomTask definition to use. + // + // Possible values: + // "CUSTOM_TASK_UNSPECIFIED" - Default value. This value is unused. + // "DOCKER" - Sets up a Docker Daemon. + CustomTask string `json:"customTask,omitempty"` + + // Name: Name of the task. + Name string `json:"name,omitempty"` + + // Params: Params contains the parameters used to identify the + // referenced Tekton resource. Example entries might include "repo" or + // "path" but the set of params ultimately depends on the chosen + // resolver. + Params []*Param `json:"params,omitempty"` + + // Resolver: Resolver is the name of the resolver that should perform + // resolution of the referenced Tekton resource. + // + // Possible values: + // "RESOLVER_NAME_UNSPECIFIED" - Default enum type; should not be + // used. + // "BUNDLES" - Bundles resolver. + // https://tekton.dev/docs/pipelines/bundle-resolver/ + // "GCB_REPO" - GCB repo resolver. + // "GIT" - Simple Git resolver. + // https://tekton.dev/docs/pipelines/git-resolver/ + Resolver string `json:"resolver,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomTask") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomTask") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskRef) MarshalJSON() ([]byte, error) { + type NoMethod TaskRef + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskResult: TaskResult is used to describe the results of a task. +type TaskResult struct { + // Description: Description of the result. + Description string `json:"description,omitempty"` + + // Name: Name of the result. + Name string `json:"name,omitempty"` + + // Properties: When type is OBJECT, this map holds the names of fields + // inside that object along with the type of data each field holds. + Properties map[string]PropertySpec `json:"properties,omitempty"` + + // Type: The type of data that the result holds. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default enum type; should not be used. + // "STRING" - Default + // "ARRAY" - Array type + // "OBJECT" - Object type + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskResult) MarshalJSON() ([]byte, error) { + type NoMethod TaskResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskSpec: TaskSpec contains the Spec to instantiate a TaskRun. +type TaskSpec struct { + // Description: Description of the task. + Description string `json:"description,omitempty"` + + // ManagedSidecars: Sidecars that run alongside the Task’s step + // containers that should be added to this Task. + // + // Possible values: + // "MANAGED_SIDECAR_UNSPECIFIED" - Default enum type; should not be + // used. + // "PRIVILEGED_DOCKER_DAEMON" - Sidecar for a privileged docker + // daemon. + ManagedSidecars []string `json:"managedSidecars,omitempty"` + + // Params: List of parameters. + Params []*ParamSpec `json:"params,omitempty"` + + // Results: Values that this Task can output. + Results []*TaskResult `json:"results,omitempty"` + + // Sidecars: Sidecars that run alongside the Task's step containers. + Sidecars []*Sidecar `json:"sidecars,omitempty"` + + // Steps: Steps of the task. + Steps []*Step `json:"steps,omitempty"` + + // Volumes: A collection of volumes that are available to mount into + // steps. + Volumes []*VolumeSource `json:"volumes,omitempty"` + + // Workspaces: The volumes that this Task requires. + Workspaces []*WorkspaceDeclaration `json:"workspaces,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod TaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TimeoutFields: TimeoutFields allows granular specification of +// pipeline, task, and finally timeouts +type TimeoutFields struct { + // Finally: Finally sets the maximum allowed duration of this pipeline's + // finally + Finally string `json:"finally,omitempty"` + + // Pipeline: Pipeline sets the maximum allowed duration for execution of + // the entire pipeline. The sum of individual timeouts for tasks and + // finally must not exceed this value. + Pipeline string `json:"pipeline,omitempty"` + + // Tasks: Tasks sets the maximum allowed duration of this pipeline's + // tasks + Tasks string `json:"tasks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Finally") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Finally") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TimeoutFields) MarshalJSON() ([]byte, error) { + type NoMethod TimeoutFields + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UserCredential: Represents a personal access token that authorized +// the Connection, and associated metadata. +type UserCredential struct { + // UserTokenSecretVersion: Required. A SecretManager resource containing + // the user token that authorizes the Cloud Build connection. Format: + // `projects/*/secrets/*/versions/*`. + UserTokenSecretVersion string `json:"userTokenSecretVersion,omitempty"` + + // Username: Output only. The username associated to this token. + Username string `json:"username,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "UserTokenSecretVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UserTokenSecretVersion") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *UserCredential) MarshalJSON() ([]byte, error) { + type NoMethod UserCredential + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VolumeClaim: VolumeClaim is a user's request for a volume. +type VolumeClaim struct { + // Storage: Volume size, e.g. 1gb. + Storage string `json:"storage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Storage") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Storage") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VolumeClaim) MarshalJSON() ([]byte, error) { + type NoMethod VolumeClaim + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VolumeMount: Pod volumes to mount into the container's filesystem. +type VolumeMount struct { + // MountPath: Path within the container at which the volume should be + // mounted. Must not contain ':'. + MountPath string `json:"mountPath,omitempty"` + + // Name: Name of the volume. + Name string `json:"name,omitempty"` + + // ReadOnly: Mounted read-only if true, read-write otherwise (false or + // unspecified). + ReadOnly bool `json:"readOnly,omitempty"` + + // SubPath: Path within the volume from which the container's volume + // should be mounted. Defaults to "" (volume's root). + SubPath string `json:"subPath,omitempty"` + + // SubPathExpr: Expanded path within the volume from which the + // container's volume should be mounted. Behaves similarly to SubPath + // but environment variable references $(VAR_NAME) are expanded using + // the container's environment. Defaults to "" (volume's root). + SubPathExpr string `json:"subPathExpr,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MountPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MountPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VolumeMount) MarshalJSON() ([]byte, error) { + type NoMethod VolumeMount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VolumeSource: Volumes available to mount. +type VolumeSource struct { + // EmptyDir: A temporary directory that shares a pod's lifetime. + EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"` + + // Name: Name of the Volume. Must be a DNS_LABEL and unique within the + // pod. More info: + // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EmptyDir") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EmptyDir") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VolumeSource) MarshalJSON() ([]byte, error) { + type NoMethod VolumeSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WhenExpression: Conditions that need to be true for the task to run. +type WhenExpression struct { + // ExpressionOperator: Operator that represents an Input's relationship + // to the values + // + // Possible values: + // "EXPRESSION_OPERATOR_UNSPECIFIED" - Default enum type; should not + // be used. + // "DOES_NOT_EXIST" - Input does not exist. + // "EQUALS" - Input equals values. + // "DOUBLE_EQUALS" - Input double equals values. + // "IN" - Input is in values. + // "NOT_EQUALS" - Input does not equal values. + // "NOT_IN" - Input is not in values. + // "EXISTS" - Input exists. + // "GREATER_THAN" - Input is greater than values. + // "LESS_THAN" - Input is less than values. + ExpressionOperator string `json:"expressionOperator,omitempty"` + + // Input: Input is the string for guard checking which can be a static + // input or an output from a parent Task. + Input string `json:"input,omitempty"` + + // Values: Values is an array of strings, which is compared against the + // input, for guard checking. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpressionOperator") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpressionOperator") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WhenExpression) MarshalJSON() ([]byte, error) { + type NoMethod WhenExpression + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkspaceBinding: WorkspaceBinding maps a workspace to a Volume. +// PipelineRef can be used to refer to a specific instance of a +// Pipeline. +type WorkspaceBinding struct { + // Name: Name of the workspace. + Name string `json:"name,omitempty"` + + // Secret: Secret Volume Source. + Secret *SecretVolumeSource `json:"secret,omitempty"` + + // VolumeClaim: Volume claim that will be created in the same namespace. + VolumeClaim *VolumeClaim `json:"volumeClaim,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkspaceBinding) MarshalJSON() ([]byte, error) { + type NoMethod WorkspaceBinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkspaceDeclaration: WorkspaceDeclaration is a declaration of a +// volume that a Task requires. +type WorkspaceDeclaration struct { + // Description: Description is a human readable description of this + // volume. + Description string `json:"description,omitempty"` + + // MountPath: MountPath overrides the directory that the volume will be + // made available at. + MountPath string `json:"mountPath,omitempty"` + + // Name: Name is the name by which you can bind the volume at runtime. + Name string `json:"name,omitempty"` + + // ReadOnly: ReadOnly dictates whether a mounted volume is writable. + ReadOnly bool `json:"readOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkspaceDeclaration) MarshalJSON() ([]byte, error) { + type NoMethod WorkspaceDeclaration + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkspacePipelineTaskBinding: WorkspacePipelineTaskBinding maps +// workspaces from the PipelineSpec to the workspaces declared in the +// Task. +type WorkspacePipelineTaskBinding struct { + // Name: Name of the workspace as declared by the task. + Name string `json:"name,omitempty"` + + // Workspace: Name of the workspace declared by the pipeline. + Workspace string `json:"workspace,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkspacePipelineTaskBinding) MarshalJSON() ([]byte, error) { + type NoMethod WorkspacePipelineTaskBinding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "cloudbuild.projects.locations.connections.create": + +type ProjectsLocationsConnectionsCreateCall struct { + s *Service + parent string + connection *Connection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Connection. +// +// - parent: Project and location where the connection will be created. +// Format: `projects/*/locations/*`. +func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall { + c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.connection = connection + return c +} + +// ConnectionId sets the optional parameter "connectionId": Required. +// The ID to use for the Connection, which will become the final +// component of the Connection's resource name. Names must be unique +// per-project per-location. Allows alphanumeric characters and any of +// -._~%!$&'()*+,;=@. +func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { + c.urlParams_.Set("connectionId", connectionId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "connectionId": { + // "description": "Required. The ID to use for the Connection, which will become the final component of the Connection's resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$\u0026'()*+,;=@.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Project and location where the connection will be created. Format: `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/connections", + // "request": { + // "$ref": "Connection" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.delete": + +type ProjectsLocationsConnectionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single connection. +// +// - name: The name of the Connection to delete. Format: +// `projects/*/locations/*/connections/*`. +func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { + c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// connection. If an etag is provided and does not match the current +// etag of the connection, deletion will be blocked and an ABORTED error +// will be returned. +func (c *ProjectsLocationsConnectionsDeleteCall) Etag(etag string) *ProjectsLocationsConnectionsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request, but do not actually post it. +func (c *ProjectsLocationsConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "DELETE", + // "id": "cloudbuild.projects.locations.connections.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "The current etag of the connection. If an etag is provided and does not match the current etag of the connection, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The name of the Connection to delete. Format: `projects/*/locations/*/connections/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request, but do not actually post it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.fetchLinkableRepositories": + +type ProjectsLocationsConnectionsFetchLinkableRepositoriesCall struct { + s *Service + connection string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchLinkableRepositories: FetchLinkableRepositories get repositories +// from SCM that are accessible and could be added to the connection. +// +// - connection: The name of the Connection. Format: +// `projects/*/locations/*/connections/*`. +func (r *ProjectsLocationsConnectionsService) FetchLinkableRepositories(connection string) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { + c := &ProjectsLocationsConnectionsFetchLinkableRepositoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.connection = connection + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results to +// return in the list. Default to 20. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page start. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) PageToken(pageToken string) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Context(ctx context.Context) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+connection}:fetchLinkableRepositories") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "connection": c.connection, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.fetchLinkableRepositories" call. +// Exactly one of *FetchLinkableRepositoriesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *FetchLinkableRepositoriesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Do(opts ...googleapi.CallOption) (*FetchLinkableRepositoriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &FetchLinkableRepositoriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "FetchLinkableRepositories get repositories from SCM that are accessible and could be added to the connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:fetchLinkableRepositories", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.fetchLinkableRepositories", + // "parameterOrder": [ + // "connection" + // ], + // "parameters": { + // "connection": { + // "description": "Required. The name of the Connection. Format: `projects/*/locations/*/connections/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "Number of results to return in the list. Default to 20.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page start.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+connection}:fetchLinkableRepositories", + // "response": { + // "$ref": "FetchLinkableRepositoriesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Pages(ctx context.Context, f func(*FetchLinkableRepositoriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudbuild.projects.locations.connections.get": + +type ProjectsLocationsConnectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single connection. +// +// - name: The name of the Connection to retrieve. Format: +// `projects/*/locations/*/connections/*`. +func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { + c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.get" call. +// Exactly one of *Connection or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Connection.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Connection{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Connection to retrieve. Format: `projects/*/locations/*/connections/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Connection" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.getIamPolicy": + +type ProjectsLocationsConnectionsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsConnectionsGetIamPolicyCall { + c := &ProjectsLocationsConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.list": + +type ProjectsLocationsConnectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Connections in a given project and location. +// +// - parent: The parent, which owns this collection of Connections. +// Format: `projects/*/locations/*`. +func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { + c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results to +// return in the list. +func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page start. +func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.list" call. +// Exactly one of *ListConnectionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListConnectionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListConnectionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Connections in a given project and location.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Number of results to return in the list.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page start.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of Connections. Format: `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/connections", + // "response": { + // "$ref": "ListConnectionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudbuild.projects.locations.connections.patch": + +type ProjectsLocationsConnectionsPatchCall struct { + s *Service + name string + connection *Connection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a single connection. +// +// - name: Immutable. The resource name of the connection, in the format +// `projects/{project}/locations/{location}/connections/{connection_id} +// `. +func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall { + c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.connection = connection + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the connection is not found a new connection will be +// created. In this situation `update_mask` is ignored. The creation +// will succeed only if the input connection has all the necessary +// information (e.g a github_config with both user_oauth_token and +// installation_id properties). +func (c *ProjectsLocationsConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// connection. If an etag is provided and does not match the current +// etag of the connection, update will be blocked and an ABORTED error +// will be returned. +func (c *ProjectsLocationsConnectionsPatchCall) Etag(etag string) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("etag", etag) + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a single connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "PATCH", + // "id": "cloudbuild.projects.locations.connections.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the connection is not found a new connection will be created. In this situation `update_mask` is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties).", + // "location": "query", + // "type": "boolean" + // }, + // "etag": { + // "description": "The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "Connection" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.processWebhook": + +type ProjectsLocationsConnectionsProcessWebhookCall struct { + s *Service + parent string + httpbody *HttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ProcessWebhook: ProcessWebhook is called by the external SCM for +// notifying of events. +// +// - parent: Project and location where the webhook will be received. +// Format: `projects/*/locations/*`. +func (r *ProjectsLocationsConnectionsService) ProcessWebhook(parent string, httpbody *HttpBody) *ProjectsLocationsConnectionsProcessWebhookCall { + c := &ProjectsLocationsConnectionsProcessWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.httpbody = httpbody + return c +} + +// WebhookKey sets the optional parameter "webhookKey": Arbitrary +// additional key to find the maching repository for a webhook event if +// needed. +func (c *ProjectsLocationsConnectionsProcessWebhookCall) WebhookKey(webhookKey string) *ProjectsLocationsConnectionsProcessWebhookCall { + c.urlParams_.Set("webhookKey", webhookKey) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsProcessWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsProcessWebhookCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsProcessWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsProcessWebhookCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsProcessWebhookCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsProcessWebhookCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections:processWebhook") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.processWebhook" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsConnectionsProcessWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "ProcessWebhook is called by the external SCM for notifying of events.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections:processWebhook", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.processWebhook", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Project and location where the webhook will be received. Format: `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "webhookKey": { + // "description": "Arbitrary additional key to find the maching repository for a webhook event if needed.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/connections:processWebhook", + // "request": { + // "$ref": "HttpBody" + // }, + // "response": { + // "$ref": "Empty" + // } + // } + +} + +// method id "cloudbuild.projects.locations.connections.setIamPolicy": + +type ProjectsLocationsConnectionsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionsSetIamPolicyCall { + c := &ProjectsLocationsConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.testIamPermissions": + +type ProjectsLocationsConnectionsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionsTestIamPermissionsCall { + c := &ProjectsLocationsConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.accessReadToken": + +type ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall struct { + s *Service + repository string + fetchreadtokenrequest *FetchReadTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AccessReadToken: Fetches read token of a given repository. +// +// - repository: The resource name of the repository in the format +// `projects/*/locations/*/connections/*/repositories/*`. +func (r *ProjectsLocationsConnectionsRepositoriesService) AccessReadToken(repository string, fetchreadtokenrequest *FetchReadTokenRequest) *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall { + c := &ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.repository = repository + c.fetchreadtokenrequest = fetchreadtokenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.fetchreadtokenrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+repository}:accessReadToken") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "repository": c.repository, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.accessReadToken" call. +// Exactly one of *FetchReadTokenResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FetchReadTokenResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Do(opts ...googleapi.CallOption) (*FetchReadTokenResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &FetchReadTokenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Fetches read token of a given repository.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:accessReadToken", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.repositories.accessReadToken", + // "parameterOrder": [ + // "repository" + // ], + // "parameters": { + // "repository": { + // "description": "Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+repository}:accessReadToken", + // "request": { + // "$ref": "FetchReadTokenRequest" + // }, + // "response": { + // "$ref": "FetchReadTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.accessReadWriteToken": + +type ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall struct { + s *Service + repository string + fetchreadwritetokenrequest *FetchReadWriteTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AccessReadWriteToken: Fetches read/write token of a given repository. +// +// - repository: The resource name of the repository in the format +// `projects/*/locations/*/connections/*/repositories/*`. +func (r *ProjectsLocationsConnectionsRepositoriesService) AccessReadWriteToken(repository string, fetchreadwritetokenrequest *FetchReadWriteTokenRequest) *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall { + c := &ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.repository = repository + c.fetchreadwritetokenrequest = fetchreadwritetokenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.fetchreadwritetokenrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+repository}:accessReadWriteToken") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "repository": c.repository, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.accessReadWriteToken" call. +// Exactly one of *FetchReadWriteTokenResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *FetchReadWriteTokenResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Do(opts ...googleapi.CallOption) (*FetchReadWriteTokenResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &FetchReadWriteTokenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Fetches read/write token of a given repository.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:accessReadWriteToken", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.repositories.accessReadWriteToken", + // "parameterOrder": [ + // "repository" + // ], + // "parameters": { + // "repository": { + // "description": "Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+repository}:accessReadWriteToken", + // "request": { + // "$ref": "FetchReadWriteTokenRequest" + // }, + // "response": { + // "$ref": "FetchReadWriteTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.batchCreate": + +type ProjectsLocationsConnectionsRepositoriesBatchCreateCall struct { + s *Service + parent string + batchcreaterepositoriesrequest *BatchCreateRepositoriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates multiple repositories inside a connection. +// +// - parent: The connection to contain all the repositories being +// created. Format: projects/*/locations/*/connections/* The parent +// field in the CreateRepositoryRequest messages must either be empty +// or match this field. +func (r *ProjectsLocationsConnectionsRepositoriesService) BatchCreate(parent string, batchcreaterepositoriesrequest *BatchCreateRepositoriesRequest) *ProjectsLocationsConnectionsRepositoriesBatchCreateCall { + c := &ProjectsLocationsConnectionsRepositoriesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchcreaterepositoriesrequest = batchcreaterepositoriesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreaterepositoriesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/repositories:batchCreate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.batchCreate" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates multiple repositories inside a connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories:batchCreate", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.repositories.batchCreate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The connection to contain all the repositories being created. Format: projects/*/locations/*/connections/* The parent field in the CreateRepositoryRequest messages must either be empty or match this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/repositories:batchCreate", + // "request": { + // "$ref": "BatchCreateRepositoriesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.create": + +type ProjectsLocationsConnectionsRepositoriesCreateCall struct { + s *Service + parent string + repository *Repository + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Repository. +// +// - parent: The connection to contain the repository. If the request is +// part of a BatchCreateRepositoriesRequest, this field should be +// empty or match the parent specified there. +func (r *ProjectsLocationsConnectionsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsConnectionsRepositoriesCreateCall { + c := &ProjectsLocationsConnectionsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.repository = repository + return c +} + +// RepositoryId sets the optional parameter "repositoryId": Required. +// The ID to use for the repository, which will become the final +// component of the repository's resource name. This ID should be unique +// in the connection. Allows alphanumeric characters and any of +// -._~%!$&'()*+,;=@. +func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsConnectionsRepositoriesCreateCall { + c.urlParams_.Set("repositoryId", repositoryId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/repositories") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Repository.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.connections.repositories.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The connection to contain the repository. If the request is part of a BatchCreateRepositoriesRequest, this field should be empty or match the parent specified there.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "repositoryId": { + // "description": "Required. The ID to use for the repository, which will become the final component of the repository's resource name. This ID should be unique in the connection. Allows alphanumeric characters and any of -._~%!$\u0026'()*+,;=@.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/repositories", + // "request": { + // "$ref": "Repository" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.delete": + +type ProjectsLocationsConnectionsRepositoriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single repository. +// +// - name: The name of the Repository to delete. Format: +// `projects/*/locations/*/connections/*/repositories/*`. +func (r *ProjectsLocationsConnectionsRepositoriesService) Delete(name string) *ProjectsLocationsConnectionsRepositoriesDeleteCall { + c := &ProjectsLocationsConnectionsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": The current etag of the +// repository. If an etag is provided and does not match the current +// etag of the repository, deletion will be blocked and an ABORTED error +// will be returned. +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Etag(etag string) *ProjectsLocationsConnectionsRepositoriesDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request, but do not actually post it. +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsRepositoriesDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single repository.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}", + // "httpMethod": "DELETE", + // "id": "cloudbuild.projects.locations.connections.repositories.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "The current etag of the repository. If an etag is provided and does not match the current etag of the repository, deletion will be blocked and an ABORTED error will be returned.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The name of the Repository to delete. Format: `projects/*/locations/*/connections/*/repositories/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "If set, validate the request, but do not actually post it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.fetchGitRefs": + +type ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall struct { + s *Service + repository string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchGitRefs: Fetch the list of branches or tags for a given +// repository. +// +// - repository: The resource name of the repository in the format +// `projects/*/locations/*/connections/*/repositories/*`. +func (r *ProjectsLocationsConnectionsRepositoriesService) FetchGitRefs(repository string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c := &ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.repository = repository + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results to +// return in the list. Default to 100. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page start. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) PageToken(pageToken string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// RefType sets the optional parameter "refType": Type of refs to fetch +// +// Possible values: +// +// "REF_TYPE_UNSPECIFIED" - No type specified. +// "TAG" - To fetch tags. +// "BRANCH" - To fetch branches. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) RefType(refType string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c.urlParams_.Set("refType", refType) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+repository}:fetchGitRefs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "repository": c.repository, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.fetchGitRefs" call. +// Exactly one of *FetchGitRefsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *FetchGitRefsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Do(opts ...googleapi.CallOption) (*FetchGitRefsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &FetchGitRefsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Fetch the list of branches or tags for a given repository.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}:fetchGitRefs", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.repositories.fetchGitRefs", + // "parameterOrder": [ + // "repository" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Number of results to return in the list. Default to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Page start.", + // "location": "query", + // "type": "string" + // }, + // "refType": { + // "description": "Type of refs to fetch", + // "enum": [ + // "REF_TYPE_UNSPECIFIED", + // "TAG", + // "BRANCH" + // ], + // "enumDescriptions": [ + // "No type specified.", + // "To fetch tags.", + // "To fetch branches." + // ], + // "location": "query", + // "type": "string" + // }, + // "repository": { + // "description": "Required. The resource name of the repository in the format `projects/*/locations/*/connections/*/repositories/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+repository}:fetchGitRefs", + // "response": { + // "$ref": "FetchGitRefsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Pages(ctx context.Context, f func(*FetchGitRefsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudbuild.projects.locations.connections.repositories.get": + +type ProjectsLocationsConnectionsRepositoriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single repository. +// +// - name: The name of the Repository to retrieve. Format: +// `projects/*/locations/*/connections/*/repositories/*`. +func (r *ProjectsLocationsConnectionsRepositoriesService) Get(name string) *ProjectsLocationsConnectionsRepositoriesGetCall { + c := &ProjectsLocationsConnectionsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRepositoriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.get" call. +// Exactly one of *Repository or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Repository.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Repository{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single repository.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories/{repositoriesId}", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.repositories.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Repository to retrieve. Format: `projects/*/locations/*/connections/*/repositories/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/repositories/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Repository" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.connections.repositories.list": + +type ProjectsLocationsConnectionsRepositoriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Repositories in a given connection. +// +// - parent: The parent, which owns this collection of Repositories. +// Format: `projects/*/locations/*/connections/*`. +func (r *ProjectsLocationsConnectionsRepositoriesService) List(parent string) *ProjectsLocationsConnectionsRepositoriesListCall { + c := &ProjectsLocationsConnectionsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Expressions must follow API +// improvement proposal AIP-160 (https://google.aip.dev/160). e.g. +// `remote_uri:"https://github.com*". +func (c *ProjectsLocationsConnectionsRepositoriesListCall) Filter(filter string) *ProjectsLocationsConnectionsRepositoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results to +// return in the list. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsRepositoriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page start. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsRepositoriesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRepositoriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsRepositoriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/repositories") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.connections.repositories.list" call. +// Exactly one of *ListRepositoriesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListRepositoriesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListRepositoriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Repositories in a given connection.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/repositories", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.connections.repositories.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Expressions must follow API improvement proposal [AIP-160](https://google.aip.dev/160). e.g. `remote_uri:\"https://github.com*\"`.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Number of results to return in the list.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page start.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent, which owns this collection of Repositories. Format: `projects/*/locations/*/connections/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/repositories", + // "response": { + // "$ref": "ListRepositoriesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsConnectionsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudbuild.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "cloudbuild.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudbuild.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudbuild.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "cloudbuild.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index fbc78b6f14f..19af6151800 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -2178,7 +2178,7 @@ } } }, - "revision": "20230806", + "revision": "20230906", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2747,7 +2747,7 @@ }, "orgPostalAddress": { "$ref": "GoogleTypePostalAddress", - "description": "Required. The organization address for the customer. To enforce US laws and embargoes, we require a region and zip code. You must provide valid addresses for every customer. To set the customer's language, use the Customer-level language code." + "description": "Required. The organization address for the customer. To enforce US laws and embargoes, we require a region, postal code, and address lines. You must provide valid addresses for every customer. To set the customer's language, use the Customer-level language code." }, "primaryContactInfo": { "$ref": "GoogleCloudChannelV1ContactInfo", diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index b314bc07b18..ad0bd2ee3ed 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/channel // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudchannelService, err := cloudchannel.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudchannelService, err := cloudchannel.NewService(ctx, option.WithScopes(cloudchannel.AppsReportsUsageReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudchannelService, err := cloudchannel.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudchannelService, err := cloudchannel.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudchannel // import "google.golang.org/api/cloudchannel/v1" import ( @@ -1322,9 +1336,10 @@ type GoogleCloudChannelV1Customer struct { OrgDisplayName string `json:"orgDisplayName,omitempty"` // OrgPostalAddress: Required. The organization address for the - // customer. To enforce US laws and embargoes, we require a region and - // zip code. You must provide valid addresses for every customer. To set - // the customer's language, use the Customer-level language code. + // customer. To enforce US laws and embargoes, we require a region, + // postal code, and address lines. You must provide valid addresses for + // every customer. To set the customer's language, use the + // Customer-level language code. OrgPostalAddress *GoogleTypePostalAddress `json:"orgPostalAddress,omitempty"` // PrimaryContactInfo: Primary contact info. diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index 4067def5782..c1aee8ce6a3 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/deploy/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // clouddeployService, err := clouddeploy.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // clouddeployService, err := clouddeploy.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // clouddeployService, err := clouddeploy.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package clouddeploy // import "google.golang.org/api/clouddeploy/v1" import ( diff --git a/clouderrorreporting/v1beta1/clouderrorreporting-api.json b/clouderrorreporting/v1beta1/clouderrorreporting-api.json index 7f5c8608593..9f0392842d6 100644 --- a/clouderrorreporting/v1beta1/clouderrorreporting-api.json +++ b/clouderrorreporting/v1beta1/clouderrorreporting-api.json @@ -430,7 +430,7 @@ } } }, - "revision": "20230804", + "revision": "20230901", "rootUrl": "https://clouderrorreporting.googleapis.com/", "schemas": { "DeleteEventsResponse": { @@ -494,7 +494,7 @@ "id": "ErrorGroup", "properties": { "groupId": { - "description": "Group IDs are unique for a given project. If the same kind of error occurs in different service contexts, it will receive the same group ID.", + "description": "An opaque identifier of the group. This field is assigned by the Error Reporting system and always populated. In the group resource name, the `group_id` is a unique identifier for a particular error group. The identifier is derived from key parts of the error-log content and is treated as Service Data. For information about how Service Data is handled, see [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).", "type": "string" }, "name": { diff --git a/clouderrorreporting/v1beta1/clouderrorreporting-gen.go b/clouderrorreporting/v1beta1/clouderrorreporting-gen.go index 46234c76905..252107defba 100644 --- a/clouderrorreporting/v1beta1/clouderrorreporting-gen.go +++ b/clouderrorreporting/v1beta1/clouderrorreporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/error-reporting/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // clouderrorreportingService, err := clouderrorreporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // clouderrorreportingService, err := clouderrorreporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // clouderrorreportingService, err := clouderrorreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package clouderrorreporting // import "google.golang.org/api/clouderrorreporting/v1beta1" import ( @@ -283,9 +296,13 @@ func (s *ErrorEvent) MarshalJSON() ([]byte, error) { // ErrorGroup: Description of a group of similar error events. type ErrorGroup struct { - // GroupId: Group IDs are unique for a given project. If the same kind - // of error occurs in different service contexts, it will receive the - // same group ID. + // GroupId: An opaque identifier of the group. This field is assigned by + // the Error Reporting system and always populated. In the group + // resource name, the `group_id` is a unique identifier for a particular + // error group. The identifier is derived from key parts of the + // error-log content and is treated as Service Data. For information + // about how Service Data is handled, see Google Cloud Privacy Notice + // (https://cloud.google.com/terms/cloud-privacy-notice). GroupId string `json:"groupId,omitempty"` // Name: The group resource name. Written as diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index f23933633f8..7eb77a6e994 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/functions // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudfunctionsService, err := cloudfunctions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudfunctions // import "google.golang.org/api/cloudfunctions/v1" import ( diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index 42aacf20a6d..bb918dc555e 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/functions // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudfunctionsService, err := cloudfunctions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudfunctions // import "google.golang.org/api/cloudfunctions/v2" import ( diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 6775a43b5fd..083e3ca6953 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/functions // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudfunctionsService, err := cloudfunctions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudfunctions // import "google.golang.org/api/cloudfunctions/v2alpha" import ( diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 07ffd611c46..e696b7d0e3e 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/functions // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudfunctionsService, err := cloudfunctions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudfunctionsService, err := cloudfunctions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudfunctions // import "google.golang.org/api/cloudfunctions/v2beta" import ( diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index dfb9be1bbaa..03ccafc1a11 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/identity/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudidentityService, err := cloudidentity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudidentityService, err := cloudidentity.NewService(ctx, option.WithScopes(cloudidentity.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudidentityService, err := cloudidentity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudidentityService, err := cloudidentity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudidentity // import "google.golang.org/api/cloudidentity/v1" import ( diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index ebb51b39879..4f0d519dcb0 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/identity/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudidentityService, err := cloudidentity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudidentityService, err := cloudidentity.NewService(ctx, option.WithScopes(cloudidentity.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudidentityService, err := cloudidentity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudidentityService, err := cloudidentity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudidentity // import "google.golang.org/api/cloudidentity/v1beta1" import ( diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go index 0e410c0bc05..b4b5fc79f36 100644 --- a/cloudkms/v1/cloudkms-gen.go +++ b/cloudkms/v1/cloudkms-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/kms/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // cloudkmsService, err := cloudkms.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudkmsService, err := cloudkms.NewService(ctx, option.WithScopes(cloudkms.CloudkmsScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudkmsService, err := cloudkms.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudkmsService, err := cloudkms.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudkms // import "google.golang.org/api/cloudkms/v1" import ( diff --git a/cloudprofiler/v2/cloudprofiler-gen.go b/cloudprofiler/v2/cloudprofiler-gen.go index bdf5e6b0e95..100ad6af173 100644 --- a/cloudprofiler/v2/cloudprofiler-gen.go +++ b/cloudprofiler/v2/cloudprofiler-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/profiler/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudprofilerService, err := cloudprofiler.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudprofilerService, err := cloudprofiler.NewService(ctx, option.WithScopes(cloudprofiler.MonitoringWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudprofilerService, err := cloudprofiler.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudprofilerService, err := cloudprofiler.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudprofiler // import "google.golang.org/api/cloudprofiler/v2" import ( diff --git a/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1/cloudresourcemanager-gen.go index 4d977c18c58..c7e43de97aa 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/resource-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v1" import ( diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index b8b0a098ec8..9081b1baa19 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/resource-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v1beta1" import ( diff --git a/cloudresourcemanager/v2/cloudresourcemanager-gen.go b/cloudresourcemanager/v2/cloudresourcemanager-gen.go index a51d0e3af50..989dbe78fcc 100644 --- a/cloudresourcemanager/v2/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v2/cloudresourcemanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/resource-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v2" import ( diff --git a/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go index 63abf429ae8..26c865bce52 100644 --- a/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/resource-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v2beta1" import ( diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index 855197c391c..4458859a471 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/resource-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithScopes(cloudresourcemanager.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudresourcemanagerService, err := cloudresourcemanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudresourcemanager // import "google.golang.org/api/cloudresourcemanager/v3" import ( diff --git a/cloudscheduler/v1/cloudscheduler-api.json b/cloudscheduler/v1/cloudscheduler-api.json index 5cddfae962e..fa32d524c70 100644 --- a/cloudscheduler/v1/cloudscheduler-api.json +++ b/cloudscheduler/v1/cloudscheduler-api.json @@ -418,7 +418,7 @@ } } }, - "revision": "20230707", + "revision": "20230816", "rootUrl": "https://cloudscheduler.googleapis.com/", "schemas": { "AppEngineHttpTarget": { @@ -596,7 +596,7 @@ "description": "Settings that determine the retry behavior." }, "schedule": { - "description": "Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) * English-like [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. A scheduled start time will be delayed if the previous execution has not ended when its scheduled time occurs. If retry_count \u003e 0 and a job attempt fails, the job will be tried a total of retry_count times, with exponential backoff, until the next scheduled start time.", + "description": "Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) * English-like [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. A scheduled start time will be delayed if the previous execution has not ended when its scheduled time occurs. If retry_count \u003e 0 and a job attempt fails, the job will be tried a total of retry_count times, with exponential backoff, until the next scheduled start time. If retry_count is 0, a job attempt will not be retried if it fails. Instead the Cloud Scheduler system will wait for the next scheduled execution time. Setting retry_count to 0 does not prevent failed jobs from running according to schedule after the failure.", "type": "string" }, "scheduleTime": { @@ -834,7 +834,7 @@ "type": "string" }, "retryCount": { - "description": "The number of attempts that the system will make to run a job using the exponential backoff procedure described by max_doublings. The default value of retry_count is zero. If retry_count is zero, a job attempt will *not* be retried if it fails. Instead the Cloud Scheduler system will wait for the next scheduled execution time. If retry_count is set to a non-zero number then Cloud Scheduler will retry failed attempts, using exponential backoff, retry_count times, or until the next scheduled execution time, whichever comes first. Values greater than 5 and negative values are not allowed.", + "description": "The number of attempts that the system will make to run a job using the exponential backoff procedure described by max_doublings. The default value of retry_count is zero. If retry_count is 0, a job attempt will not be retried if it fails. Instead the Cloud Scheduler system will wait for the next scheduled execution time. Setting retry_count to 0 does not prevent failed jobs from running according to schedule after the failure. If retry_count is set to a non-zero number then Cloud Scheduler will retry failed attempts, using exponential backoff, retry_count times, or until the next scheduled execution time, whichever comes first. Values greater than 5 and negative values are not allowed.", "format": "int32", "type": "integer" } diff --git a/cloudscheduler/v1/cloudscheduler-gen.go b/cloudscheduler/v1/cloudscheduler-gen.go index 6eae6d691ff..500f5f0f981 100644 --- a/cloudscheduler/v1/cloudscheduler-gen.go +++ b/cloudscheduler/v1/cloudscheduler-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/scheduler/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudschedulerService, err := cloudscheduler.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudschedulerService, err := cloudscheduler.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudschedulerService, err := cloudscheduler.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudscheduler // import "google.golang.org/api/cloudscheduler/v1" import ( @@ -516,7 +529,11 @@ type Job struct { // execution has not ended when its scheduled time occurs. If // retry_count > 0 and a job attempt fails, the job will be tried a // total of retry_count times, with exponential backoff, until the next - // scheduled start time. + // scheduled start time. If retry_count is 0, a job attempt will not be + // retried if it fails. Instead the Cloud Scheduler system will wait for + // the next scheduled execution time. Setting retry_count to 0 does not + // prevent failed jobs from running according to schedule after the + // failure. Schedule string `json:"schedule,omitempty"` // ScheduleTime: Output only. The next time the job is scheduled. Note @@ -944,13 +961,14 @@ type RetryConfig struct { // RetryCount: The number of attempts that the system will make to run a // job using the exponential backoff procedure described by // max_doublings. The default value of retry_count is zero. If - // retry_count is zero, a job attempt will *not* be retried if it fails. + // retry_count is 0, a job attempt will not be retried if it fails. // Instead the Cloud Scheduler system will wait for the next scheduled - // execution time. If retry_count is set to a non-zero number then Cloud - // Scheduler will retry failed attempts, using exponential backoff, - // retry_count times, or until the next scheduled execution time, - // whichever comes first. Values greater than 5 and negative values are - // not allowed. + // execution time. Setting retry_count to 0 does not prevent failed jobs + // from running according to schedule after the failure. If retry_count + // is set to a non-zero number then Cloud Scheduler will retry failed + // attempts, using exponential backoff, retry_count times, or until the + // next scheduled execution time, whichever comes first. Values greater + // than 5 and negative values are not allowed. RetryCount int64 `json:"retryCount,omitempty"` // ForceSendFields is a list of field names (e.g. "MaxBackoffDuration") diff --git a/cloudscheduler/v1beta1/cloudscheduler-api.json b/cloudscheduler/v1beta1/cloudscheduler-api.json index 378c68f551b..a2584207875 100644 --- a/cloudscheduler/v1beta1/cloudscheduler-api.json +++ b/cloudscheduler/v1beta1/cloudscheduler-api.json @@ -433,7 +433,7 @@ } } }, - "revision": "20230707", + "revision": "20230816", "rootUrl": "https://cloudscheduler.googleapis.com/", "schemas": { "AppEngineHttpTarget": { @@ -615,7 +615,7 @@ "description": "Settings that determine the retry behavior." }, "schedule": { - "description": "Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) * English-like [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. A scheduled start time will be delayed if the previous execution has not ended when its scheduled time occurs. If retry_count \u003e 0 and a job attempt fails, the job will be tried a total of retry_count times, with exponential backoff, until the next scheduled start time.", + "description": "Required, except when used with UpdateJob. Describes the schedule on which the job will be executed. The schedule can be either of the following types: * [Crontab](https://en.wikipedia.org/wiki/Cron#Overview) * English-like [schedule](https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) As a general rule, execution `n + 1` of a job will not begin until execution `n` has finished. Cloud Scheduler will never allow two simultaneously outstanding executions. For example, this implies that if the `n+1`th execution is scheduled to run at 16:00 but the `n`th execution takes until 16:15, the `n+1`th execution will not start until `16:15`. A scheduled start time will be delayed if the previous execution has not ended when its scheduled time occurs. If retry_count \u003e 0 and a job attempt fails, the job will be tried a total of retry_count times, with exponential backoff, until the next scheduled start time. If retry_count is 0, a job attempt will not be retried if it fails. Instead the Cloud Scheduler system will wait for the next scheduled execution time. Setting retry_count to 0 does not prevent failed jobs from running according to schedule after the failure.", "type": "string" }, "scheduleTime": { @@ -853,7 +853,7 @@ "type": "string" }, "retryCount": { - "description": "The number of attempts that the system will make to run a job using the exponential backoff procedure described by max_doublings. The default value of retry_count is zero. If retry_count is zero, a job attempt will *not* be retried if it fails. Instead the Cloud Scheduler system will wait for the next scheduled execution time. If retry_count is set to a non-zero number then Cloud Scheduler will retry failed attempts, using exponential backoff, retry_count times, or until the next scheduled execution time, whichever comes first. Values greater than 5 and negative values are not allowed.", + "description": "The number of attempts that the system will make to run a job using the exponential backoff procedure described by max_doublings. The default value of retry_count is zero. If retry_count is 0, a job attempt will not be retried if it fails. Instead the Cloud Scheduler system will wait for the next scheduled execution time. Setting retry_count to 0 does not prevent failed jobs from running according to schedule after the failure. If retry_count is set to a non-zero number then Cloud Scheduler will retry failed attempts, using exponential backoff, retry_count times, or until the next scheduled execution time, whichever comes first. Values greater than 5 and negative values are not allowed.", "format": "int32", "type": "integer" } diff --git a/cloudscheduler/v1beta1/cloudscheduler-gen.go b/cloudscheduler/v1beta1/cloudscheduler-gen.go index 061bb25a436..3e6183c374e 100644 --- a/cloudscheduler/v1beta1/cloudscheduler-gen.go +++ b/cloudscheduler/v1beta1/cloudscheduler-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/scheduler/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudschedulerService, err := cloudscheduler.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudschedulerService, err := cloudscheduler.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudschedulerService, err := cloudscheduler.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudscheduler // import "google.golang.org/api/cloudscheduler/v1beta1" import ( @@ -523,7 +536,11 @@ type Job struct { // execution has not ended when its scheduled time occurs. If // retry_count > 0 and a job attempt fails, the job will be tried a // total of retry_count times, with exponential backoff, until the next - // scheduled start time. + // scheduled start time. If retry_count is 0, a job attempt will not be + // retried if it fails. Instead the Cloud Scheduler system will wait for + // the next scheduled execution time. Setting retry_count to 0 does not + // prevent failed jobs from running according to schedule after the + // failure. Schedule string `json:"schedule,omitempty"` // ScheduleTime: Output only. The next time the job is scheduled. Note @@ -951,13 +968,14 @@ type RetryConfig struct { // RetryCount: The number of attempts that the system will make to run a // job using the exponential backoff procedure described by // max_doublings. The default value of retry_count is zero. If - // retry_count is zero, a job attempt will *not* be retried if it fails. + // retry_count is 0, a job attempt will not be retried if it fails. // Instead the Cloud Scheduler system will wait for the next scheduled - // execution time. If retry_count is set to a non-zero number then Cloud - // Scheduler will retry failed attempts, using exponential backoff, - // retry_count times, or until the next scheduled execution time, - // whichever comes first. Values greater than 5 and negative values are - // not allowed. + // execution time. Setting retry_count to 0 does not prevent failed jobs + // from running according to schedule after the failure. If retry_count + // is set to a non-zero number then Cloud Scheduler will retry failed + // attempts, using exponential backoff, retry_count times, or until the + // next scheduled execution time, whichever comes first. Values greater + // than 5 and negative values are not allowed. RetryCount int64 `json:"retryCount,omitempty"` // ForceSendFields is a list of field names (e.g. "MaxBackoffDuration") diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index c18b9122de1..c6c79772263 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -2096,7 +2096,7 @@ } } }, - "revision": "20230809", + "revision": "20230831", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "Action": { @@ -7391,7 +7391,7 @@ "type": "array" }, "snippet": { - "description": "The snippet of the document. The snippet of the document. May contain escaped HTML character that should be unescaped prior to rendering.", + "description": "The snippet of the document. May contain escaped HTML character that should be unescaped prior to rendering.", "type": "string" } }, diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index 0dd91adead5..227bae89300 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/cloud-search/docs/guides/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudsearchService, err := cloudsearch.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudsearchService, err := cloudsearch.NewService(ctx, option.WithScopes(cloudsearch.CloudSearchStatsIndexingScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudsearchService, err := cloudsearch.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudsearchService, err := cloudsearch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudsearch // import "google.golang.org/api/cloudsearch/v1" import ( @@ -8802,9 +8816,8 @@ type Snippet struct { // MatchRanges: The matched ranges in the snippet. MatchRanges []*MatchRange `json:"matchRanges,omitempty"` - // Snippet: The snippet of the document. The snippet of the document. - // May contain escaped HTML character that should be unescaped prior to - // rendering. + // Snippet: The snippet of the document. May contain escaped HTML + // character that should be unescaped prior to rendering. Snippet string `json:"snippet,omitempty"` // ForceSendFields is a list of field names (e.g. "MatchRanges") to diff --git a/cloudshell/v1/cloudshell-gen.go b/cloudshell/v1/cloudshell-gen.go index 7e081cb71ee..489e6270c1b 100644 --- a/cloudshell/v1/cloudshell-gen.go +++ b/cloudshell/v1/cloudshell-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/shell/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudshellService, err := cloudshell.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudshellService, err := cloudshell.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudshellService, err := cloudshell.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudshell // import "google.golang.org/api/cloudshell/v1" import ( diff --git a/cloudsupport/v2/cloudsupport-api.json b/cloudsupport/v2/cloudsupport-api.json index dc9fbc8aa70..4894cc16ac4 100644 --- a/cloudsupport/v2/cloudsupport-api.json +++ b/cloudsupport/v2/cloudsupport-api.json @@ -172,7 +172,7 @@ ] }, "create": { - "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", + "description": "Create a new case and associate it with a Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases", "httpMethod": "POST", "id": "cloudsupport.cases.create", @@ -373,7 +373,7 @@ "attachments": { "methods": { "list": { - "description": "Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ```", + "description": "List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .attachments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/attachments", "httpMethod": "GET", "id": "cloudsupport.cases.attachments.list", @@ -393,7 +393,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of Case object for which attachments should be listed.", + "description": "Required. The name of the case for which attachments should be listed.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -413,7 +413,7 @@ "comments": { "methods": { "create": { - "description": "Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + "description": "Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .create( parent=\"projects/some-project/cases/43595344\", body={\"body\": \"This is a test comment.\"}, ) ) print(request.execute()) ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/comments", "httpMethod": "POST", "id": "cloudsupport.cases.comments.create", @@ -422,7 +422,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of Case to which this comment should be added.", + "description": "Required. The name of the case to which the comment should be added.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -441,7 +441,7 @@ ] }, "list": { - "description": "Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + "description": "List all the comments associated with a case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/comments", "httpMethod": "GET", "id": "cloudsupport.cases.comments.list", @@ -450,18 +450,18 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of comments fetched with each request. Defaults to 10.", + "description": "The maximum number of comments to fetch. Defaults to 10.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A token identifying the page of results to return. If unspecified, the first page is retrieved.", + "description": "A token identifying the page of results to return. If unspecified, the first page is returned.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of Case object for which comments should be listed.", + "description": "Required. The name of the case for which to list comments.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -483,7 +483,7 @@ "media": { "methods": { "download": { - "description": "Download a file attachment on a case. Note: HTTP requests must append \"?alt=media\" to the URL. Here is an example of calling this endpoint using cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ```", + "description": "Download a file attached to a case. Note: HTTP requests must append \"?alt=media\" to the URL. EXAMPLES: cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = supportApiService.media().download( name=\"projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR\" ) request.uri = request.uri.split(\"?\")[0] + \"?alt=media\" print(request.execute()) ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/attachments/{attachmentsId}:download", "httpMethod": "GET", "id": "cloudsupport.media.download", @@ -492,7 +492,7 @@ ], "parameters": { "name": { - "description": "The resource name of the attachment to be downloaded.", + "description": "The name of the file attachment to download.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+/attachments/[^/]+$", "required": true, @@ -510,7 +510,7 @@ "useMediaDownloadService": true }, "upload": { - "description": "Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ```", + "description": "Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) file_path = \"./example_file.txt\" with open(file_path, \"w\") as file: file.write( \"This text is inside a file I'm going to upload using the Cloud Support API.\", ) request = supportApiService.media().upload( parent=\"projects/some-project/cases/43595344\", media_body=file_path ) request.uri = request.uri.split(\"?\")[0] + \"?attachment.filename=uploaded_via_python.txt\" print(request.execute()) ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/attachments", "httpMethod": "POST", "id": "cloudsupport.media.upload", @@ -530,7 +530,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the case (or case parent) to which the attachment should be attached.", + "description": "Required. The name of the case or Cloud resource to which the attachment should be attached.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -552,7 +552,7 @@ } } }, - "revision": "20230725", + "revision": "20230905", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { @@ -1062,14 +1062,14 @@ "id": "ListAttachmentsResponse", "properties": { "attachments": { - "description": "The list of attachments associated with the given case.", + "description": "The list of attachments associated with a case.", "items": { "$ref": "Attachment" }, "type": "array" }, "nextPageToken": { - "description": "A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `cases.attachments.list` requests. If unspecified, there are no more results to retrieve.", + "description": "A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.attachments.list` requests. If unspecified, there are no more results to retrieve.", "type": "string" } }, @@ -1098,14 +1098,14 @@ "id": "ListCommentsResponse", "properties": { "comments": { - "description": "The list of Comments associated with the given Case.", + "description": "List of the comments associated with the case.", "items": { "$ref": "Comment" }, "type": "array" }, "nextPageToken": { - "description": "A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `ListCommentsRequest` message that is issued. If unspecified, there are no more results to retrieve.", + "description": "A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.comments.list` requests. If unspecified, there are no more results to retrieve.", "type": "string" } }, diff --git a/cloudsupport/v2/cloudsupport-gen.go b/cloudsupport/v2/cloudsupport-gen.go index 303b6c159e2..83f28bfe6f9 100644 --- a/cloudsupport/v2/cloudsupport-gen.go +++ b/cloudsupport/v2/cloudsupport-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/support/docs/apis // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudsupportService, err := cloudsupport.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudsupportService, err := cloudsupport.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudsupportService, err := cloudsupport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudsupport // import "google.golang.org/api/cloudsupport/v2" import ( @@ -968,13 +981,12 @@ func (s *Escalation) MarshalJSON() ([]byte, error) { // ListAttachmentsResponse: The response message for the ListAttachments // endpoint. type ListAttachmentsResponse struct { - // Attachments: The list of attachments associated with the given case. + // Attachments: The list of attachments associated with a case. Attachments []*Attachment `json:"attachments,omitempty"` - // NextPageToken: A token to retrieve the next page of results. This - // should be set in the `page_token` field of subsequent - // `cases.attachments.list` requests. If unspecified, there are no more - // results to retrieve. + // NextPageToken: A token to retrieve the next page of results. Set this + // in the `page_token` field of subsequent `cases.attachments.list` + // requests. If unspecified, there are no more results to retrieve. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1046,13 +1058,12 @@ func (s *ListCasesResponse) MarshalJSON() ([]byte, error) { // ListCommentsResponse: The response message for the ListComments // endpoint. type ListCommentsResponse struct { - // Comments: The list of Comments associated with the given Case. + // Comments: List of the comments associated with the case. Comments []*Comment `json:"comments,omitempty"` - // NextPageToken: A token to retrieve the next page of results. This - // should be set in the `page_token` field of subsequent - // `ListCommentsRequest` message that is issued. If unspecified, there - // are no more results to retrieve. + // NextPageToken: A token to retrieve the next page of results. Set this + // in the `page_token` field of subsequent `cases.comments.list` + // requests. If unspecified, there are no more results to retrieve. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1765,15 +1776,16 @@ type CasesCreateCall struct { header_ http.Header } -// Create: Create a new case and associate it with the given Google -// Cloud Resource. The case object must have the following fields set: -// `display_name`, `description`, `classification`, and `priority`. Here -// is an example of calling this endpoint using cURL: ```shell -// parent="projects/some-project" curl \ --request POST \ --header -// "Authorization: Bearer $(gcloud auth print-access-token)" \ --header -// 'Content-Type: application/json' \ --data '{ "display_name": "Test -// case created by me.", "description": "a random test case, feel free -// to close", "classification": { "id": +// Create: Create a new case and associate it with a Google Cloud +// Resource. The case object must have the following fields set: +// `display_name`, `description`, `classification`, and `priority`. If +// you're just testing the API and don't want to route your case to an +// agent, set `testCase=true`. Here is an example of calling this +// endpoint using cURL: ```shell parent="projects/some-project" curl \ +// --request POST \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ --header 'Content-Type: application/json' \ +// --data '{ "display_name": "Test case created by me.", "description": +// "a random test case, feel free to close", "classification": { "id": // "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2 // TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": // "-07:00", "subscriber_email_addresses": [ "foo@domain.com", @@ -1880,7 +1892,7 @@ func (c *CasesCreateCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", + // "description": "Create a new case and associate it with a Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases", // "httpMethod": "POST", // "id": "cloudsupport.cases.create", @@ -2849,14 +2861,21 @@ type CasesAttachmentsListCall struct { header_ http.Header } -// List: Retrieve all attachments associated with a support case. Here -// is an example of calling this endpoint using cURL: ```shell -// case="projects/some-project/cases/23598314" curl \ --header -// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// List: List all the attachments associated with a support case. +// EXAMPLES: cURL: ```shell case="projects/some-project/cases/23598314" +// curl \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ // "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` +// Python: ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = ( supportApiService.cases() +// .attachments() .list(parent="projects/some-project/cases/43595344") ) +// print(request.execute()) ``` // -// - parent: The resource name of Case object for which attachments -// should be listed. +// - parent: The name of the case for which attachments should be +// listed. func (r *CasesAttachmentsService) List(parent string) *CasesAttachmentsListCall { c := &CasesAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2978,7 +2997,7 @@ func (c *CasesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListAttach } return ret, nil // { - // "description": "Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ```", + // "description": "List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .attachments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/attachments", // "httpMethod": "GET", // "id": "cloudsupport.cases.attachments.list", @@ -2998,7 +3017,7 @@ func (c *CasesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListAttach // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of Case object for which attachments should be listed.", + // "description": "Required. The name of the case for which attachments should be listed.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, @@ -3048,17 +3067,23 @@ type CasesCommentsCreateCall struct { header_ http.Header } -// Create: Add a new comment to the specified Case. The comment object -// must have the following fields set: body. Here is an example of -// calling this endpoint using cURL: ```shell +// Create: Add a new comment to a case. The comment must have the +// following fields set: `body`. EXAMPLES: cURL: ```shell // case="projects/some-project/cases/43591344" curl \ --request POST \ // --header "Authorization: Bearer $(gcloud auth print-access-token)" \ // --header 'Content-Type: application/json' \ --data '{ "body": "This // is a test comment." }' \ -// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` +// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: +// ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = ( supportApiService.cases() +// .comments() .create( parent="projects/some-project/cases/43595344", +// body={"body": "This is a test comment."}, ) ) +// print(request.execute()) ``` // -// - parent: The resource name of Case to which this comment should be -// added. +// - parent: The name of the case to which the comment should be added. func (r *CasesCommentsService) Create(parent string, comment *Comment) *CasesCommentsCreateCall { c := &CasesCommentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3157,7 +3182,7 @@ func (c *CasesCommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, er } return ret, nil // { - // "description": "Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + // "description": "Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .create( parent=\"projects/some-project/cases/43595344\", body={\"body\": \"This is a test comment.\"}, ) ) print(request.execute()) ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/comments", // "httpMethod": "POST", // "id": "cloudsupport.cases.comments.create", @@ -3166,7 +3191,7 @@ func (c *CasesCommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, er // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of Case to which this comment should be added.", + // "description": "Required. The name of the case to which the comment should be added.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, @@ -3198,14 +3223,19 @@ type CasesCommentsListCall struct { header_ http.Header } -// List: Retrieve all comments associated with the Case object. Here is -// an example of calling this endpoint using cURL: ```shell -// case="projects/cloud-support-qa-premium/cases/43595344" curl \ -// --header "Authorization: Bearer $(gcloud auth print-access-token)" \ -// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` +// List: List all the comments associated with a case. EXAMPLES: cURL: +// ```shell case="projects/some-project/cases/43595344" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: +// ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = ( supportApiService.cases() +// .comments() .list(parent="projects/some-project/cases/43595344") ) +// print(request.execute()) ``` // -// - parent: The resource name of Case object for which comments should -// be listed. +// - parent: The name of the case for which to list comments. func (r *CasesCommentsService) List(parent string) *CasesCommentsListCall { c := &CasesCommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3213,7 +3243,7 @@ func (r *CasesCommentsService) List(parent string) *CasesCommentsListCall { } // PageSize sets the optional parameter "pageSize": The maximum number -// of comments fetched with each request. Defaults to 10. +// of comments to fetch. Defaults to 10. func (c *CasesCommentsListCall) PageSize(pageSize int64) *CasesCommentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3221,7 +3251,7 @@ func (c *CasesCommentsListCall) PageSize(pageSize int64) *CasesCommentsListCall // PageToken sets the optional parameter "pageToken": A token // identifying the page of results to return. If unspecified, the first -// page is retrieved. +// page is returned. func (c *CasesCommentsListCall) PageToken(pageToken string) *CasesCommentsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -3326,7 +3356,7 @@ func (c *CasesCommentsListCall) Do(opts ...googleapi.CallOption) (*ListCommentsR } return ret, nil // { - // "description": "Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + // "description": "List all the comments associated with a case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/comments", // "httpMethod": "GET", // "id": "cloudsupport.cases.comments.list", @@ -3335,18 +3365,18 @@ func (c *CasesCommentsListCall) Do(opts ...googleapi.CallOption) (*ListCommentsR // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of comments fetched with each request. Defaults to 10.", + // "description": "The maximum number of comments to fetch. Defaults to 10.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A token identifying the page of results to return. If unspecified, the first page is retrieved.", + // "description": "A token identifying the page of results to return. If unspecified, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of Case object for which comments should be listed.", + // "description": "Required. The name of the case for which to list comments.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, @@ -3396,15 +3426,23 @@ type MediaDownloadCall struct { header_ http.Header } -// Download: Download a file attachment on a case. Note: HTTP requests -// must append "?alt=media" to the URL. Here is an example of calling -// this endpoint using cURL: ```shell +// Download: Download a file attached to a case. Note: HTTP requests +// must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell // name="projects/some-project/cases/43594844/attachments/0674M00000WijAn // ZAJ" curl \ --header "Authorization: Bearer $(gcloud auth // print-access-token)" \ // "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` +// Python: ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = +// supportApiService.media().download( +// name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pH +// QAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" +// print(request.execute()) ``` // -// - name: The resource name of the attachment to be downloaded. +// - name: The name of the file attachment to download. func (r *MediaService) Download(name string) *MediaDownloadCall { c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3526,7 +3564,7 @@ func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error) { } return ret, nil // { - // "description": "Download a file attachment on a case. Note: HTTP requests must append \"?alt=media\" to the URL. Here is an example of calling this endpoint using cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ```", + // "description": "Download a file attached to a case. Note: HTTP requests must append \"?alt=media\" to the URL. EXAMPLES: cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = supportApiService.media().download( name=\"projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR\" ) request.uri = request.uri.split(\"?\")[0] + \"?alt=media\" print(request.execute()) ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/attachments/{attachmentsId}:download", // "httpMethod": "GET", // "id": "cloudsupport.media.download", @@ -3535,7 +3573,7 @@ func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error) { // ], // "parameters": { // "name": { - // "description": "The resource name of the attachment to be downloaded.", + // "description": "The name of the file attachment to download.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+/attachments/[^/]+$", // "required": true, @@ -3568,16 +3606,28 @@ type MediaUploadCall struct { } // Upload: Create a file attachment on a case or Cloud resource. The -// attachment object must have the following fields set: filename. Here -// is an example of calling this endpoint using cURL: ```shell echo -// "This text is in a file I'm uploading using CSAPI." \ > -// "./example_file.txt" case="projects/some-project/cases/43594844" curl -// \ --header "Authorization: Bearer $(gcloud auth print-access-token)" -// \ --data-binary @"./example_file.txt" \ +// attachment must have the following fields set: `filename`. EXAMPLES: +// cURL: ```shell echo "This text is in a file I'm uploading using +// CSAPI." \ > "./example_file.txt" +// case="projects/some-project/cases/43594844" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// --data-binary @"./example_file.txt" \ // "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?a -// ttachment.filename=uploaded_via_curl.txt" ``` +// ttachment.filename=uploaded_via_curl.txt" ``` Python: ```python +// import googleapiclient.discovery api_version = "v2" supportApiService +// = googleapiclient.discovery.build( serviceName="cloudsupport", +// version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) file_path = "./example_file.txt" with +// open(file_path, "w") as file: file.write( "This text is inside a file +// I'm going to upload using the Cloud Support API.", ) request = +// supportApiService.media().upload( +// parent="projects/some-project/cases/43595344", media_body=file_path ) +// request.uri = request.uri.split("?")[0] + +// "?attachment.filename=uploaded_via_python.txt" +// print(request.execute()) ``` // -// - parent: The resource name of the case (or case parent) to which the +// - parent: The name of the case or Cloud resource to which the // attachment should be attached. func (r *MediaService) Upload(parent string, createattachmentrequest *CreateAttachmentRequest) *MediaUploadCall { c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3744,7 +3794,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Attachment, error) } return ret, nil // { - // "description": "Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ```", + // "description": "Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) file_path = \"./example_file.txt\" with open(file_path, \"w\") as file: file.write( \"This text is inside a file I'm going to upload using the Cloud Support API.\", ) request = supportApiService.media().upload( parent=\"projects/some-project/cases/43595344\", media_body=file_path ) request.uri = request.uri.split(\"?\")[0] + \"?attachment.filename=uploaded_via_python.txt\" print(request.execute()) ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}/attachments", // "httpMethod": "POST", // "id": "cloudsupport.media.upload", @@ -3764,7 +3814,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Attachment, error) // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the case (or case parent) to which the attachment should be attached.", + // "description": "Required. The name of the case or Cloud resource to which the attachment should be attached.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, diff --git a/cloudsupport/v2beta/cloudsupport-api.json b/cloudsupport/v2beta/cloudsupport-api.json index 148755d974e..e783af03839 100644 --- a/cloudsupport/v2beta/cloudsupport-api.json +++ b/cloudsupport/v2beta/cloudsupport-api.json @@ -172,7 +172,7 @@ ] }, "create": { - "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", + "description": "Create a new case and associate it with a Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases", "httpMethod": "POST", "id": "cloudsupport.cases.create", @@ -369,7 +369,7 @@ "attachments": { "methods": { "list": { - "description": "Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ```", + "description": "List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .attachments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments", "httpMethod": "GET", "id": "cloudsupport.cases.attachments.list", @@ -389,7 +389,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of Case object for which attachments should be listed.", + "description": "Required. The name of the case for which attachments should be listed.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -409,7 +409,7 @@ "comments": { "methods": { "create": { - "description": "Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + "description": "Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .create( parent=\"projects/some-project/cases/43595344\", body={\"body\": \"This is a test comment.\"}, ) ) print(request.execute()) ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/comments", "httpMethod": "POST", "id": "cloudsupport.cases.comments.create", @@ -418,7 +418,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of Case to which this comment should be added.", + "description": "Required. The name of the case to which the comment should be added.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -437,7 +437,7 @@ ] }, "list": { - "description": "Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + "description": "List all the comments associated with a case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/comments", "httpMethod": "GET", "id": "cloudsupport.cases.comments.list", @@ -446,18 +446,18 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of comments fetched with each request. Defaults to 10.", + "description": "The maximum number of comments to fetch. Defaults to 10.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "A token identifying the page of results to return. If unspecified, the first page is retrieved.", + "description": "A token identifying the page of results to return. If unspecified, the first page is returned.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The resource name of Case object for which comments should be listed.", + "description": "Required. The name of the case for which to list comments.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -479,7 +479,7 @@ "media": { "methods": { "download": { - "description": "Download a file attachment on a case. Note: HTTP requests must append \"?alt=media\" to the URL. Here is an example of calling this endpoint using cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ```", + "description": "Download a file attached to a case. Note: HTTP requests must append \"?alt=media\" to the URL. EXAMPLES: cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = supportApiService.media().download( name=\"projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR\" ) request.uri = request.uri.split(\"?\")[0] + \"?alt=media\" print(request.execute()) ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments/{attachmentsId}:download", "httpMethod": "GET", "id": "cloudsupport.media.download", @@ -488,7 +488,7 @@ ], "parameters": { "name": { - "description": "The resource name of the attachment to be downloaded.", + "description": "The name of the file attachment to download.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+/attachments/[^/]+$", "required": true, @@ -506,7 +506,7 @@ "useMediaDownloadService": true }, "upload": { - "description": "Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ```", + "description": "Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) file_path = \"./example_file.txt\" with open(file_path, \"w\") as file: file.write( \"This text is inside a file I'm going to upload using the Cloud Support API.\", ) request = supportApiService.media().upload( parent=\"projects/some-project/cases/43595344\", media_body=file_path ) request.uri = request.uri.split(\"?\")[0] + \"?attachment.filename=uploaded_via_python.txt\" print(request.execute()) ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments", "httpMethod": "POST", "id": "cloudsupport.media.upload", @@ -526,7 +526,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the case (or case parent) to which the attachment should be attached.", + "description": "Required. The name of the case or Cloud resource to which the attachment should be attached.", "location": "path", "pattern": "^[^/]+/[^/]+/cases/[^/]+$", "required": true, @@ -548,7 +548,7 @@ } } }, - "revision": "20230725", + "revision": "20230905", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { @@ -1078,14 +1078,14 @@ "id": "ListAttachmentsResponse", "properties": { "attachments": { - "description": "The list of attachments associated with the given case.", + "description": "The list of attachments associated with a case.", "items": { "$ref": "Attachment" }, "type": "array" }, "nextPageToken": { - "description": "A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `cases.attachments.list` requests. If unspecified, there are no more results to retrieve.", + "description": "A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.attachments.list` requests. If unspecified, there are no more results to retrieve.", "type": "string" } }, @@ -1114,14 +1114,14 @@ "id": "ListCommentsResponse", "properties": { "comments": { - "description": "The list of Comments associated with the given Case.", + "description": "List of the comments associated with the case.", "items": { "$ref": "Comment" }, "type": "array" }, "nextPageToken": { - "description": "A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `ListCommentsRequest` message that is issued. If unspecified, there are no more results to retrieve.", + "description": "A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.comments.list` requests. If unspecified, there are no more results to retrieve.", "type": "string" } }, diff --git a/cloudsupport/v2beta/cloudsupport-gen.go b/cloudsupport/v2beta/cloudsupport-gen.go index 6b8197136d8..a98e6ad3987 100644 --- a/cloudsupport/v2beta/cloudsupport-gen.go +++ b/cloudsupport/v2beta/cloudsupport-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/support/docs/apis // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // cloudsupportService, err := cloudsupport.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudsupportService, err := cloudsupport.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudsupportService, err := cloudsupport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudsupport // import "google.golang.org/api/cloudsupport/v2beta" import ( @@ -985,13 +998,12 @@ func (s *Escalation) MarshalJSON() ([]byte, error) { // ListAttachmentsResponse: The response message for the ListAttachments // endpoint. type ListAttachmentsResponse struct { - // Attachments: The list of attachments associated with the given case. + // Attachments: The list of attachments associated with a case. Attachments []*Attachment `json:"attachments,omitempty"` - // NextPageToken: A token to retrieve the next page of results. This - // should be set in the `page_token` field of subsequent - // `cases.attachments.list` requests. If unspecified, there are no more - // results to retrieve. + // NextPageToken: A token to retrieve the next page of results. Set this + // in the `page_token` field of subsequent `cases.attachments.list` + // requests. If unspecified, there are no more results to retrieve. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1063,13 +1075,12 @@ func (s *ListCasesResponse) MarshalJSON() ([]byte, error) { // ListCommentsResponse: The response message for the ListComments // endpoint. type ListCommentsResponse struct { - // Comments: The list of Comments associated with the given Case. + // Comments: List of the comments associated with the case. Comments []*Comment `json:"comments,omitempty"` - // NextPageToken: A token to retrieve the next page of results. This - // should be set in the `page_token` field of subsequent - // `ListCommentsRequest` message that is issued. If unspecified, there - // are no more results to retrieve. + // NextPageToken: A token to retrieve the next page of results. Set this + // in the `page_token` field of subsequent `cases.comments.list` + // requests. If unspecified, there are no more results to retrieve. NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1782,15 +1793,16 @@ type CasesCreateCall struct { header_ http.Header } -// Create: Create a new case and associate it with the given Google -// Cloud Resource. The case object must have the following fields set: -// `display_name`, `description`, `classification`, and `priority`. Here -// is an example of calling this endpoint using cURL: ```shell -// parent="projects/some-project" curl \ --request POST \ --header -// "Authorization: Bearer $(gcloud auth print-access-token)" \ --header -// 'Content-Type: application/json' \ --data '{ "display_name": "Test -// case created by me.", "description": "a random test case, feel free -// to close", "classification": { "id": +// Create: Create a new case and associate it with a Google Cloud +// Resource. The case object must have the following fields set: +// `display_name`, `description`, `classification`, and `priority`. If +// you're just testing the API and don't want to route your case to an +// agent, set `testCase=true`. Here is an example of calling this +// endpoint using cURL: ```shell parent="projects/some-project" curl \ +// --request POST \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ --header 'Content-Type: application/json' \ +// --data '{ "display_name": "Test case created by me.", "description": +// "a random test case, feel free to close", "classification": { "id": // "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2 // TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": // "-07:00", "subscriber_email_addresses": [ "foo@domain.com", @@ -1897,7 +1909,7 @@ func (c *CasesCreateCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", + // "description": "Create a new case and associate it with a Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases", // "httpMethod": "POST", // "id": "cloudsupport.cases.create", @@ -2861,14 +2873,21 @@ type CasesAttachmentsListCall struct { header_ http.Header } -// List: Retrieve all attachments associated with a support case. Here -// is an example of calling this endpoint using cURL: ```shell -// case="projects/some-project/cases/23598314" curl \ --header -// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// List: List all the attachments associated with a support case. +// EXAMPLES: cURL: ```shell case="projects/some-project/cases/23598314" +// curl \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ // "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` +// Python: ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = ( supportApiService.cases() +// .attachments() .list(parent="projects/some-project/cases/43595344") ) +// print(request.execute()) ``` // -// - parent: The resource name of Case object for which attachments -// should be listed. +// - parent: The name of the case for which attachments should be +// listed. func (r *CasesAttachmentsService) List(parent string) *CasesAttachmentsListCall { c := &CasesAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2990,7 +3009,7 @@ func (c *CasesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListAttach } return ret, nil // { - // "description": "Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ```", + // "description": "List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .attachments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments", // "httpMethod": "GET", // "id": "cloudsupport.cases.attachments.list", @@ -3010,7 +3029,7 @@ func (c *CasesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListAttach // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of Case object for which attachments should be listed.", + // "description": "Required. The name of the case for which attachments should be listed.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, @@ -3060,17 +3079,23 @@ type CasesCommentsCreateCall struct { header_ http.Header } -// Create: Add a new comment to the specified Case. The comment object -// must have the following fields set: body. Here is an example of -// calling this endpoint using cURL: ```shell +// Create: Add a new comment to a case. The comment must have the +// following fields set: `body`. EXAMPLES: cURL: ```shell // case="projects/some-project/cases/43591344" curl \ --request POST \ // --header "Authorization: Bearer $(gcloud auth print-access-token)" \ // --header 'Content-Type: application/json' \ --data '{ "body": "This // is a test comment." }' \ -// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` +// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: +// ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = ( supportApiService.cases() +// .comments() .create( parent="projects/some-project/cases/43595344", +// body={"body": "This is a test comment."}, ) ) +// print(request.execute()) ``` // -// - parent: The resource name of Case to which this comment should be -// added. +// - parent: The name of the case to which the comment should be added. func (r *CasesCommentsService) Create(parent string, comment *Comment) *CasesCommentsCreateCall { c := &CasesCommentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3169,7 +3194,7 @@ func (c *CasesCommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, er } return ret, nil // { - // "description": "Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + // "description": "Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43591344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"body\": \"This is a test comment.\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .create( parent=\"projects/some-project/cases/43595344\", body={\"body\": \"This is a test comment.\"}, ) ) print(request.execute()) ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/comments", // "httpMethod": "POST", // "id": "cloudsupport.cases.comments.create", @@ -3178,7 +3203,7 @@ func (c *CasesCommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, er // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of Case to which this comment should be added.", + // "description": "Required. The name of the case to which the comment should be added.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, @@ -3210,14 +3235,19 @@ type CasesCommentsListCall struct { header_ http.Header } -// List: Retrieve all comments associated with the Case object. Here is -// an example of calling this endpoint using cURL: ```shell -// case="projects/cloud-support-qa-premium/cases/43595344" curl \ -// --header "Authorization: Bearer $(gcloud auth print-access-token)" \ -// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` +// List: List all the comments associated with a case. EXAMPLES: cURL: +// ```shell case="projects/some-project/cases/43595344" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: +// ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = ( supportApiService.cases() +// .comments() .list(parent="projects/some-project/cases/43595344") ) +// print(request.execute()) ``` // -// - parent: The resource name of Case object for which comments should -// be listed. +// - parent: The name of the case for which to list comments. func (r *CasesCommentsService) List(parent string) *CasesCommentsListCall { c := &CasesCommentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -3225,7 +3255,7 @@ func (r *CasesCommentsService) List(parent string) *CasesCommentsListCall { } // PageSize sets the optional parameter "pageSize": The maximum number -// of comments fetched with each request. Defaults to 10. +// of comments to fetch. Defaults to 10. func (c *CasesCommentsListCall) PageSize(pageSize int64) *CasesCommentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -3233,7 +3263,7 @@ func (c *CasesCommentsListCall) PageSize(pageSize int64) *CasesCommentsListCall // PageToken sets the optional parameter "pageToken": A token // identifying the page of results to return. If unspecified, the first -// page is retrieved. +// page is returned. func (c *CasesCommentsListCall) PageToken(pageToken string) *CasesCommentsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -3338,7 +3368,7 @@ func (c *CasesCommentsListCall) Do(opts ...googleapi.CallOption) (*ListCommentsR } return ret, nil // { - // "description": "Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ```", + // "description": "List all the comments associated with a case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .comments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/comments", // "httpMethod": "GET", // "id": "cloudsupport.cases.comments.list", @@ -3347,18 +3377,18 @@ func (c *CasesCommentsListCall) Do(opts ...googleapi.CallOption) (*ListCommentsR // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of comments fetched with each request. Defaults to 10.", + // "description": "The maximum number of comments to fetch. Defaults to 10.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A token identifying the page of results to return. If unspecified, the first page is retrieved.", + // "description": "A token identifying the page of results to return. If unspecified, the first page is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of Case object for which comments should be listed.", + // "description": "Required. The name of the case for which to list comments.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, @@ -3408,15 +3438,23 @@ type MediaDownloadCall struct { header_ http.Header } -// Download: Download a file attachment on a case. Note: HTTP requests -// must append "?alt=media" to the URL. Here is an example of calling -// this endpoint using cURL: ```shell +// Download: Download a file attached to a case. Note: HTTP requests +// must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell // name="projects/some-project/cases/43594844/attachments/0674M00000WijAn // ZAJ" curl \ --header "Authorization: Bearer $(gcloud auth // print-access-token)" \ // "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` +// Python: ```python import googleapiclient.discovery api_version = "v2" +// supportApiService = googleapiclient.discovery.build( +// serviceName="cloudsupport", version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) request = +// supportApiService.media().download( +// name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pH +// QAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" +// print(request.execute()) ``` // -// - name: The resource name of the attachment to be downloaded. +// - name: The name of the file attachment to download. func (r *MediaService) Download(name string) *MediaDownloadCall { c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3538,7 +3576,7 @@ func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error) { } return ret, nil // { - // "description": "Download a file attachment on a case. Note: HTTP requests must append \"?alt=media\" to the URL. Here is an example of calling this endpoint using cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ```", + // "description": "Download a file attached to a case. Note: HTTP requests must append \"?alt=media\" to the URL. EXAMPLES: cURL: ```shell name=\"projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$name:download?alt=media\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = supportApiService.media().download( name=\"projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR\" ) request.uri = request.uri.split(\"?\")[0] + \"?alt=media\" print(request.execute()) ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments/{attachmentsId}:download", // "httpMethod": "GET", // "id": "cloudsupport.media.download", @@ -3547,7 +3585,7 @@ func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error) { // ], // "parameters": { // "name": { - // "description": "The resource name of the attachment to be downloaded.", + // "description": "The name of the file attachment to download.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+/attachments/[^/]+$", // "required": true, @@ -3580,16 +3618,28 @@ type MediaUploadCall struct { } // Upload: Create a file attachment on a case or Cloud resource. The -// attachment object must have the following fields set: filename. Here -// is an example of calling this endpoint using cURL: ```shell echo -// "This text is in a file I'm uploading using CSAPI." \ > -// "./example_file.txt" case="projects/some-project/cases/43594844" curl -// \ --header "Authorization: Bearer $(gcloud auth print-access-token)" -// \ --data-binary @"./example_file.txt" \ +// attachment must have the following fields set: `filename`. EXAMPLES: +// cURL: ```shell echo "This text is in a file I'm uploading using +// CSAPI." \ > "./example_file.txt" +// case="projects/some-project/cases/43594844" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// --data-binary @"./example_file.txt" \ // "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?a -// ttachment.filename=uploaded_via_curl.txt" ``` +// ttachment.filename=uploaded_via_curl.txt" ``` Python: ```python +// import googleapiclient.discovery api_version = "v2" supportApiService +// = googleapiclient.discovery.build( serviceName="cloudsupport", +// version=api_version, +// discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/r +// est?version={api_version}", ) file_path = "./example_file.txt" with +// open(file_path, "w") as file: file.write( "This text is inside a file +// I'm going to upload using the Cloud Support API.", ) request = +// supportApiService.media().upload( +// parent="projects/some-project/cases/43595344", media_body=file_path ) +// request.uri = request.uri.split("?")[0] + +// "?attachment.filename=uploaded_via_python.txt" +// print(request.execute()) ``` // -// - parent: The resource name of the case (or case parent) to which the +// - parent: The name of the case or Cloud resource to which the // attachment should be attached. func (r *MediaService) Upload(parent string, createattachmentrequest *CreateAttachmentRequest) *MediaUploadCall { c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3756,7 +3806,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Attachment, error) } return ret, nil // { - // "description": "Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ```", + // "description": "Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo \"This text is in a file I'm uploading using CSAPI.\" \\ \u003e \"./example_file.txt\" case=\"projects/some-project/cases/43594844\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --data-binary @\"./example_file.txt\" \\ \"https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) file_path = \"./example_file.txt\" with open(file_path, \"w\") as file: file.write( \"This text is inside a file I'm going to upload using the Cloud Support API.\", ) request = supportApiService.media().upload( parent=\"projects/some-project/cases/43595344\", media_body=file_path ) request.uri = request.uri.split(\"?\")[0] + \"?attachment.filename=uploaded_via_python.txt\" print(request.execute()) ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments", // "httpMethod": "POST", // "id": "cloudsupport.media.upload", @@ -3776,7 +3826,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Attachment, error) // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the case (or case parent) to which the attachment should be attached.", + // "description": "Required. The name of the case or Cloud resource to which the attachment should be attached.", // "location": "path", // "pattern": "^[^/]+/[^/]+/cases/[^/]+$", // "required": true, diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index fa8efcd13df..56ace42ae3e 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/tasks/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // cloudtasksService, err := cloudtasks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudtasksService, err := cloudtasks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudtasksService, err := cloudtasks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudtasks // import "google.golang.org/api/cloudtasks/v2" import ( diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index 87dfa40e5d3..c9d7a050383 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/tasks/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // cloudtasksService, err := cloudtasks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudtasksService, err := cloudtasks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudtasksService, err := cloudtasks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudtasks // import "google.golang.org/api/cloudtasks/v2beta2" import ( diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index 837dd914a69..b3425817438 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/tasks/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // cloudtasksService, err := cloudtasks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudtasksService, err := cloudtasks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudtasksService, err := cloudtasks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudtasks // import "google.golang.org/api/cloudtasks/v2beta3" import ( diff --git a/cloudtrace/v1/cloudtrace-gen.go b/cloudtrace/v1/cloudtrace-gen.go index 764b70b0b5a..53771a90482 100644 --- a/cloudtrace/v1/cloudtrace-gen.go +++ b/cloudtrace/v1/cloudtrace-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/trace // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudtraceService, err := cloudtrace.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithScopes(cloudtrace.TraceReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudtrace // import "google.golang.org/api/cloudtrace/v1" import ( diff --git a/cloudtrace/v2/cloudtrace-gen.go b/cloudtrace/v2/cloudtrace-gen.go index 7431740e3e0..06ffd4eb32c 100644 --- a/cloudtrace/v2/cloudtrace-gen.go +++ b/cloudtrace/v2/cloudtrace-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/trace // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudtraceService, err := cloudtrace.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithScopes(cloudtrace.TraceAppendScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudtrace // import "google.golang.org/api/cloudtrace/v2" import ( diff --git a/cloudtrace/v2beta1/cloudtrace-gen.go b/cloudtrace/v2beta1/cloudtrace-gen.go index 24349cac9d4..3f0baccdabd 100644 --- a/cloudtrace/v2beta1/cloudtrace-gen.go +++ b/cloudtrace/v2beta1/cloudtrace-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/trace // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // cloudtraceService, err := cloudtrace.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithScopes(cloudtrace.TraceReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // cloudtraceService, err := cloudtrace.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package cloudtrace // import "google.golang.org/api/cloudtrace/v2beta1" import ( diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index 53465fc90c6..a218755c216 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/composer/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // composerService, err := composer.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // composerService, err := composer.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // composerService, err := composer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package composer // import "google.golang.org/api/composer/v1" import ( diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index b17536fc8e8..a96aed79646 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/composer/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // composerService, err := composer.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // composerService, err := composer.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // composerService, err := composer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package composer // import "google.golang.org/api/composer/v1beta1" import ( diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 4198b242d27..4bfa966c557 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -17939,6 +17939,48 @@ "https://www.googleapis.com/auth/compute" ] }, + "patchAssociation": { + "description": "Updates an association for the specified network firewall policy.", + "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation", + "httpMethod": "POST", + "id": "compute.networkFirewallPolicies.patchAssociation", + "parameterOrder": [ + "project", + "firewallPolicy" + ], + "parameters": { + "firewallPolicy": { + "description": "Name of the firewall policy to update.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation", + "request": { + "$ref": "FirewallPolicyAssociation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "patchRule": { "description": "Patches a rule of the specified priority.", "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule", @@ -32849,6 +32891,47 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getNetworkCapacityConstraints": { + "description": "Returns the network capacity constraints for the specified placement policies.", + "flatPath": "projects/{project}/regions/{region}/resourcePolicies/getNetworkCapacityConstraints", + "httpMethod": "POST", + "id": "compute.resourcePolicies.getNetworkCapacityConstraints", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resourcePolicies": { + "description": "Partial or full URL of the resource policies for which to retrieve the network capacity constraints.", + "location": "query", + "repeated": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/resourcePolicies/getNetworkCapacityConstraints", + "response": { + "$ref": "GetNetworkCapacityConstraintsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates a new resource policy.", "flatPath": "projects/{project}/regions/{region}/resourcePolicies", @@ -42183,7 +42266,7 @@ } } }, - "revision": "20230725", + "revision": "20230814", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -47169,6 +47252,55 @@ }, "type": "object" }, + "CapacityConstraint": { + "description": "Represents the network information between workload placements.", + "id": "CapacityConstraint", + "properties": { + "constraintMetadata": { + "enum": [ + "CONSTRAINT_TYPE_UNSPECIFIED", + "OFF_CHAIN_CONSTRAINT", + "ON_CHAIN_CONSTRAINT" + ], + "enumDescriptions": [ + "", + "Constraints for off-chain superblocks. Can be used to mark constraints for secondary workloads.", + "Constraints related to the capacity between the Astrophel chain superblocks." + ], + "type": "string" + }, + "maxSumGbps": { + "description": "Weighted sum of BandwidthTerms (each term is coefficient * term) must be less than or equal to max_sum.", + "format": "double", + "type": "number" + }, + "terms": { + "items": { + "$ref": "CapacityConstraintConstraintTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "CapacityConstraintConstraintTerm": { + "id": "CapacityConstraintConstraintTerm", + "properties": { + "coefficient": { + "description": "Coefficient of this term in the linear expression. The value of the term will be coefficient * (demand from src to dst in Gbps).", + "format": "double", + "type": "number" + }, + "destinationNode": { + "$ref": "PlacementLocation" + }, + "sourceNode": { + "$ref": "PlacementLocation", + "description": "Source and destination nodes." + } + }, + "type": "object" + }, "ChannelCredentials": { "description": "[Deprecated] gRPC channel credentials to access the SDS server. gRPC channel credentials to access the SDS server.", "id": "ChannelCredentials", @@ -48478,7 +48610,7 @@ "type": "string" }, "sizeGb": { - "description": "Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.", + "description": "Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.", "format": "int64", "type": "string" }, @@ -51263,6 +51395,10 @@ "description": "This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.", "type": "boolean" }, + "allowPscPacketInjection": { + "description": "This is used in PSC consumer ForwardingRule to control whether the producer is allowed to inject packets into the consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC forwarding rules should not use this field.", + "type": "boolean" + }, "backendService": { "description": "Identifies the backend service to which the forwarding rule sends traffic. Required for Internal TCP/UDP Load Balancing and Network Load Balancing; must be omitted for all other load balancer types.", "type": "string" @@ -51290,7 +51426,7 @@ "type": "string" }, "ipCollection": { - "description": "Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/ project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name ", + "description": "Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name ", "type": "string" }, "ipVersion": { @@ -52724,6 +52860,19 @@ }, "type": "object" }, + "GetNetworkCapacityConstraintsResponse": { + "id": "GetNetworkCapacityConstraintsResponse", + "properties": { + "capacityConstraints": { + "description": "Set of capacity constraints that describe network adjacency.", + "items": { + "$ref": "CapacityConstraint" + }, + "type": "array" + } + }, + "type": "object" + }, "GetOwnerInstanceResponse": { "id": "GetOwnerInstanceResponse", "properties": { @@ -57407,6 +57556,11 @@ "$ref": "QueuingPolicy", "description": "When set, defines queing parameters for the requested deferred capacity. When unset, the request starts provisioning immediately, or fails if immediate provisioning is not possible." }, + "resizeBy": { + "description": "The number of instances to be created by this resize request. The group's target size will be increased by this number.", + "format": "int32", + "type": "integer" + }, "selfLink": { "description": "[Output Only] The URL for this resize request. The server defines this URL.", "type": "string" @@ -57439,7 +57593,7 @@ }, "status": { "$ref": "InstanceGroupManagerResizeRequestStatus", - "description": "[Output only] Status of the request. The Status message is aligned with QueuedResource.status. ResizeRequest.queuing_policy contains the queuing policy as provided by the user; it could have either valid_until_time or valid_until_duration. ResizeRequest.status.queuing_policy always contains absolute time as calculated by the server when the request is queued." + "description": "[Output only] Status of the request." }, "zone": { "description": "[Output Only] The URL of a zone where the resize request is located. Populated only for zonal resize requests.", @@ -59468,17 +59622,17 @@ "InstanceSettingsMetadata": { "id": "InstanceSettingsMetadata", "properties": { - "kind": { - "default": "compute#metadata", - "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", - "type": "string" - }, - "metadatas": { + "items": { "additionalProperties": { "type": "string" }, - "description": "A metadata key/value map. The total size of all keys and values must be less than 512KB.", + "description": "A metadata key/value items map. The total size of all keys and values must be less than 512KB.", "type": "object" + }, + "kind": { + "default": "compute#metadata", + "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", + "type": "string" } }, "type": "object" @@ -61439,7 +61593,7 @@ "type": "string" }, "pairingKey": { - "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", + "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of a PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", "type": "string" }, "partnerAsn": { @@ -61449,7 +61603,7 @@ }, "partnerMetadata": { "$ref": "InterconnectAttachmentPartnerMetadata", - "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." + "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." }, "privateInterconnectInfo": { "$ref": "InterconnectAttachmentPrivateInfo", @@ -72394,8 +72548,22 @@ }, "type": "object" }, + "PlacementLocation": { + "id": "PlacementLocation", + "properties": { + "aggregationBlockId": { + "description": "Aggregation block id of the placement group.", + "type": "string" + }, + "resourcePolicy": { + "description": "Partial or full URL of the resource policy for the placement group.", + "type": "string" + } + }, + "type": "object" + }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -73182,7 +73350,7 @@ "description": "The public delegated prefix mode for IPv6 only.", "enum": [ "DELEGATION", - "IPV6_FORWARDING_RULE_CREATION" + "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" ], "enumDescriptions": [ "The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength.", @@ -73585,7 +73753,7 @@ "description": "The PublicDelegatedSubPrefix mode for IPv6 only.", "enum": [ "DELEGATION", - "IPV6_FORWARDING_RULE_CREATION" + "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" ], "enumDescriptions": [ "The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength.", @@ -77644,6 +77812,11 @@ ], "type": "string" }, + "sliceCount": { + "description": "Specifies the number of slices in a multislice workload.", + "format": "int32", + "type": "integer" + }, "style": { "description": "Specifies instances to hosts placement relationship", "enum": [ @@ -78219,7 +78392,7 @@ "compute.routes.insert" ] }, - "description": "The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.", + "description": "The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format.", "type": "string" }, "id": { @@ -78284,7 +78457,7 @@ "type": "string" }, "nextHopIp": { - "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported.", + "description": "The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.", "type": "string" }, "nextHopNetwork": { @@ -79468,7 +79641,7 @@ "id": "RouterNat", "properties": { "autoNetworkTier": { - "description": "The network tier to use when automatically reserving IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, PREMIUM tier will be used.", + "description": "The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used.", "enum": [ "FIXED_STANDARD", "PREMIUM", @@ -82345,6 +82518,10 @@ "targetService": { "description": "The URL of a service serving the endpoint identified by this service attachment.", "type": "string" + }, + "tunnelingConfig": { + "$ref": "ServiceAttachmentTunnelingConfig", + "description": "When a tunneling config is set on this service attachment it will encapsulate traffic between consumer and producer. When tunneling is enabled: - nat_subnets must be unset - enable_proxy_protocol must be false - producer_forwarding_rule must be a L4 ILB. - " } }, "type": "object" @@ -82719,6 +82896,39 @@ }, "type": "object" }, + "ServiceAttachmentTunnelingConfig": { + "description": "Use to configure this PSC connection in tunneling mode. In tunneling mode traffic from consumer to producer will be encapsulated as it crosses the VPC boundary and traffic from producer to consumer will be decapsulated in the same manner.", + "id": "ServiceAttachmentTunnelingConfig", + "properties": { + "encapsulationProfile": { + "description": "Specify the encapsulation protocol and what metadata to include in incoming encapsulated packet headers.", + "enum": [ + "GENEVE_SECURITY_V1", + "UNSPECIFIED_ENCAPSULATION_PROFILE" + ], + "enumDescriptions": [ + "Use GENEVE encapsulation protocol and include the SECURITY_V1 set of GENEVE headers.", + "" + ], + "type": "string" + }, + "routingMode": { + "description": "How this Service Attachment will treat traffic sent to the tunnel_ip, destined for the consumer network.", + "enum": [ + "PACKET_INJECTION", + "STANDARD_ROUTING", + "UNSPECIFIED_ROUTING_MODE" + ], + "enumDescriptions": [ + "Traffic sent to this service attachment will be reinjected into the consumer network.", + "Response traffic, after de-encapsulation, will be returned to the client.", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "ServiceAttachmentsScopedList": { "id": "ServiceAttachmentsScopedList", "properties": { @@ -92846,7 +93056,7 @@ "type": "integer" }, "peerGcpGateway": { - "description": "URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.", + "description": "URL of the peer side HA VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer Google Cloud VPN gateway.", "type": "string" }, "peerIp": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index e89007c08e3..64732a1cffd 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/compute/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // computeService, err := compute.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // computeService, err := compute.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package compute // import "google.golang.org/api/compute/v0.alpha" import ( @@ -8790,6 +8804,109 @@ func (s *CallCredentials) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CapacityConstraint: Represents the network information between +// workload placements. +type CapacityConstraint struct { + // Possible values: + // "CONSTRAINT_TYPE_UNSPECIFIED" + // "OFF_CHAIN_CONSTRAINT" - Constraints for off-chain superblocks. Can + // be used to mark constraints for secondary workloads. + // "ON_CHAIN_CONSTRAINT" - Constraints related to the capacity between + // the Astrophel chain superblocks. + ConstraintMetadata string `json:"constraintMetadata,omitempty"` + + // MaxSumGbps: Weighted sum of BandwidthTerms (each term is coefficient + // * term) must be less than or equal to max_sum. + MaxSumGbps float64 `json:"maxSumGbps,omitempty"` + + Terms []*CapacityConstraintConstraintTerm `json:"terms,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConstraintMetadata") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConstraintMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CapacityConstraint) MarshalJSON() ([]byte, error) { + type NoMethod CapacityConstraint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *CapacityConstraint) UnmarshalJSON(data []byte) error { + type NoMethod CapacityConstraint + var s1 struct { + MaxSumGbps gensupport.JSONFloat64 `json:"maxSumGbps"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MaxSumGbps = float64(s1.MaxSumGbps) + return nil +} + +type CapacityConstraintConstraintTerm struct { + // Coefficient: Coefficient of this term in the linear expression. The + // value of the term will be coefficient * (demand from src to dst in + // Gbps). + Coefficient float64 `json:"coefficient,omitempty"` + + DestinationNode *PlacementLocation `json:"destinationNode,omitempty"` + + // SourceNode: Source and destination nodes. + SourceNode *PlacementLocation `json:"sourceNode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Coefficient") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Coefficient") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CapacityConstraintConstraintTerm) MarshalJSON() ([]byte, error) { + type NoMethod CapacityConstraintConstraintTerm + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *CapacityConstraintConstraintTerm) UnmarshalJSON(data []byte) error { + type NoMethod CapacityConstraintConstraintTerm + var s1 struct { + Coefficient gensupport.JSONFloat64 `json:"coefficient"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Coefficient = float64(s1.Coefficient) + return nil +} + // ChannelCredentials: [Deprecated] gRPC channel credentials to access // the SDS server. gRPC channel credentials to access the SDS server. type ChannelCredentials struct { @@ -10560,7 +10677,7 @@ type Disk struct { // sourceSnapshot, or sourceDisk parameter, or specify it alone to // create an empty persistent disk. If you specify this field along with // a source, the value of sizeGb must not be less than the size of the - // source. Acceptable values are 1 to 65536, inclusive. + // source. Acceptable values are greater than 0. SizeGb int64 `json:"sizeGb,omitempty,string"` // SourceConsistencyGroupPolicy: [Output Only] URL of the @@ -14685,6 +14802,13 @@ type ForwardingRule struct { // control whether the PSC endpoint can be accessed from another region. AllowPscGlobalAccess bool `json:"allowPscGlobalAccess,omitempty"` + // AllowPscPacketInjection: This is used in PSC consumer ForwardingRule + // to control whether the producer is allowed to inject packets into the + // consumer's network. If set to true, the target service attachment + // must have tunneling enabled and TunnelingConfig.RoutingMode set to + // PACKET_INJECTION Non-PSC forwarding rules should not use this field. + AllowPscPacketInjection bool `json:"allowPscPacketInjection,omitempty"` + // BackendService: Identifies the backend service to which the // forwarding rule sends traffic. Required for Internal TCP/UDP Load // Balancing and Network Load Balancing; must be omitted for all other @@ -14721,12 +14845,11 @@ type ForwardingRule struct { Id uint64 `json:"id,omitempty,string"` // IpCollection: Resource reference of a PublicDelegatedPrefix. The PDP - // must be a sub-PDP in IPV6_FORWARDING_RULE_CREATION mode. Use one of - // the following formats to specify a sub-PDP when creating an IPv6 - // NetLB forwarding rule using BYOIP: Full resource URL, as in - // https://www.googleapis.com/compute/v1/projects/ - // project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - // Partial URL, as in: - + // must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. Use + // one of the following formats to specify a sub-PDP when creating an + // IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in + // https://www.googleapis.com/compute/v1/projects/project_id/regions/region + // /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - // projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-nam // e - regions/region/publicDelegatedPrefixes/sub-pdp-name IpCollection string `json:"ipCollection,omitempty"` @@ -16683,6 +16806,39 @@ func (s *GRPCHealthCheck) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type GetNetworkCapacityConstraintsResponse struct { + // CapacityConstraints: Set of capacity constraints that describe + // network adjacency. + CapacityConstraints []*CapacityConstraint `json:"capacityConstraints,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CapacityConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CapacityConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GetNetworkCapacityConstraintsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GetNetworkCapacityConstraintsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type GetOwnerInstanceResponse struct { // Instance: Full instance resource URL. Instance string `json:"instance,omitempty"` @@ -23364,6 +23520,10 @@ type InstanceGroupManagerResizeRequest struct { // immediately, or fails if immediate provisioning is not possible. QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` + // ResizeBy: The number of instances to be created by this resize + // request. The group's target size will be increased by this number. + ResizeBy int64 `json:"resizeBy,omitempty"` + // SelfLink: [Output Only] The URL for this resize request. The server // defines this URL. SelfLink string `json:"selfLink,omitempty"` @@ -23388,12 +23548,7 @@ type InstanceGroupManagerResizeRequest struct { // "SUCCEEDED" - The request succeeded. State string `json:"state,omitempty"` - // Status: [Output only] Status of the request. The Status message is - // aligned with QueuedResource.status. ResizeRequest.queuing_policy - // contains the queuing policy as provided by the user; it could have - // either valid_until_time or valid_until_duration. - // ResizeRequest.status.queuing_policy always contains absolute time as - // calculated by the server when the request is queued. + // Status: [Output only] Status of the request. Status *InstanceGroupManagerResizeRequestStatus `json:"status,omitempty"` // Zone: [Output Only] The URL of a zone where the resize request is @@ -26586,15 +26741,15 @@ func (s *InstanceSettings) MarshalJSON() ([]byte, error) { } type InstanceSettingsMetadata struct { + // Items: A metadata key/value items map. The total size of all keys and + // values must be less than 512KB. + Items map[string]string `json:"items,omitempty"` + // Kind: [Output Only] Type of the resource. Always compute#metadata for // metadata. Kind string `json:"kind,omitempty"` - // Metadatas: A metadata key/value map. The total size of all keys and - // values must be less than 512KB. - Metadatas map[string]string `json:"metadatas,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Kind") to + // ForceSendFields is a list of field names (e.g. "Items") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -26602,7 +26757,7 @@ type InstanceSettingsMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API + // NullFields is a list of field names (e.g. "Items") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -29270,8 +29425,8 @@ type InterconnectAttachment struct { // PairingKey: [Output only for type PARTNER. Input only for // PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier - // of an PARTNER attachment used to initiate provisioning with a - // selected partner. Of the form "XXXXX/region/domain" + // of a PARTNER attachment used to initiate provisioning with a selected + // partner. Of the form "XXXXX/region/domain" PairingKey string `json:"pairingKey,omitempty"` // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 @@ -29281,8 +29436,8 @@ type InterconnectAttachment struct { PartnerAsn int64 `json:"partnerAsn,omitempty,string"` // PartnerMetadata: Informational metadata about Partner attachments - // from Partners to display to customers. Output only for for PARTNER - // type, mutable for PARTNER_PROVIDER, not available for DEDICATED. + // from Partners to display to customers. Output only for PARTNER type, + // mutable for PARTNER_PROVIDER, not available for DEDICATED. PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` // PrivateInterconnectInfo: [Output Only] Information specific to an @@ -44412,6 +44567,38 @@ func (s *PermissionConstraint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type PlacementLocation struct { + // AggregationBlockId: Aggregation block id of the placement group. + AggregationBlockId string `json:"aggregationBlockId,omitempty"` + + // ResourcePolicy: Partial or full URL of the resource policy for the + // placement group. + ResourcePolicy string `json:"resourcePolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationBlockId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationBlockId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PlacementLocation) MarshalJSON() ([]byte, error) { + type NoMethod PlacementLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which // specifies access controls for Google Cloud resources. A `Policy` is a // collection of `bindings`. A `binding` binds one or more `members`, or @@ -44426,7 +44613,7 @@ func (s *PermissionConstraint) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -44435,17 +44622,17 @@ func (s *PermissionConstraint) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -45553,9 +45740,9 @@ type PublicDelegatedPrefix struct { // "DELEGATION" - The public delegated prefix is used for further // sub-delegation only. Such prefixes cannot set // allocatablePrefixLength. - // "IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is - // used for creating forwarding rules only. Such prefixes cannot set - // publicDelegatedSubPrefixes. + // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated + // prefix is used for creating forwarding rules only. Such prefixes + // cannot set publicDelegatedSubPrefixes. Mode string `json:"mode,omitempty"` // Name: Name of the resource. Provided by the client when the resource @@ -46055,9 +46242,9 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { // "DELEGATION" - The public delegated prefix is used for further // sub-delegation only. Such prefixes cannot set // allocatablePrefixLength. - // "IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is - // used for creating forwarding rules only. Such prefixes cannot set - // publicDelegatedSubPrefixes. + // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated + // prefix is used for creating forwarding rules only. Such prefixes + // cannot set publicDelegatedSubPrefixes. Mode string `json:"mode,omitempty"` // Name: The name of the sub public delegated prefix. @@ -51541,6 +51728,9 @@ type ResourcePolicyGroupPlacementPolicy struct { // instrastructure to not share power, host and networking. Scope string `json:"scope,omitempty"` + // SliceCount: Specifies the number of slices in a multislice workload. + SliceCount int64 `json:"sliceCount,omitempty"` + // Style: Specifies instances to hosts placement relationship // // Possible values: @@ -52510,7 +52700,10 @@ type Route struct { Description string `json:"description,omitempty"` // DestRange: The destination range of outgoing packets that this route - // applies to. Both IPv4 and IPv6 are supported. + // applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 + // range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. + // 2001:db8::/32). IPv6 range will be displayed using RFC 5952 + // compressed format. DestRange string `json:"destRange,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -52583,7 +52776,12 @@ type Route struct { NextHopInterconnectAttachment string `json:"nextHopInterconnectAttachment,omitempty"` // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. + // matching packets. Both IPv6 address and IPv4 addresses are supported. + // Must specify an IPv4 address in dot-decimal notation (e.g. + // 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. + // 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will + // be displayed using RFC 5952 compressed format (e.g. + // 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. NextHopIp string `json:"nextHopIp,omitempty"` // NextHopNetwork: The URL of the local network if it should handle @@ -54077,8 +54275,8 @@ func (s *RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { // no external IPs are provided. type RouterNat struct { // AutoNetworkTier: The network tier to use when automatically reserving - // IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, - // PREMIUM tier will be used. + // NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not + // specified, then the current project-level default tier is used. // // Possible values: // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. @@ -58110,6 +58308,13 @@ type ServiceAttachment struct { // by this service attachment. TargetService string `json:"targetService,omitempty"` + // TunnelingConfig: When a tunneling config is set on this service + // attachment it will encapsulate traffic between consumer and producer. + // When tunneling is enabled: - nat_subnets must be unset - + // enable_proxy_protocol must be false - producer_forwarding_rule must + // be a L4 ILB. - + TunnelingConfig *ServiceAttachmentTunnelingConfig `json:"tunnelingConfig,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -58612,6 +58817,57 @@ func (s *ServiceAttachmentListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAttachmentTunnelingConfig: Use to configure this PSC +// connection in tunneling mode. In tunneling mode traffic from consumer +// to producer will be encapsulated as it crosses the VPC boundary and +// traffic from producer to consumer will be decapsulated in the same +// manner. +type ServiceAttachmentTunnelingConfig struct { + // EncapsulationProfile: Specify the encapsulation protocol and what + // metadata to include in incoming encapsulated packet headers. + // + // Possible values: + // "GENEVE_SECURITY_V1" - Use GENEVE encapsulation protocol and + // include the SECURITY_V1 set of GENEVE headers. + // "UNSPECIFIED_ENCAPSULATION_PROFILE" + EncapsulationProfile string `json:"encapsulationProfile,omitempty"` + + // RoutingMode: How this Service Attachment will treat traffic sent to + // the tunnel_ip, destined for the consumer network. + // + // Possible values: + // "PACKET_INJECTION" - Traffic sent to this service attachment will + // be reinjected into the consumer network. + // "STANDARD_ROUTING" - Response traffic, after de-encapsulation, will + // be returned to the client. + // "UNSPECIFIED_ROUTING_MODE" + RoutingMode string `json:"routingMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EncapsulationProfile") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EncapsulationProfile") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAttachmentTunnelingConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentTunnelingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ServiceAttachmentsScopedList struct { // ServiceAttachments: A list of ServiceAttachments contained in this // scope. @@ -72591,13 +72847,13 @@ type VpnTunnel struct { // redundancy type. PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` - // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this - // VPN tunnel is connected. Provided by the client when the VPN tunnel - // is created. This field can be used when creating highly available VPN + // PeerGcpGateway: URL of the peer side HA VPN gateway to which this VPN + // tunnel is connected. Provided by the client when the VPN tunnel is + // created. This field can be used when creating highly available VPN // from VPC network to VPC network, the field is exclusive with the // field peerExternalGateway. If provided, the VPN tunnel will - // automatically use the same vpnGatewayInterface ID in the peer GCP VPN - // gateway. + // automatically use the same vpnGatewayInterface ID in the peer Google + // Cloud VPN gateway. PeerGcpGateway string `json:"peerGcpGateway,omitempty"` // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. @@ -149020,6 +149276,183 @@ func (c *NetworkFirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Op } +// method id "compute.networkFirewallPolicies.patchAssociation": + +type NetworkFirewallPoliciesPatchAssociationCall struct { + s *Service + project string + firewallPolicy string + firewallpolicyassociation *FirewallPolicyAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PatchAssociation: Updates an association for the specified network +// firewall policy. +// +// - firewallPolicy: Name of the firewall policy to update. +// - project: Project ID for this request. +func (r *NetworkFirewallPoliciesService) PatchAssociation(project string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *NetworkFirewallPoliciesPatchAssociationCall { + c := &NetworkFirewallPoliciesPatchAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.firewallPolicy = firewallPolicy + c.firewallpolicyassociation = firewallpolicyassociation + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *NetworkFirewallPoliciesPatchAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchAssociationCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworkFirewallPoliciesPatchAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchAssociationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *NetworkFirewallPoliciesPatchAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchAssociationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *NetworkFirewallPoliciesPatchAssociationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkFirewallPoliciesPatchAssociationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyassociation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "firewallPolicy": c.firewallPolicy, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkFirewallPolicies.patchAssociation" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkFirewallPoliciesPatchAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an association for the specified network firewall policy.", + // "flatPath": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation", + // "httpMethod": "POST", + // "id": "compute.networkFirewallPolicies.patchAssociation", + // "parameterOrder": [ + // "project", + // "firewallPolicy" + // ], + // "parameters": { + // "firewallPolicy": { + // "description": "Name of the firewall policy to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchAssociation", + // "request": { + // "$ref": "FirewallPolicyAssociation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.networkFirewallPolicies.patchRule": type NetworkFirewallPoliciesPatchRuleCall struct { @@ -210223,6 +210656,168 @@ func (c *ResourcePoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po } +// method id "compute.resourcePolicies.getNetworkCapacityConstraints": + +type ResourcePoliciesGetNetworkCapacityConstraintsCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetNetworkCapacityConstraints: Returns the network capacity +// constraints for the specified placement policies. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *ResourcePoliciesService) GetNetworkCapacityConstraints(project string, region string) *ResourcePoliciesGetNetworkCapacityConstraintsCall { + c := &ResourcePoliciesGetNetworkCapacityConstraintsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// ResourcePolicies sets the optional parameter "resourcePolicies": +// Partial or full URL of the resource policies for which to retrieve +// the network capacity constraints. +func (c *ResourcePoliciesGetNetworkCapacityConstraintsCall) ResourcePolicies(resourcePolicies ...string) *ResourcePoliciesGetNetworkCapacityConstraintsCall { + c.urlParams_.SetMulti("resourcePolicies", append([]string{}, resourcePolicies...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ResourcePoliciesGetNetworkCapacityConstraintsCall) Fields(s ...googleapi.Field) *ResourcePoliciesGetNetworkCapacityConstraintsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ResourcePoliciesGetNetworkCapacityConstraintsCall) Context(ctx context.Context) *ResourcePoliciesGetNetworkCapacityConstraintsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ResourcePoliciesGetNetworkCapacityConstraintsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ResourcePoliciesGetNetworkCapacityConstraintsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/resourcePolicies/getNetworkCapacityConstraints") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.resourcePolicies.getNetworkCapacityConstraints" call. +// Exactly one of *GetNetworkCapacityConstraintsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GetNetworkCapacityConstraintsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ResourcePoliciesGetNetworkCapacityConstraintsCall) Do(opts ...googleapi.CallOption) (*GetNetworkCapacityConstraintsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GetNetworkCapacityConstraintsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the network capacity constraints for the specified placement policies.", + // "flatPath": "projects/{project}/regions/{region}/resourcePolicies/getNetworkCapacityConstraints", + // "httpMethod": "POST", + // "id": "compute.resourcePolicies.getNetworkCapacityConstraints", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resourcePolicies": { + // "description": "Partial or full URL of the resource policies for which to retrieve the network capacity constraints.", + // "location": "query", + // "repeated": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/resourcePolicies/getNetworkCapacityConstraints", + // "response": { + // "$ref": "GetNetworkCapacityConstraintsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.resourcePolicies.insert": type ResourcePoliciesInsertCall struct { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index db43ad80fa7..f1f56d60579 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -5206,6 +5206,11 @@ "required": true, "type": "string" }, + "paths": { + "location": "query", + "repeated": true, + "type": "string" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -10086,6 +10091,92 @@ } } }, + "instanceSettings": { + "methods": { + "get": { + "description": "Get Instance settings.", + "flatPath": "projects/{project}/zones/{zone}/instanceSettings", + "httpMethod": "GET", + "id": "compute.instanceSettings.get", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceSettings", + "response": { + "$ref": "InstanceSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "description": "Patch Instance settings", + "flatPath": "projects/{project}/zones/{zone}/instanceSettings", + "httpMethod": "PATCH", + "id": "compute.instanceSettings.patch", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "update_mask indicates fields to be updated as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The zone scoping this request. It should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceSettings", + "request": { + "$ref": "InstanceSettings" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "instanceTemplates": { "methods": { "aggregatedList": { @@ -39140,7 +39231,7 @@ } } }, - "revision": "20230801", + "revision": "20230814", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -44786,7 +44877,7 @@ "type": "string" }, "sizeGb": { - "description": "Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.", + "description": "Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.", "format": "int64", "type": "string" }, @@ -47504,6 +47595,10 @@ "description": "This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.", "type": "boolean" }, + "allowPscPacketInjection": { + "description": "This is used in PSC consumer ForwardingRule to control whether the producer is allowed to inject packets into the consumer's network. If set to true, the target service attachment must have tunneling enabled and TunnelingConfig.RoutingMode set to PACKET_INJECTION Non-PSC forwarding rules should not use this field.", + "type": "boolean" + }, "backendService": { "description": "Identifies the backend service to which the forwarding rule sends traffic. Required for Internal TCP/UDP Load Balancing and Network Load Balancing; must be omitted for all other load balancer types.", "type": "string" @@ -53098,7 +53193,7 @@ }, "status": { "$ref": "InstanceGroupManagerResizeRequestStatus", - "description": "[Output only] Status of the request. The Status message is aligned with QueuedResource.status. ResizeRequest.queuing_policy contains the queuing policy as provided by the user; it could have either valid_until_time or valid_until_duration. ResizeRequest.status.queuing_policy always contains absolute time as calculated by the server when the request is queued." + "description": "[Output only] Status of the request." }, "zone": { "description": "[Output Only] The URL of a zone where the resize request is located. Populated only for zonal resize requests.", @@ -54955,6 +55050,49 @@ }, "type": "object" }, + "InstanceSettings": { + "description": "Represents a Instance Settings resource. You can use instance settings to configure default settings for Compute Engine VM instances. For example, you can use it to configure default machine type of Compute Engine VM instances.", + "id": "InstanceSettings", + "properties": { + "fingerprint": { + "description": "Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.", + "format": "byte", + "type": "string" + }, + "kind": { + "default": "compute#instanceSettings", + "description": "[Output Only] Type of the resource. Always compute#instance_settings for instance settings.", + "type": "string" + }, + "metadata": { + "$ref": "InstanceSettingsMetadata", + "description": "The metadata key/value pairs assigned to all the instances in the corresponding scope." + }, + "zone": { + "description": "[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + } + }, + "type": "object" + }, + "InstanceSettingsMetadata": { + "id": "InstanceSettingsMetadata", + "properties": { + "items": { + "additionalProperties": { + "type": "string" + }, + "description": "A metadata key/value items map. The total size of all keys and values must be less than 512KB.", + "type": "object" + }, + "kind": { + "default": "compute#metadata", + "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", + "type": "string" + } + }, + "type": "object" + }, "InstanceTemplate": { "description": "Represents an Instance Template resource. You can use instance templates to create VM instances and managed instance groups. For more information, read Instance Templates.", "id": "InstanceTemplate", @@ -56849,7 +56987,7 @@ "type": "string" }, "pairingKey": { - "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", + "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of a PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", "type": "string" }, "partnerAsn": { @@ -56859,7 +56997,7 @@ }, "partnerMetadata": { "$ref": "InterconnectAttachmentPartnerMetadata", - "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." + "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." }, "privateInterconnectInfo": { "$ref": "InterconnectAttachmentPrivateInfo", @@ -72535,7 +72673,7 @@ "id": "RouterNat", "properties": { "autoNetworkTier": { - "description": "The network tier to use when automatically reserving IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, PREMIUM tier will be used.", + "description": "The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used.", "enum": [ "FIXED_STANDARD", "PREMIUM", @@ -75241,6 +75379,10 @@ "targetService": { "description": "The URL of a service serving the endpoint identified by this service attachment.", "type": "string" + }, + "tunnelingConfig": { + "$ref": "ServiceAttachmentTunnelingConfig", + "description": "When a tunneling config is set on this service attachment it will encapsulate traffic between consumer and producer. When tunneling is enabled: - nat_subnets must be unset - enable_proxy_protocol must be false - producer_forwarding_rule must be a L4 ILB. - " } }, "type": "object" @@ -75615,6 +75757,39 @@ }, "type": "object" }, + "ServiceAttachmentTunnelingConfig": { + "description": "Use to configure this PSC connection in tunneling mode. In tunneling mode traffic from consumer to producer will be encapsulated as it crosses the VPC boundary and traffic from producer to consumer will be decapsulated in the same manner.", + "id": "ServiceAttachmentTunnelingConfig", + "properties": { + "encapsulationProfile": { + "description": "Specify the encapsulation protocol and what metadata to include in incoming encapsulated packet headers.", + "enum": [ + "GENEVE_SECURITY_V1", + "UNSPECIFIED_ENCAPSULATION_PROFILE" + ], + "enumDescriptions": [ + "Use GENEVE encapsulation protocol and include the SECURITY_V1 set of GENEVE headers.", + "" + ], + "type": "string" + }, + "routingMode": { + "description": "How this Service Attachment will treat traffic sent to the tunnel_ip, destined for the consumer network.", + "enum": [ + "PACKET_INJECTION", + "STANDARD_ROUTING", + "UNSPECIFIED_ROUTING_MODE" + ], + "enumDescriptions": [ + "Traffic sent to this service attachment will be reinjected into the consumer network.", + "Response traffic, after de-encapsulation, will be returned to the client.", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "ServiceAttachmentsScopedList": { "id": "ServiceAttachmentsScopedList", "properties": { @@ -84523,7 +84698,7 @@ "type": "integer" }, "peerGcpGateway": { - "description": "URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.", + "description": "URL of the peer side HA VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer Google Cloud VPN gateway.", "type": "string" }, "peerIp": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index df5c97f76be..6040489ed96 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/compute/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // computeService, err := compute.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // computeService, err := compute.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package compute // import "google.golang.org/api/compute/v0.beta" import ( @@ -171,6 +185,7 @@ func New(client *http.Client) (*Service, error) { s.InstanceGroupManagerResizeRequests = NewInstanceGroupManagerResizeRequestsService(s) s.InstanceGroupManagers = NewInstanceGroupManagersService(s) s.InstanceGroups = NewInstanceGroupsService(s) + s.InstanceSettings = NewInstanceSettingsService(s) s.InstanceTemplates = NewInstanceTemplatesService(s) s.Instances = NewInstancesService(s) s.InstantSnapshots = NewInstantSnapshotsService(s) @@ -304,6 +319,8 @@ type Service struct { InstanceGroups *InstanceGroupsService + InstanceSettings *InstanceSettingsService + InstanceTemplates *InstanceTemplatesService Instances *InstancesService @@ -692,6 +709,15 @@ type InstanceGroupsService struct { s *Service } +func NewInstanceSettingsService(s *Service) *InstanceSettingsService { + rs := &InstanceSettingsService{s: s} + return rs +} + +type InstanceSettingsService struct { + s *Service +} + func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { rs := &InstanceTemplatesService{s: s} return rs @@ -9597,7 +9623,7 @@ type Disk struct { // sourceSnapshot, or sourceDisk parameter, or specify it alone to // create an empty persistent disk. If you specify this field along with // a source, the value of sizeGb must not be less than the size of the - // source. Acceptable values are 1 to 65536, inclusive. + // source. Acceptable values are greater than 0. SizeGb int64 `json:"sizeGb,omitempty,string"` // SourceConsistencyGroupPolicy: [Output Only] URL of the @@ -13593,6 +13619,13 @@ type ForwardingRule struct { // control whether the PSC endpoint can be accessed from another region. AllowPscGlobalAccess bool `json:"allowPscGlobalAccess,omitempty"` + // AllowPscPacketInjection: This is used in PSC consumer ForwardingRule + // to control whether the producer is allowed to inject packets into the + // consumer's network. If set to true, the target service attachment + // must have tunneling enabled and TunnelingConfig.RoutingMode set to + // PACKET_INJECTION Non-PSC forwarding rules should not use this field. + AllowPscPacketInjection bool `json:"allowPscPacketInjection,omitempty"` + // BackendService: Identifies the backend service to which the // forwarding rule sends traffic. Required for Internal TCP/UDP Load // Balancing and Network Load Balancing; must be omitted for all other @@ -21504,12 +21537,7 @@ type InstanceGroupManagerResizeRequest struct { // "SUCCEEDED" - The request succeeded. State string `json:"state,omitempty"` - // Status: [Output only] Status of the request. The Status message is - // aligned with QueuedResource.status. ResizeRequest.queuing_policy - // contains the queuing policy as provided by the user; it could have - // either valid_until_time or valid_until_duration. - // ResizeRequest.status.queuing_policy always contains absolute time as - // calculated by the server when the request is queued. + // Status: [Output only] Status of the request. Status *InstanceGroupManagerResizeRequestStatus `json:"status,omitempty"` // Zone: [Output Only] The URL of a zone where the resize request is @@ -24437,6 +24465,93 @@ func (s *InstanceReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstanceSettings: Represents a Instance Settings resource. You can +// use instance settings to configure default settings for Compute +// Engine VM instances. For example, you can use it to configure default +// machine type of Compute Engine VM instances. +type InstanceSettings struct { + // Fingerprint: Specifies a fingerprint for instance settings, which is + // essentially a hash of the instance settings resource's contents and + // used for optimistic locking. The fingerprint is initially generated + // by Compute Engine and changes after every request to modify or update + // the instance settings resource. You must always provide an up-to-date + // fingerprint hash in order to update or change the resource, otherwise + // the request will fail with error 412 conditionNotMet. To see the + // latest fingerprint, make a get() request to retrieve the resource. + Fingerprint string `json:"fingerprint,omitempty"` + + // Kind: [Output Only] Type of the resource. Always + // compute#instance_settings for instance settings. + Kind string `json:"kind,omitempty"` + + // Metadata: The metadata key/value pairs assigned to all the instances + // in the corresponding scope. + Metadata *InstanceSettingsMetadata `json:"metadata,omitempty"` + + // Zone: [Output Only] URL of the zone where the resource resides You + // must specify this field as part of the HTTP request URL. It is not + // settable as a field in the request body. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceSettings) MarshalJSON() ([]byte, error) { + type NoMethod InstanceSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InstanceSettingsMetadata struct { + // Items: A metadata key/value items map. The total size of all keys and + // values must be less than 512KB. + Items map[string]string `json:"items,omitempty"` + + // Kind: [Output Only] Type of the resource. Always compute#metadata for + // metadata. + Kind string `json:"kind,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceSettingsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InstanceSettingsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceTemplate: Represents an Instance Template resource. You can // use instance templates to create VM instances and managed instance // groups. For more information, read Instance Templates. @@ -26991,8 +27106,8 @@ type InterconnectAttachment struct { // PairingKey: [Output only for type PARTNER. Input only for // PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier - // of an PARTNER attachment used to initiate provisioning with a - // selected partner. Of the form "XXXXX/region/domain" + // of a PARTNER attachment used to initiate provisioning with a selected + // partner. Of the form "XXXXX/region/domain" PairingKey string `json:"pairingKey,omitempty"` // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 @@ -27002,8 +27117,8 @@ type InterconnectAttachment struct { PartnerAsn int64 `json:"partnerAsn,omitempty,string"` // PartnerMetadata: Informational metadata about Partner attachments - // from Partners to display to customers. Output only for for PARTNER - // type, mutable for PARTNER_PROVIDER, not available for DEDICATED. + // from Partners to display to customers. Output only for PARTNER type, + // mutable for PARTNER_PROVIDER, not available for DEDICATED. PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` // PrivateInterconnectInfo: [Output Only] Information specific to an @@ -48671,8 +48786,8 @@ func (s *RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { // no external IPs are provided. type RouterNat struct { // AutoNetworkTier: The network tier to use when automatically reserving - // IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, - // PREMIUM tier will be used. + // NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not + // specified, then the current project-level default tier is used. // // Possible values: // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. @@ -52444,6 +52559,13 @@ type ServiceAttachment struct { // by this service attachment. TargetService string `json:"targetService,omitempty"` + // TunnelingConfig: When a tunneling config is set on this service + // attachment it will encapsulate traffic between consumer and producer. + // When tunneling is enabled: - nat_subnets must be unset - + // enable_proxy_protocol must be false - producer_forwarding_rule must + // be a L4 ILB. - + TunnelingConfig *ServiceAttachmentTunnelingConfig `json:"tunnelingConfig,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -52946,6 +53068,57 @@ func (s *ServiceAttachmentListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ServiceAttachmentTunnelingConfig: Use to configure this PSC +// connection in tunneling mode. In tunneling mode traffic from consumer +// to producer will be encapsulated as it crosses the VPC boundary and +// traffic from producer to consumer will be decapsulated in the same +// manner. +type ServiceAttachmentTunnelingConfig struct { + // EncapsulationProfile: Specify the encapsulation protocol and what + // metadata to include in incoming encapsulated packet headers. + // + // Possible values: + // "GENEVE_SECURITY_V1" - Use GENEVE encapsulation protocol and + // include the SECURITY_V1 set of GENEVE headers. + // "UNSPECIFIED_ENCAPSULATION_PROFILE" + EncapsulationProfile string `json:"encapsulationProfile,omitempty"` + + // RoutingMode: How this Service Attachment will treat traffic sent to + // the tunnel_ip, destined for the consumer network. + // + // Possible values: + // "PACKET_INJECTION" - Traffic sent to this service attachment will + // be reinjected into the consumer network. + // "STANDARD_ROUTING" - Response traffic, after de-encapsulation, will + // be returned to the client. + // "UNSPECIFIED_ROUTING_MODE" + RoutingMode string `json:"routingMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EncapsulationProfile") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EncapsulationProfile") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAttachmentTunnelingConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachmentTunnelingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ServiceAttachmentsScopedList struct { // ServiceAttachments: A list of ServiceAttachments contained in this // scope. @@ -65332,13 +65505,13 @@ type VpnTunnel struct { // redundancy type. PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` - // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this - // VPN tunnel is connected. Provided by the client when the VPN tunnel - // is created. This field can be used when creating highly available VPN + // PeerGcpGateway: URL of the peer side HA VPN gateway to which this VPN + // tunnel is connected. Provided by the client when the VPN tunnel is + // created. This field can be used when creating highly available VPN // from VPC network to VPC network, the field is exclusive with the // field peerExternalGateway. If provided, the VPN tunnel will - // automatically use the same vpnGatewayInterface ID in the peer GCP VPN - // gateway. + // automatically use the same vpnGatewayInterface ID in the peer Google + // Cloud VPN gateway. PeerGcpGateway string `json:"peerGcpGateway,omitempty"` // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. @@ -88607,6 +88780,12 @@ func (r *FutureReservationsService) Update(project string, zone string, futureRe return c } +// Paths sets the optional parameter "paths": +func (c *FutureReservationsUpdateCall) Paths(paths ...string) *FutureReservationsUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + // RequestId sets the optional parameter "requestId": An optional // request ID to identify requests. Specify a unique request ID so that // if you must retry your request, the server will know to ignore the @@ -88739,6 +88918,11 @@ func (c *FutureReservationsUpdateCall) Do(opts ...googleapi.CallOption) (*Operat // "required": true, // "type": "string" // }, + // "paths": { + // "location": "query", + // "repeated": true, + // "type": "string" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -109781,6 +109965,354 @@ func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) } +// method id "compute.instanceSettings.get": + +type InstanceSettingsGetCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get Instance settings. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *InstanceSettingsService) Get(project string, zone string) *InstanceSettingsGetCall { + c := &InstanceSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceSettingsGetCall) Fields(s ...googleapi.Field) *InstanceSettingsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InstanceSettingsGetCall) IfNoneMatch(entityTag string) *InstanceSettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceSettingsGetCall) Context(ctx context.Context) *InstanceSettingsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceSettingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceSettings.get" call. +// Exactly one of *InstanceSettings or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *InstanceSettings.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &InstanceSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get Instance settings.", + // "flatPath": "projects/{project}/zones/{zone}/instanceSettings", + // "httpMethod": "GET", + // "id": "compute.instanceSettings.get", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/instanceSettings", + // "response": { + // "$ref": "InstanceSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instanceSettings.patch": + +type InstanceSettingsPatchCall struct { + s *Service + project string + zone string + instancesettings *InstanceSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patch Instance settings +// +// - project: Project ID for this request. +// - zone: The zone scoping this request. It should conform to RFC1035. +func (r *InstanceSettingsService) Patch(project string, zone string, instancesettings *InstanceSettings) *InstanceSettingsPatchCall { + c := &InstanceSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instancesettings = instancesettings + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstanceSettingsPatchCall) RequestId(requestId string) *InstanceSettingsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": update_mask +// indicates fields to be updated as part of this request. +func (c *InstanceSettingsPatchCall) UpdateMask(updateMask string) *InstanceSettingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceSettingsPatchCall) Fields(s ...googleapi.Field) *InstanceSettingsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstanceSettingsPatchCall) Context(ctx context.Context) *InstanceSettingsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstanceSettingsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceSettingsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceSettings.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patch Instance settings", + // "flatPath": "projects/{project}/zones/{zone}/instanceSettings", + // "httpMethod": "PATCH", + // "id": "compute.instanceSettings.patch", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "update_mask indicates fields to be updated as part of this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The zone scoping this request. It should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/instanceSettings", + // "request": { + // "$ref": "InstanceSettings" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instanceTemplates.aggregatedList": type InstanceTemplatesAggregatedListCall struct { diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 1abba41e139..82edbd0ef73 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -10745,6 +10745,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.instances.setSecurityPolicy", + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "parameters": { + "instance": { + "description": "Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", + "request": { + "$ref": "InstancesSetSecurityPolicyRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setServiceAccount": { "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", @@ -18777,6 +18826,55 @@ "https://www.googleapis.com/auth/compute" ] }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.regionBackendServices.setSecurityPolicy", + "parameterOrder": [ + "project", + "region", + "backendService" + ], + "parameters": { + "backendService": { + "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "update": { "description": "Updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .", "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", @@ -30892,6 +30990,55 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.targetInstances.setSecurityPolicy", + "parameterOrder": [ + "project", + "zone", + "targetInstance" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetInstance": { + "description": "Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -31453,6 +31600,55 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "setSecurityPolicy": { + "description": "Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview", + "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + "httpMethod": "POST", + "id": "compute.targetPools.setSecurityPolicy", + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "targetPool": { + "description": "Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + "request": { + "$ref": "SecurityPolicyReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -33835,7 +34031,7 @@ } } }, - "revision": "20230725", + "revision": "20230829", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -34415,6 +34611,10 @@ "description": "The DNS domain name for the public PTR record. You can set this field only if the `setPublicPtr` field is enabled in accessConfig. If this field is unspecified in ipv6AccessConfig, a default PTR record will be createc for first IP in associated external IPv6 range.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this access config.", + "type": "string" + }, "setPublicPtr": { "description": "Specifies whether a public DNS 'PTR' record should be created to map the external IP address of the instance to a DNS domain name. This field is not used in ipv6AccessConfig. A default PTR record will be created if the VM has external IPv6 range associated.", "type": "boolean" @@ -36301,7 +36501,7 @@ "type": "string" }, "timeZone": { - "description": "The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.", + "description": "The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: https://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of “UTC” if left empty.", "type": "string" } }, @@ -38115,6 +38315,48 @@ }, "type": "object" }, + "BulkInsertOperationStatus": { + "id": "BulkInsertOperationStatus", + "properties": { + "createdVmCount": { + "description": "[Output Only] Count of VMs successfully created so far.", + "format": "int32", + "type": "integer" + }, + "deletedVmCount": { + "description": "[Output Only] Count of VMs that got deleted during rollback.", + "format": "int32", + "type": "integer" + }, + "failedToCreateVmCount": { + "description": "[Output Only] Count of VMs that started creating but encountered an error.", + "format": "int32", + "type": "integer" + }, + "status": { + "description": "[Output Only] Creation status of BulkInsert operation - information if the flow is rolling forward or rolling back.", + "enum": [ + "CREATING", + "DONE", + "ROLLING_BACK", + "STATUS_UNSPECIFIED" + ], + "enumDescriptions": [ + "Rolling forward - creating VMs.", + "Done", + "Rolling back - cleaning up after an error.", + "" + ], + "type": "string" + }, + "targetVmCount": { + "description": "[Output Only] Count of VMs originally planned to be created.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CacheInvalidationRule": { "id": "CacheInvalidationRule", "properties": { @@ -38341,6 +38583,7 @@ "COMPUTE_OPTIMIZED", "COMPUTE_OPTIMIZED_C2D", "COMPUTE_OPTIMIZED_C3", + "COMPUTE_OPTIMIZED_C3D", "COMPUTE_OPTIMIZED_H3", "GENERAL_PURPOSE", "GENERAL_PURPOSE_E2", @@ -38367,6 +38610,7 @@ "", "", "", + "", "" ], "type": "string" @@ -39256,7 +39500,7 @@ "type": "string" }, "sizeGb": { - "description": "Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are 1 to 65536, inclusive.", + "description": "Size, in GB, of the persistent disk. You can specify this field when creating a persistent disk using the sourceImage, sourceSnapshot, or sourceDisk parameter, or specify it alone to create an empty persistent disk. If you specify this field along with a source, the value of sizeGb must not be less than the size of the source. Acceptable values are greater than 0.", "format": "int64", "type": "string" }, @@ -44407,7 +44651,7 @@ }, "faultInjectionPolicy": { "$ref": "HttpFaultInjection", - "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by a load balancer on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests. timeout and retry_policy is ignored by clients that are configured with a fault_injection_policy if: 1. The traffic is generated by fault injection AND 2. The fault injection is not a delay fault injection. Fault injection is not supported with the global external HTTP(S) load balancer (classic). To see which load balancers support fault injection, see Load balancing: Routing and traffic management features." + "description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by a load balancer on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted by the load balancer for a percentage of requests. timeout and retry_policy is ignored by clients that are configured with a fault_injection_policy if: 1. The traffic is generated by fault injection AND 2. The fault injection is not a delay fault injection. Fault injection is not supported with the classic Application Load Balancer . To see which load balancers support fault injection, see Load balancing: Routing and traffic management features." }, "maxStreamDuration": { "$ref": "Duration", @@ -44427,7 +44671,7 @@ }, "urlRewrite": { "$ref": "UrlRewrite", - "description": "The spec to modify the URL of the request, before forwarding the request to the matched service. urlRewrite is the only action supported in UrlMaps for external HTTP(S) load balancers. Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." + "description": "The spec to modify the URL of the request, before forwarding the request to the matched service. urlRewrite is the only action supported in UrlMaps for classic Application Load Balancers. Not supported when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "weightedBackendServices": { "description": "A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non-zero number. After a backend service is identified and before forwarding the request to the backend service, advanced routing actions such as URL rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction.", @@ -44465,7 +44709,7 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within a route rule's routeAction." + "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." }, "service": { "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", @@ -48646,6 +48890,19 @@ }, "type": "object" }, + "InstancesBulkInsertOperationMetadata": { + "id": "InstancesBulkInsertOperationMetadata", + "properties": { + "perLocationStatus": { + "additionalProperties": { + "$ref": "BulkInsertOperationStatus" + }, + "description": "Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, "InstancesGetEffectiveFirewallsResponse": { "id": "InstancesGetEffectiveFirewallsResponse", "properties": { @@ -48919,6 +49176,23 @@ }, "type": "object" }, + "InstancesSetSecurityPolicyRequest": { + "id": "InstancesSetSecurityPolicyRequest", + "properties": { + "networkInterfaces": { + "description": "The network interfaces that the security policy will be applied to. Network interfaces use the nicN naming format. You can only set a security policy for network interfaces with an access config.", + "items": { + "type": "string" + }, + "type": "array" + }, + "securityPolicy": { + "description": "A full or partial URL to a security policy to add to this instance. If this field is set to an empty string it will remove the associated security policy.", + "type": "string" + } + }, + "type": "object" + }, "InstancesSetServiceAccountRequest": { "id": "InstancesSetServiceAccountRequest", "properties": { @@ -49316,7 +49590,7 @@ "type": "string" }, "pairingKey": { - "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", + "description": "[Output only for type PARTNER. Input only for PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier of a PARTNER attachment used to initiate provisioning with a selected partner. Of the form \"XXXXX/region/domain\"", "type": "string" }, "partnerAsn": { @@ -49326,7 +49600,7 @@ }, "partnerMetadata": { "$ref": "InterconnectAttachmentPartnerMetadata", - "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." + "description": "Informational metadata about Partner attachments from Partners to display to customers. Output only for PARTNER type, mutable for PARTNER_PROVIDER, not available for DEDICATED." }, "privateInterconnectInfo": { "$ref": "InterconnectAttachmentPrivateInfo", @@ -53736,7 +54010,7 @@ "type": "object" }, "NetworkEndpointGroup": { - "description": "Represents a collection of network endpoints. A network endpoint group (NEG) defines how a set of endpoints should be reached, whether they are reachable, and where they are located. For more information about using NEGs, see Setting up external HTTP(S) Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting up external HTTP(S) Load Balancing with serverless NEGs.", + "description": "Represents a collection of network endpoints. A network endpoint group (NEG) defines how a set of endpoints should be reached, whether they are reachable, and where they are located. For more information about using NEGs for different use cases, see Network endpoint groups overview.", "id": "NetworkEndpointGroup", "properties": { "annotations": { @@ -57313,6 +57587,9 @@ "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", "type": "string" }, + "instancesBulkInsertOperationMetadata": { + "$ref": "InstancesBulkInsertOperationMetadata" + }, "kind": { "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", @@ -58727,7 +59004,7 @@ "properties": { "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", @@ -58779,7 +59056,7 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within a path rule's routeAction." + "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." }, "service": { "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", @@ -58832,7 +59109,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -63373,7 +63650,7 @@ "compute.routes.insert" ] }, - "description": "The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported.", + "description": "The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format.", "type": "string" }, "id": { @@ -63422,7 +63699,7 @@ "type": "string" }, "nextHopIp": { - "description": "The network IP address of an instance that should handle matching packets. Only IPv4 is supported.", + "description": "The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.", "type": "string" }, "nextHopNetwork": { @@ -63837,7 +64114,7 @@ "type": "string" }, "interfaces": { - "description": "Router interfaces. Each interface requires either one linked resource, (for example, linkedVpnTunnel), or IP address and IP address range (for example, ipRange), or both.", + "description": "Router interfaces. To create a BGP peer that uses a router interface, the interface must have one of the following fields specified: - linkedVpnTunnel - linkedInterconnectAttachment - subnetwork You can create a router interface without any of these fields specified. However, you cannot create a BGP peer that uses that interface.", "items": { "$ref": "RouterInterface" }, @@ -64304,11 +64581,11 @@ "type": "string" }, "linkedInterconnectAttachment": { - "description": "URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.", + "description": "URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork.", "type": "string" }, "linkedVpnTunnel": { - "description": "URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a virtual machine instance.", + "description": "URI of the linked VPN tunnel, which must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork.", "type": "string" }, "managementType": { @@ -64520,7 +64797,7 @@ "compute.routers.update" ] }, - "description": "Name used to identify the key. Must be unique within a router. Must be referenced by at least one bgpPeer. Must comply with RFC1035.", + "description": "Name used to identify the key. Must be unique within a router. Must be referenced by exactly one bgpPeer. Must comply with RFC1035.", "type": "string" } }, @@ -64531,7 +64808,7 @@ "id": "RouterNat", "properties": { "autoNetworkTier": { - "description": "The network tier to use when automatically reserving IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, PREMIUM tier will be used.", + "description": "The network tier to use when automatically reserving NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, then the current project-level default tier is used.", "enum": [ "FIXED_STANDARD", "PREMIUM", @@ -65984,6 +66261,13 @@ "" ], "type": "string" + }, + "userDefinedFields": { + "description": "Definitions of user-defined fields for CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to 4 bytes extracted from a fixed offset in the packet, relative to the IPv4, IPv6, TCP, or UDP header, with an optional mask to select certain bits. Rules may then specify matching values for these fields. Example: userDefinedFields: - name: \"ipv4_fragment_offset\" base: IPV4 offset: 6 size: 2 mask: \"0x1fff\"", + "items": { + "$ref": "SecurityPolicyUserDefinedField" + }, + "type": "array" } }, "type": "object" @@ -66309,6 +66593,10 @@ "$ref": "SecurityPolicyRuleMatcher", "description": "A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced." }, + "networkMatch": { + "$ref": "SecurityPolicyRuleNetworkMatcher", + "description": "A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - \"192.0.2.0/24\" - \"198.51.100.0/24\" userDefinedFields: - name: \"ipv4_fragment_offset\" values: - \"1-0x1fff\" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named \"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." + }, "preconfiguredWafConfig": { "$ref": "SecurityPolicyRulePreconfiguredWafConfig", "description": "Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect." @@ -66398,6 +66686,87 @@ }, "type": "object" }, + "SecurityPolicyRuleNetworkMatcher": { + "description": "Represents a match condition that incoming network traffic is evaluated against.", + "id": "SecurityPolicyRuleNetworkMatcher", + "properties": { + "destIpRanges": { + "description": "Destination IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "destPorts": { + "description": "Destination port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "ipProtocols": { + "description": "IPv4 protocol / IPv6 next header (after extension headers). Each element can be an 8-bit unsigned decimal number (e.g. \"6\"), range (e.g. \"253-254\"), or one of the following protocol names: \"tcp\", \"udp\", \"icmp\", \"esp\", \"ah\", \"ipip\", or \"sctp\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcAsns": { + "description": "BGP Autonomous System Number associated with the source IP address.", + "items": { + "format": "uint32", + "type": "integer" + }, + "type": "array" + }, + "srcIpRanges": { + "description": "Source IPv4/IPv6 addresses or CIDR prefixes, in standard text format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcPorts": { + "description": "Source port numbers for TCP/UDP/SCTP. Each element can be a 16-bit unsigned decimal number (e.g. \"80\") or range (e.g. \"0-1023\").", + "items": { + "type": "string" + }, + "type": "array" + }, + "srcRegionCodes": { + "description": "Two-letter ISO 3166-1 alpha-2 country code associated with the source IP address.", + "items": { + "type": "string" + }, + "type": "array" + }, + "userDefinedFields": { + "description": "User-defined fields. Each element names a defined field and lists the matching values for that field.", + "items": { + "$ref": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch": { + "id": "SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch", + "properties": { + "name": { + "description": "Name of the user-defined field, as given in the definition.", + "type": "string" + }, + "values": { + "description": "Matching values of the field. Each element can be a 32-bit unsigned decimal or hexadecimal (starting with \"0x\") number (e.g. \"64\") or range (e.g. \"0x400-0x7ff\").", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "SecurityPolicyRulePreconfiguredWafConfig": { "id": "SecurityPolicyRulePreconfiguredWafConfig", "properties": { @@ -66622,6 +66991,46 @@ }, "type": "object" }, + "SecurityPolicyUserDefinedField": { + "id": "SecurityPolicyUserDefinedField", + "properties": { + "base": { + "description": "The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required", + "enum": [ + "IPV4", + "IPV6", + "TCP", + "UDP" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, + "mask": { + "description": "If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with \"0x\"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.", + "type": "string" + }, + "name": { + "description": "The name of this field. Must be unique within the policy.", + "type": "string" + }, + "offset": { + "description": "Offset of the first byte of the field (in network byte order) relative to 'base'.", + "format": "int32", + "type": "integer" + }, + "size": { + "description": "Size of the field in bytes. Valid values: 1-4.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "SecuritySettings": { "description": "The authentication and authorization settings for a BackendService.", "id": "SecuritySettings", @@ -67961,7 +68370,7 @@ "type": "object" }, "SslCertificate": { - "description": "Represents an SSL Certificate resource. Google Compute Engine has two SSL Certificate resources: * [Global](/compute/docs/reference/rest/v1/sslCertificates) * [Regional](/compute/docs/reference/rest/v1/regionSslCertificates) The sslCertificates are used by: - external HTTPS load balancers - SSL proxy load balancers The regionSslCertificates are used by internal HTTPS load balancers. Optionally, certificate file contents that you upload can contain a set of up to five PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and using SSL certificates, SSL certificates quotas and limits, and Troubleshooting SSL certificates.", + "description": "Represents an SSL certificate resource. Google Compute Engine has two SSL certificate resources: * [Global](/compute/docs/reference/rest/v1/sslCertificates) * [Regional](/compute/docs/reference/rest/v1/regionSslCertificates) The global SSL certificates (sslCertificates) are used by: - Global external Application Load Balancers - Classic Application Load Balancers - Proxy Network Load Balancers (with target SSL proxies) The regional SSL certificates (regionSslCertificates) are used by: - Regional external Application Load Balancers - Regional internal Application Load Balancers Optionally, certificate file contents that you upload can contain a set of up to five PEM-encoded certificates. The API call creates an object (sslCertificate) that holds this data. You can use SSL keys and certificates to secure connections to a load balancer. For more information, read Creating and using SSL certificates, SSL certificates quotas and limits, and Troubleshooting SSL certificates.", "id": "SslCertificate", "properties": { "certificate": { @@ -69403,6 +69812,7 @@ "purpose": { "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ + "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", "PRIVATE_RFC_1918", @@ -69410,11 +69820,12 @@ "REGIONAL_MANAGED_PROXY" ], "enumDescriptions": [ + "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing.", "Regular user created or automatically created subnet.", "Regular user created or automatically created subnet.", "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Internal/External HTTP(S) Load Balancing." + "Subnetwork used for Regional Envoy-based Load Balancing." ], "type": "string" }, @@ -70441,7 +70852,7 @@ "type": "object" }, "TargetHttpProxy": { - "description": "Represents a Target HTTP Proxy resource. Google Compute Engine has two Target HTTP Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpProxies) A target HTTP proxy is a component of GCP HTTP load balancers. * targetHttpProxies are used by external HTTP load balancers and Traffic Director. * regionTargetHttpProxies are used by internal HTTP load balancers. Forwarding rules reference a target HTTP proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", + "description": "Represents a Target HTTP Proxy resource. Google Compute Engine has two Target HTTP Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpProxies) A target HTTP proxy is a component of GCP HTTP load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTP proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", "id": "TargetHttpProxy", "properties": { "creationTimestamp": { @@ -70458,7 +70869,7 @@ "type": "string" }, "httpKeepAliveTimeoutSec": { - "description": "Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For Global external HTTP(S) load balancer, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For Global external HTTP(S) load balancer (classic), this option is not available publicly.", + "description": "Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For global external Application Load Balancers, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For classic Application Load Balancers, this option is not supported.", "format": "int32", "type": "integer" }, @@ -70864,7 +71275,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpsProxies are used by external HTTPS load balancers. * regionTargetHttpsProxies are used by internal HTTPS load balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", + "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", "id": "TargetHttpsProxy", "properties": { "authorizationPolicy": { @@ -70889,7 +71300,7 @@ "type": "string" }, "httpKeepAliveTimeoutSec": { - "description": "Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For Global external HTTP(S) load balancer, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For Global external HTTP(S) load balancer (classic), this option is not available publicly.", + "description": "Specifies how long to keep a connection open, after completing a response, while there is no matching traffic (in seconds). If an HTTP keep-alive is not specified, a default value (610 seconds) will be used. For global external Application Load Balancers, the minimum allowed value is 5 seconds and the maximum allowed value is 1200 seconds. For classic Application Load Balancers, this option is not supported.", "format": "int32", "type": "integer" }, @@ -71312,6 +71723,10 @@ "description": "The URL of the network this target instance uses to forward traffic. If not specified, the traffic will be forwarded to the network that the default network interface belongs to.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this target instance.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -71822,6 +72237,10 @@ "description": "[Output Only] URL of the region where the target pool resides.", "type": "string" }, + "securityPolicy": { + "description": "[Output Only] The resource URL for the security policy associated with this target pool.", + "type": "string" + }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" @@ -73802,7 +74221,7 @@ "type": "object" }, "UrlMap": { - "description": "Represents a URL Map resource. Compute Engine has two URL Map resources: * [Global](/compute/docs/reference/rest/v1/urlMaps) * [Regional](/compute/docs/reference/rest/v1/regionUrlMaps) A URL map resource is a component of certain types of cloud load balancers and Traffic Director: * urlMaps are used by external HTTP(S) load balancers and Traffic Director. * regionUrlMaps are used by internal HTTP(S) load balancers. For a list of supported URL map features by the load balancer type, see the Load balancing features: Routing and traffic management table. For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table. This resource defines mappings from hostnames and URL paths to either a backend service or a backend bucket. To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.", + "description": "Represents a URL Map resource. Compute Engine has two URL Map resources: * [Global](/compute/docs/reference/rest/v1/urlMaps) * [Regional](/compute/docs/reference/rest/v1/regionUrlMaps) A URL map resource is a component of certain types of cloud load balancers and Traffic Director: * urlMaps are used by global external Application Load Balancers, classic Application Load Balancers, and cross-region internal Application Load Balancers. * regionUrlMaps are used by internal Application Load Balancers, regional external Application Load Balancers and regional internal Application Load Balancers. For a list of supported URL map features by the load balancer type, see the Load balancing features: Routing and traffic management table. For a list of supported URL map features for Traffic Director, see the Traffic Director features: Routing and traffic management table. This resource defines mappings from hostnames and URL paths to either a backend service or a backend bucket. To use the global urlMaps resource, the backend service must have a loadBalancingScheme of either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend service must have a loadBalancingScheme of INTERNAL_MANAGED. For more information, read URL Map Concepts.", "id": "UrlMap", "properties": { "creationTimestamp": { @@ -73811,7 +74230,7 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for Classic external HTTP(S) load balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." + "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", @@ -74420,7 +74839,7 @@ "id": "UrlMapsValidateRequest", "properties": { "loadBalancingSchemes": { - "description": "Specifies the load balancer type(s) this validation request is for. Use EXTERNAL_MANAGED for HTTP/HTTPS External Global Load Balancer with Advanced Traffic Management. Use EXTERNAL for Classic HTTP/HTTPS External Global Load Balancer. Other load balancer types are not supported. For more information, refer to Choosing a load balancer. If unspecified, the load balancing scheme will be inferred from the backend service resources this URL map references. If that can not be inferred (for example, this URL map only references backend buckets, or this Url map is for rewrites and redirects only and doesn't reference any backends), EXTERNAL will be used as the default type. If specified, the scheme(s) must not conflict with the load balancing scheme of the backend service resources this Url map references.", + "description": "Specifies the load balancer type(s) this validation request is for. Use EXTERNAL_MANAGED for global external Application Load Balancers and regional external Application Load Balancers. Use EXTERNAL for classic Application Load Balancers. Use INTERNAL_MANAGED for internal Application Load Balancers. For more information, refer to Choosing a load balancer. If unspecified, the load balancing scheme will be inferred from the backend service resources this URL map references. If that can not be inferred (for example, this URL map only references backend buckets, or this Url map is for rewrites and redirects only and doesn't reference any backends), EXTERNAL will be used as the default type. If specified, the scheme(s) must not conflict with the load balancing scheme of the backend service resources this Url map references.", "items": { "enum": [ "EXTERNAL", @@ -74428,9 +74847,9 @@ "LOAD_BALANCING_SCHEME_UNSPECIFIED" ], "enumDescriptions": [ - "Signifies that this will be used for Classic L7 External Load Balancing.", - "Signifies that this will be used for Envoy-based L7 External Load Balancing.", - "If unspecified, the validation will try to infer the scheme from the backend service resources this Url map references. If the inferrence is not possible, EXTERNAL will be used as the default type." + "Signifies that this will be used for classic Application Load Balancers.", + "Signifies that this will be used for Envoy-based global external Application Load Balancers.", + "If unspecified, the validation will try to infer the scheme from the backend service resources this Url map references. If the inference is not possible, EXTERNAL will be used as the default type." ], "type": "string" }, @@ -74506,6 +74925,7 @@ "purpose": { "description": "The purpose of the resource. This field can be either PRIVATE, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or INTERNAL_HTTPS_LOAD_BALANCER. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. A subnet with purpose set to REGIONAL_MANAGED_PROXY is a user-created subnetwork that is reserved for regional Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a proxy-only subnet that can be used only by regional internal HTTP(S) load balancers. Note that REGIONAL_MANAGED_PROXY is the preferred setting for all regional Envoy load balancers. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.", "enum": [ + "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", "PRIVATE_RFC_1918", @@ -74513,11 +74933,12 @@ "REGIONAL_MANAGED_PROXY" ], "enumDescriptions": [ + "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing.", "Regular user created or automatically created subnet.", "Regular user created or automatically created subnet.", "Subnetworks created for Private Service Connect in the producer network.", - "Subnetwork used for Regional Internal/External HTTP(S) Load Balancing." + "Subnetwork used for Regional Envoy-based Load Balancing." ], "type": "string" }, @@ -75707,7 +76128,7 @@ "type": "integer" }, "peerGcpGateway": { - "description": "URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer GCP VPN gateway.", + "description": "URL of the peer side HA VPN gateway to which this VPN tunnel is connected. Provided by the client when the VPN tunnel is created. This field can be used when creating highly available VPN from VPC network to VPC network, the field is exclusive with the field peerExternalGateway. If provided, the VPN tunnel will automatically use the same vpnGatewayInterface ID in the peer Google Cloud VPN gateway.", "type": "string" }, "peerIp": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index ccac09b69b3..0b8b9a4d95e 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/compute/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // computeService, err := compute.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // computeService, err := compute.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package compute // import "google.golang.org/api/compute/v1" import ( @@ -2045,6 +2059,10 @@ type AccessConfig struct { // external IPv6 range. PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this access config. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SetPublicPtr: Specifies whether a public DNS 'PTR' record should be // created to map the external IP address of the instance to a DNS // domain name. This field is not used in ipv6AccessConfig. A default @@ -4785,7 +4803,7 @@ type AutoscalingPolicyScalingSchedule struct { // TimeZone: The time zone to use when interpreting the schedule. The // value of this field must be a time zone name from the tz database: - // http://en.wikipedia.org/wiki/Tz_database. This field is assigned a + // https://en.wikipedia.org/wiki/Tz_database. This field is assigned a // default value of “UTC” if left empty. TimeZone string `json:"timeZone,omitempty"` @@ -7660,6 +7678,57 @@ func (s *BulkInsertInstanceResourcePerInstanceProperties) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BulkInsertOperationStatus struct { + // CreatedVmCount: [Output Only] Count of VMs successfully created so + // far. + CreatedVmCount int64 `json:"createdVmCount,omitempty"` + + // DeletedVmCount: [Output Only] Count of VMs that got deleted during + // rollback. + DeletedVmCount int64 `json:"deletedVmCount,omitempty"` + + // FailedToCreateVmCount: [Output Only] Count of VMs that started + // creating but encountered an error. + FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` + + // Status: [Output Only] Creation status of BulkInsert operation - + // information if the flow is rolling forward or rolling back. + // + // Possible values: + // "CREATING" - Rolling forward - creating VMs. + // "DONE" - Done + // "ROLLING_BACK" - Rolling back - cleaning up after an error. + // "STATUS_UNSPECIFIED" + Status string `json:"status,omitempty"` + + // TargetVmCount: [Output Only] Count of VMs originally planned to be + // created. + TargetVmCount int64 `json:"targetVmCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreatedVmCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { + type NoMethod BulkInsertOperationStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CacheInvalidationRule struct { // Host: If set, this invalidation rule will only apply to requests with // a Host header matching host. @@ -7935,6 +8004,7 @@ type Commitment struct { // "COMPUTE_OPTIMIZED" // "COMPUTE_OPTIMIZED_C2D" // "COMPUTE_OPTIMIZED_C3" + // "COMPUTE_OPTIMIZED_C3D" // "COMPUTE_OPTIMIZED_H3" // "GENERAL_PURPOSE" // "GENERAL_PURPOSE_E2" @@ -9147,7 +9217,7 @@ type Disk struct { // sourceSnapshot, or sourceDisk parameter, or specify it alone to // create an empty persistent disk. If you specify this field along with // a source, the value of sizeGb must not be less than the size of the - // source. Acceptable values are 1 to 65536, inclusive. + // source. Acceptable values are greater than 0. SizeGb int64 `json:"sizeGb,omitempty,string"` // SourceConsistencyGroupPolicy: [Output Only] URL of the @@ -16851,10 +16921,9 @@ type HttpRouteAction struct { // retry_policy is ignored by clients that are configured with a // fault_injection_policy if: 1. The traffic is generated by fault // injection AND 2. The fault injection is not a delay fault injection. - // Fault injection is not supported with the global external HTTP(S) - // load balancer (classic). To see which load balancers support fault - // injection, see Load balancing: Routing and traffic management - // features. + // Fault injection is not supported with the classic Application Load + // Balancer . To see which load balancers support fault injection, see + // Load balancing: Routing and traffic management features. FaultInjectionPolicy *HttpFaultInjection `json:"faultInjectionPolicy,omitempty"` // MaxStreamDuration: Specifies the maximum duration (timeout) for @@ -16893,9 +16962,9 @@ type HttpRouteAction struct { // UrlRewrite: The spec to modify the URL of the request, before // forwarding the request to the matched service. urlRewrite is the only - // action supported in UrlMaps for external HTTP(S) load balancers. Not - // supported when the URL map is bound to a target gRPC proxy that has - // the validateForProxyless field set to true. + // action supported in UrlMaps for classic Application Load Balancers. + // Not supported when the URL map is bound to a target gRPC proxy that + // has the validateForProxyless field set to true. UrlRewrite *UrlRewrite `json:"urlRewrite,omitempty"` // WeightedBackendServices: A list of weighted backend services to send @@ -16982,8 +17051,8 @@ type HttpRouteRule struct { // service must not be set. Conversely if service is set, routeAction // cannot contain any weightedBackendServices. Only one of urlRedirect, // service or routeAction.weightedBackendService must be set. URL maps - // for Classic external HTTP(S) load balancers only support the - // urlRewrite action within a route rule's routeAction. + // for classic Application Load Balancers only support the urlRewrite + // action within a route rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to @@ -22799,6 +22868,35 @@ func (s *InstancesAddResourcePoliciesRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesBulkInsertOperationMetadata struct { + // PerLocationStatus: Status information per location (location name is + // key). Example key: zones/us-central1-a + PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PerLocationStatus") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PerLocationStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InstancesBulkInsertOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstancesGetEffectiveFirewallsResponse struct { // FirewallPolicys: Effective firewalls from firewall policies. FirewallPolicys []*InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy `json:"firewallPolicys,omitempty"` @@ -23231,6 +23329,42 @@ func (s *InstancesSetNameRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesSetSecurityPolicyRequest struct { + // NetworkInterfaces: The network interfaces that the security policy + // will be applied to. Network interfaces use the nicN naming format. + // You can only set a security policy for network interfaces with an + // access config. + NetworkInterfaces []string `json:"networkInterfaces,omitempty"` + + // SecurityPolicy: A full or partial URL to a security policy to add to + // this instance. If this field is set to an empty string it will remove + // the associated security policy. + SecurityPolicy string `json:"securityPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkInterfaces") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NetworkInterfaces") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesSetSecurityPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstancesSetSecurityPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstancesSetServiceAccountRequest struct { // Email: Email address of the service account. Email string `json:"email,omitempty"` @@ -23738,8 +23872,8 @@ type InterconnectAttachment struct { // PairingKey: [Output only for type PARTNER. Input only for // PARTNER_PROVIDER. Not present for DEDICATED]. The opaque identifier - // of an PARTNER attachment used to initiate provisioning with a - // selected partner. Of the form "XXXXX/region/domain" + // of a PARTNER attachment used to initiate provisioning with a selected + // partner. Of the form "XXXXX/region/domain" PairingKey string `json:"pairingKey,omitempty"` // PartnerAsn: Optional BGP ASN for the router supplied by a Layer 3 @@ -23749,8 +23883,8 @@ type InterconnectAttachment struct { PartnerAsn int64 `json:"partnerAsn,omitempty,string"` // PartnerMetadata: Informational metadata about Partner attachments - // from Partners to display to customers. Output only for for PARTNER - // type, mutable for PARTNER_PROVIDER, not available for DEDICATED. + // from Partners to display to customers. Output only for PARTNER type, + // mutable for PARTNER_PROVIDER, not available for DEDICATED. PartnerMetadata *InterconnectAttachmentPartnerMetadata `json:"partnerMetadata,omitempty"` // PrivateInterconnectInfo: [Output Only] Information specific to an @@ -29908,9 +30042,8 @@ func (s *NetworkEndpoint) MarshalJSON() ([]byte, error) { // NetworkEndpointGroup: Represents a collection of network endpoints. A // network endpoint group (NEG) defines how a set of endpoints should be // reached, whether they are reachable, and where they are located. For -// more information about using NEGs, see Setting up external HTTP(S) -// Load Balancing with internet NEGs, Setting up zonal NEGs, or Setting -// up external HTTP(S) Load Balancing with serverless NEGs. +// more information about using NEGs for different use cases, see +// Network endpoint groups overview. type NetworkEndpointGroup struct { // Annotations: Metadata defined as annotations on the network endpoint // group. @@ -34636,6 +34769,8 @@ type Operation struct { // This value is in RFC3339 text format. InsertTime string `json:"insertTime,omitempty"` + InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` + // Kind: [Output Only] Type of the resource. Always `compute#operation` // for Operation resources. Kind string `json:"kind,omitempty"` @@ -36590,8 +36725,8 @@ type PathMatcher struct { // defaultService must not be set. Conversely if defaultService is set, // defaultRouteAction cannot contain any weightedBackendServices. Only // one of defaultRouteAction or defaultUrlRedirect must be set. URL maps - // for Classic external HTTP(S) load balancers only support the - // urlRewrite action within a path matcher's defaultRouteAction. + // for classic Application Load Balancers only support the urlRewrite + // action within a path matcher's defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService @@ -36694,9 +36829,9 @@ type PathRule struct { // backend. If routeAction specifies any weightedBackendServices, // service must not be set. Conversely if service is set, routeAction // cannot contain any weightedBackendServices. Only one of routeAction - // or urlRedirect must be set. URL maps for Classic external HTTP(S) - // load balancers only support the urlRewrite action within a path - // rule's routeAction. + // or urlRedirect must be set. URL maps for classic Application Load + // Balancers only support the urlRewrite action within a path rule's + // routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to @@ -36817,7 +36952,7 @@ func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -36826,17 +36961,17 @@ func (s *PerInstanceConfig) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -43036,7 +43171,10 @@ type Route struct { Description string `json:"description,omitempty"` // DestRange: The destination range of outgoing packets that this route - // applies to. Both IPv4 and IPv6 are supported. + // applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 + // range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. + // 2001:db8::/32). IPv6 range will be displayed using RFC 5952 + // compressed format. DestRange string `json:"destRange,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -43085,7 +43223,12 @@ type Route struct { NextHopInstance string `json:"nextHopInstance,omitempty"` // NextHopIp: The network IP address of an instance that should handle - // matching packets. Only IPv4 is supported. + // matching packets. Both IPv6 address and IPv4 addresses are supported. + // Must specify an IPv4 address in dot-decimal notation (e.g. + // 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. + // 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will + // be displayed using RFC 5952 compressed format (e.g. + // 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. NextHopIp string `json:"nextHopIp,omitempty"` // NextHopNetwork: The URL of the local network if it should handle @@ -43571,9 +43714,12 @@ type Router struct { // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` - // Interfaces: Router interfaces. Each interface requires either one - // linked resource, (for example, linkedVpnTunnel), or IP address and IP - // address range (for example, ipRange), or both. + // Interfaces: Router interfaces. To create a BGP peer that uses a + // router interface, the interface must have one of the following fields + // specified: - linkedVpnTunnel - linkedInterconnectAttachment - + // subnetwork You can create a router interface without any of these + // fields specified. However, you cannot create a BGP peer that uses + // that interface. Interfaces []*RouterInterface `json:"interfaces,omitempty"` // Kind: [Output Only] Type of resource. Always compute#router for @@ -44179,13 +44325,13 @@ type RouterInterface struct { // LinkedInterconnectAttachment: URI of the linked Interconnect // attachment. It must be in the same region as the router. Each // interface can have one linked resource, which can be a VPN tunnel, an - // Interconnect attachment, or a virtual machine instance. + // Interconnect attachment, or a subnetwork. LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"` // LinkedVpnTunnel: URI of the linked VPN tunnel, which must be in the // same region as the router. Each interface can have one linked // resource, which can be a VPN tunnel, an Interconnect attachment, or a - // virtual machine instance. + // subnetwork. LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"` // ManagementType: [Output Only] The resource that configures and @@ -44467,7 +44613,7 @@ type RouterMd5AuthenticationKey struct { Key string `json:"key,omitempty"` // Name: Name used to identify the key. Must be unique within a router. - // Must be referenced by at least one bgpPeer. Must comply with RFC1035. + // Must be referenced by exactly one bgpPeer. Must comply with RFC1035. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Key") to @@ -44501,8 +44647,8 @@ func (s *RouterMd5AuthenticationKey) MarshalJSON() ([]byte, error) { // no external IPs are provided. type RouterNat struct { // AutoNetworkTier: The network tier to use when automatically reserving - // IP addresses. Must be one of: PREMIUM, STANDARD. If not specified, - // PREMIUM tier will be used. + // NAT IP addresses. Must be one of: PREMIUM, STANDARD. If not + // specified, then the current project-level default tier is used. // // Possible values: // "FIXED_STANDARD" - Public internet quality with fixed bandwidth. @@ -46359,6 +46505,15 @@ type SecurityPolicy struct { // "CLOUD_ARMOR_NETWORK" Type string `json:"type,omitempty"` + // UserDefinedFields: Definitions of user-defined fields for + // CLOUD_ARMOR_NETWORK policies. A user-defined field consists of up to + // 4 bytes extracted from a fixed offset in the packet, relative to the + // IPv4, IPv6, TCP, or UDP header, with an optional mask to select + // certain bits. Rules may then specify matching values for these + // fields. Example: userDefinedFields: - name: "ipv4_fragment_offset" + // base: IPV4 offset: 6 size: 2 mask: "0x1fff" + UserDefinedFields []*SecurityPolicyUserDefinedField `json:"userDefinedFields,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -46910,6 +47065,31 @@ type SecurityPolicyRule struct { // If it evaluates to true, the corresponding 'action' is enforced. Match *SecurityPolicyRuleMatcher `json:"match,omitempty"` + // NetworkMatch: A match condition that incoming packets are evaluated + // against for CLOUD_ARMOR_NETWORK security policies. If it matches, the + // corresponding 'action' is enforced. The match criteria for a rule + // consists of built-in match fields (like 'srcIpRanges') and + // potentially multiple user-defined match fields ('userDefinedFields'). + // Field values may be extracted directly from the packet or derived + // from it (e.g. 'srcRegionCodes'). Some fields may not be present in + // every packet (e.g. 'srcPorts'). A user-defined field is only present + // if the base header is found in the packet and the entire field is in + // bounds. Each match field may specify which values can match it, + // listing one or more ranges, prefixes, or exact values that are + // considered a match for the field. A field value must be present in + // order to match a specified match field. If no match values are + // specified for a match field, then any field value is considered to + // match it, and it's not required to be present. For strings specifying + // '*' is also equivalent to match all. For a packet to match a rule, + // all specified match fields must match the corresponding field values + // derived from the packet. Example: networkMatch: srcIpRanges: - + // "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: + // "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition + // matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 + // and a user-defined field named "ipv4_fragment_offset" with a value + // between 1 and 0x1fff inclusive. + NetworkMatch *SecurityPolicyRuleNetworkMatcher `json:"networkMatch,omitempty"` + // PreconfiguredWafConfig: Preconfigured WAF configuration to be applied // for the rule. If the rule does not evaluate preconfigured WAF rules, // i.e., if evaluatePreconfiguredWaf() is not used, this field will have @@ -47101,6 +47281,99 @@ func (s *SecurityPolicyRuleMatcherConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecurityPolicyRuleNetworkMatcher: Represents a match condition that +// incoming network traffic is evaluated against. +type SecurityPolicyRuleNetworkMatcher struct { + // DestIpRanges: Destination IPv4/IPv6 addresses or CIDR prefixes, in + // standard text format. + DestIpRanges []string `json:"destIpRanges,omitempty"` + + // DestPorts: Destination port numbers for TCP/UDP/SCTP. Each element + // can be a 16-bit unsigned decimal number (e.g. "80") or range (e.g. + // "0-1023"). + DestPorts []string `json:"destPorts,omitempty"` + + // IpProtocols: IPv4 protocol / IPv6 next header (after extension + // headers). Each element can be an 8-bit unsigned decimal number (e.g. + // "6"), range (e.g. "253-254"), or one of the following protocol names: + // "tcp", "udp", "icmp", "esp", "ah", "ipip", or "sctp". + IpProtocols []string `json:"ipProtocols,omitempty"` + + // SrcAsns: BGP Autonomous System Number associated with the source IP + // address. + SrcAsns []int64 `json:"srcAsns,omitempty"` + + // SrcIpRanges: Source IPv4/IPv6 addresses or CIDR prefixes, in standard + // text format. + SrcIpRanges []string `json:"srcIpRanges,omitempty"` + + // SrcPorts: Source port numbers for TCP/UDP/SCTP. Each element can be a + // 16-bit unsigned decimal number (e.g. "80") or range (e.g. "0-1023"). + SrcPorts []string `json:"srcPorts,omitempty"` + + // SrcRegionCodes: Two-letter ISO 3166-1 alpha-2 country code associated + // with the source IP address. + SrcRegionCodes []string `json:"srcRegionCodes,omitempty"` + + // UserDefinedFields: User-defined fields. Each element names a defined + // field and lists the matching values for that field. + UserDefinedFields []*SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch `json:"userDefinedFields,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestIpRanges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestIpRanges") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleNetworkMatcher) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleNetworkMatcher + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch struct { + // Name: Name of the user-defined field, as given in the definition. + Name string `json:"name,omitempty"` + + // Values: Matching values of the field. Each element can be a 32-bit + // unsigned decimal or hexadecimal (starting with "0x") number (e.g. + // "64") or range (e.g. "0x400-0x7ff"). + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyRuleNetworkMatcherUserDefinedFieldMatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SecurityPolicyRulePreconfiguredWafConfig struct { // Exclusions: A list of exclusions to apply during preconfigured WAF // evaluation. @@ -47461,6 +47734,62 @@ func (s *SecurityPolicyRuleRedirectOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SecurityPolicyUserDefinedField struct { + // Base: The base relative to which 'offset' is measured. Possible + // values are: - IPV4: Points to the beginning of the IPv4 header. - + // IPV6: Points to the beginning of the IPv6 header. - TCP: Points to + // the beginning of the TCP header, skipping over any IPv4 options or + // IPv6 extension headers. Not present for non-first fragments. - UDP: + // Points to the beginning of the UDP header, skipping over any IPv4 + // options or IPv6 extension headers. Not present for non-first + // fragments. required + // + // Possible values: + // "IPV4" + // "IPV6" + // "TCP" + // "UDP" + Base string `json:"base,omitempty"` + + // Mask: If specified, apply this mask (bitwise AND) to the field to + // ignore bits before matching. Encoded as a hexadecimal number + // (starting with "0x"). The last byte of the field (in network byte + // order) corresponds to the least significant byte of the mask. + Mask string `json:"mask,omitempty"` + + // Name: The name of this field. Must be unique within the policy. + Name string `json:"name,omitempty"` + + // Offset: Offset of the first byte of the field (in network byte order) + // relative to 'base'. + Offset int64 `json:"offset,omitempty"` + + // Size: Size of the field in bytes. Valid values: 1-4. + Size int64 `json:"size,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Base") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Base") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecurityPolicyUserDefinedField) MarshalJSON() ([]byte, error) { + type NoMethod SecurityPolicyUserDefinedField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SecuritySettings: The authentication and authorization settings for a // BackendService. type SecuritySettings struct { @@ -49313,16 +49642,19 @@ func (s *SourceInstanceProperties) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SslCertificate: Represents an SSL Certificate resource. Google -// Compute Engine has two SSL Certificate resources: * Global +// SslCertificate: Represents an SSL certificate resource. Google +// Compute Engine has two SSL certificate resources: * Global // (/compute/docs/reference/rest/v1/sslCertificates) * Regional -// (/compute/docs/reference/rest/v1/regionSslCertificates) The -// sslCertificates are used by: - external HTTPS load balancers - SSL -// proxy load balancers The regionSslCertificates are used by internal -// HTTPS load balancers. Optionally, certificate file contents that you -// upload can contain a set of up to five PEM-encoded certificates. The -// API call creates an object (sslCertificate) that holds this data. You -// can use SSL keys and certificates to secure connections to a load +// (/compute/docs/reference/rest/v1/regionSslCertificates) The global +// SSL certificates (sslCertificates) are used by: - Global external +// Application Load Balancers - Classic Application Load Balancers - +// Proxy Network Load Balancers (with target SSL proxies) The regional +// SSL certificates (regionSslCertificates) are used by: - Regional +// external Application Load Balancers - Regional internal Application +// Load Balancers Optionally, certificate file contents that you upload +// can contain a set of up to five PEM-encoded certificates. The API +// call creates an object (sslCertificate) that holds this data. You can +// use SSL keys and certificates to secure connections to a load // balancer. For more information, read Creating and using SSL // certificates, SSL certificates quotas and limits, and Troubleshooting // SSL certificates. @@ -51212,6 +51544,8 @@ type Subnetwork struct { // purpose field is set to REGIONAL_MANAGED_PROXY. // // Possible values: + // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based + // Load Balancing. // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal // HTTP(S) Load Balancing. // "PRIVATE" - Regular user created or automatically created subnet. @@ -51219,8 +51553,8 @@ type Subnetwork struct { // subnet. // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional - // Internal/External HTTP(S) Load Balancing. + // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based + // Load Balancing. Purpose string `json:"purpose,omitempty"` // Region: URL of the region where the Subnetwork resides. This field @@ -52680,11 +53014,14 @@ func (s *TargetHttpProxiesScopedListWarningData) MarshalJSON() ([]byte, error) { // (/compute/docs/reference/rest/v1/targetHttpProxies) * Regional // (/compute/docs/reference/rest/v1/regionTargetHttpProxies) A target // HTTP proxy is a component of GCP HTTP load balancers. * -// targetHttpProxies are used by external HTTP load balancers and -// Traffic Director. * regionTargetHttpProxies are used by internal HTTP -// load balancers. Forwarding rules reference a target HTTP proxy, and -// the target proxy then references a URL map. For more information, -// read Using Target Proxies and Forwarding rule concepts. +// targetHttpProxies are used by global external Application Load +// Balancers, classic Application Load Balancers, cross-region internal +// Application Load Balancers, and Traffic Director. * +// regionTargetHttpProxies are used by regional internal Application +// Load Balancers and regional external Application Load Balancers. +// Forwarding rules reference a target HTTP proxy, and the target proxy +// then references a URL map. For more information, read Using Target +// Proxies and Forwarding rule concepts. type TargetHttpProxy struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -52706,10 +53043,10 @@ type TargetHttpProxy struct { // HttpKeepAliveTimeoutSec: Specifies how long to keep a connection // open, after completing a response, while there is no matching traffic // (in seconds). If an HTTP keep-alive is not specified, a default value - // (610 seconds) will be used. For Global external HTTP(S) load - // balancer, the minimum allowed value is 5 seconds and the maximum - // allowed value is 1200 seconds. For Global external HTTP(S) load - // balancer (classic), this option is not available publicly. + // (610 seconds) will be used. For global external Application Load + // Balancers, the minimum allowed value is 5 seconds and the maximum + // allowed value is 1200 seconds. For classic Application Load + // Balancers, this option is not supported. HttpKeepAliveTimeoutSec int64 `json:"httpKeepAliveTimeoutSec,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -53301,8 +53638,11 @@ func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, err // (/compute/docs/reference/rest/v1/targetHttpsProxies) * Regional // (/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target // HTTPS proxy is a component of GCP HTTPS load balancers. * -// targetHttpsProxies are used by external HTTPS load balancers. * -// regionTargetHttpsProxies are used by internal HTTPS load balancers. +// targetHttpProxies are used by global external Application Load +// Balancers, classic Application Load Balancers, cross-region internal +// Application Load Balancers, and Traffic Director. * +// regionTargetHttpProxies are used by regional internal Application +// Load Balancers and regional external Application Load Balancers. // Forwarding rules reference a target HTTPS proxy, and the target proxy // then references a URL map. For more information, read Using Target // Proxies and Forwarding rule concepts. @@ -53345,10 +53685,10 @@ type TargetHttpsProxy struct { // HttpKeepAliveTimeoutSec: Specifies how long to keep a connection // open, after completing a response, while there is no matching traffic // (in seconds). If an HTTP keep-alive is not specified, a default value - // (610 seconds) will be used. For Global external HTTP(S) load - // balancer, the minimum allowed value is 5 seconds and the maximum - // allowed value is 1200 seconds. For Global external HTTP(S) load - // balancer (classic), this option is not available publicly. + // (610 seconds) will be used. For global external Application Load + // Balancers, the minimum allowed value is 5 seconds and the maximum + // allowed value is 1200 seconds. For classic Application Load + // Balancers, this option is not supported. HttpKeepAliveTimeoutSec int64 `json:"httpKeepAliveTimeoutSec,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -53906,6 +54246,10 @@ type TargetInstance struct { // network that the default network interface belongs to. Network string `json:"network,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this target instance. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -54574,6 +54918,10 @@ type TargetPool struct { // resides. Region string `json:"region,omitempty"` + // SecurityPolicy: [Output Only] The resource URL for the security + // policy associated with this target pool. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -57322,19 +57670,21 @@ func (s *Uint128) MarshalJSON() ([]byte, error) { // resources: * Global (/compute/docs/reference/rest/v1/urlMaps) * // Regional (/compute/docs/reference/rest/v1/regionUrlMaps) A URL map // resource is a component of certain types of cloud load balancers and -// Traffic Director: * urlMaps are used by external HTTP(S) load -// balancers and Traffic Director. * regionUrlMaps are used by internal -// HTTP(S) load balancers. For a list of supported URL map features by -// the load balancer type, see the Load balancing features: Routing and -// traffic management table. For a list of supported URL map features -// for Traffic Director, see the Traffic Director features: Routing and -// traffic management table. This resource defines mappings from -// hostnames and URL paths to either a backend service or a backend -// bucket. To use the global urlMaps resource, the backend service must -// have a loadBalancingScheme of either EXTERNAL or -// INTERNAL_SELF_MANAGED. To use the regionUrlMaps resource, the backend -// service must have a loadBalancingScheme of INTERNAL_MANAGED. For more -// information, read URL Map Concepts. +// Traffic Director: * urlMaps are used by global external Application +// Load Balancers, classic Application Load Balancers, and cross-region +// internal Application Load Balancers. * regionUrlMaps are used by +// internal Application Load Balancers, regional external Application +// Load Balancers and regional internal Application Load Balancers. For +// a list of supported URL map features by the load balancer type, see +// the Load balancing features: Routing and traffic management table. +// For a list of supported URL map features for Traffic Director, see +// the Traffic Director features: Routing and traffic management table. +// This resource defines mappings from hostnames and URL paths to either +// a backend service or a backend bucket. To use the global urlMaps +// resource, the backend service must have a loadBalancingScheme of +// either EXTERNAL or INTERNAL_SELF_MANAGED. To use the regionUrlMaps +// resource, the backend service must have a loadBalancingScheme of +// INTERNAL_MANAGED. For more information, read URL Map Concepts. type UrlMap struct { // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. @@ -57347,8 +57697,8 @@ type UrlMap struct { // any weightedBackendServices, defaultService must not be set. // Conversely if defaultService is set, defaultRouteAction cannot // contain any weightedBackendServices. Only one of defaultRouteAction - // or defaultUrlRedirect must be set. URL maps for Classic external - // HTTP(S) load balancers only support the urlRewrite action within + // or defaultUrlRedirect must be set. URL maps for classic Application + // Load Balancers only support the urlRewrite action within // defaultRouteAction. defaultRouteAction has no effect when the URL map // is bound to a target gRPC proxy that has the validateForProxyless // field set to true. @@ -58181,27 +58531,27 @@ func (s *UrlMapsScopedListWarningData) MarshalJSON() ([]byte, error) { type UrlMapsValidateRequest struct { // LoadBalancingSchemes: Specifies the load balancer type(s) this - // validation request is for. Use EXTERNAL_MANAGED for HTTP/HTTPS - // External Global Load Balancer with Advanced Traffic Management. Use - // EXTERNAL for Classic HTTP/HTTPS External Global Load Balancer. Other - // load balancer types are not supported. For more information, refer to - // Choosing a load balancer. If unspecified, the load balancing scheme - // will be inferred from the backend service resources this URL map - // references. If that can not be inferred (for example, this URL map - // only references backend buckets, or this Url map is for rewrites and - // redirects only and doesn't reference any backends), EXTERNAL will be - // used as the default type. If specified, the scheme(s) must not - // conflict with the load balancing scheme of the backend service - // resources this Url map references. + // validation request is for. Use EXTERNAL_MANAGED for global external + // Application Load Balancers and regional external Application Load + // Balancers. Use EXTERNAL for classic Application Load Balancers. Use + // INTERNAL_MANAGED for internal Application Load Balancers. For more + // information, refer to Choosing a load balancer. If unspecified, the + // load balancing scheme will be inferred from the backend service + // resources this URL map references. If that can not be inferred (for + // example, this URL map only references backend buckets, or this Url + // map is for rewrites and redirects only and doesn't reference any + // backends), EXTERNAL will be used as the default type. If specified, + // the scheme(s) must not conflict with the load balancing scheme of the + // backend service resources this Url map references. // // Possible values: - // "EXTERNAL" - Signifies that this will be used for Classic L7 - // External Load Balancing. + // "EXTERNAL" - Signifies that this will be used for classic + // Application Load Balancers. // "EXTERNAL_MANAGED" - Signifies that this will be used for - // Envoy-based L7 External Load Balancing. + // Envoy-based global external Application Load Balancers. // "LOAD_BALANCING_SCHEME_UNSPECIFIED" - If unspecified, the // validation will try to infer the scheme from the backend service - // resources this Url map references. If the inferrence is not possible, + // resources this Url map references. If the inference is not possible, // EXTERNAL will be used as the default type. LoadBalancingSchemes []string `json:"loadBalancingSchemes,omitempty"` @@ -58362,6 +58712,8 @@ type UsableSubnetwork struct { // purpose field is set to REGIONAL_MANAGED_PROXY. // // Possible values: + // "GLOBAL_MANAGED_PROXY" - Subnet reserved for Global Envoy-based + // Load Balancing. // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal // HTTP(S) Load Balancing. // "PRIVATE" - Regular user created or automatically created subnet. @@ -58369,8 +58721,8 @@ type UsableSubnetwork struct { // subnet. // "PRIVATE_SERVICE_CONNECT" - Subnetworks created for Private Service // Connect in the producer network. - // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional - // Internal/External HTTP(S) Load Balancing. + // "REGIONAL_MANAGED_PROXY" - Subnetwork used for Regional Envoy-based + // Load Balancing. Purpose string `json:"purpose,omitempty"` // Role: The role of subnetwork. Currently, this field is only used when @@ -60014,13 +60366,13 @@ type VpnTunnel struct { // redundancy type. PeerExternalGatewayInterface int64 `json:"peerExternalGatewayInterface,omitempty"` - // PeerGcpGateway: URL of the peer side HA GCP VPN gateway to which this - // VPN tunnel is connected. Provided by the client when the VPN tunnel - // is created. This field can be used when creating highly available VPN + // PeerGcpGateway: URL of the peer side HA VPN gateway to which this VPN + // tunnel is connected. Provided by the client when the VPN tunnel is + // created. This field can be used when creating highly available VPN // from VPC network to VPC network, the field is exclusive with the // field peerExternalGateway. If provided, the VPN tunnel will - // automatically use the same vpnGatewayInterface ID in the peer GCP VPN - // gateway. + // automatically use the same vpnGatewayInterface ID in the peer Google + // Cloud VPN gateway. PeerGcpGateway string `json:"peerGcpGateway,omitempty"` // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. @@ -106947,32 +107299,33 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio } -// method id "compute.instances.setServiceAccount": +// method id "compute.instances.setSecurityPolicy": -type InstancesSetServiceAccountCall struct { +type InstancesSetSecurityPolicyCall struct { s *Service project string zone string instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest + instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SetServiceAccount: Sets the service account on the instance. For more -// information, read Changing the service account and access scopes for -// an instance. +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified instance. For more information, see Google Cloud Armor +// Overview // -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the Instance resource to which the security +// policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone scoping this request. +func (r *InstancesService) SetSecurityPolicy(project string, zone string, instance string, instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest) *InstancesSetSecurityPolicyCall { + c := &InstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest + c.instancessetsecuritypolicyrequest = instancessetsecuritypolicyrequest return c } @@ -106987,7 +107340,7 @@ func (r *InstancesService) SetServiceAccount(project string, zone string, instan // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { +func (c *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesSetSecurityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -106995,7 +107348,7 @@ func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { +func (c *InstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107003,21 +107356,21 @@ func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *Instances // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { +func (c *InstancesSetSecurityPolicyCall) Context(ctx context.Context) *InstancesSetSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { +func (c *InstancesSetSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107025,14 +107378,14 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetsecuritypolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -107047,14 +107400,14 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setServiceAccount" call. +// Do executes the "compute.instances.setSecurityPolicy" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107085,10 +107438,10 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", + // "description": "Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", // "httpMethod": "POST", - // "id": "compute.instances.setServiceAccount", + // "id": "compute.instances.setSecurityPolicy", // "parameterOrder": [ // "project", // "zone", @@ -107096,9 +107449,8 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper // ], // "parameters": { // "instance": { - // "description": "Name of the instance resource to start.", + // "description": "Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035.", // "location": "path", - // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, // "type": "string" // }, @@ -107115,16 +107467,16 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper // "type": "string" // }, // "zone": { - // "description": "The name of the zone for this request.", + // "description": "Name of the zone scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", // "required": true, // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy", // "request": { - // "$ref": "InstancesSetServiceAccountRequest" + // "$ref": "InstancesSetSecurityPolicyRequest" // }, // "response": { // "$ref": "Operation" @@ -107137,33 +107489,32 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper } -// method id "compute.instances.setShieldedInstanceIntegrityPolicy": +// method id "compute.instances.setServiceAccount": -type InstancesSetShieldedInstanceIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetServiceAccountCall struct { + s *Service + project string + zone string + instance string + instancessetserviceaccountrequest *InstancesSetServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance -// integrity policy for an instance. You can only use this method on a -// running instance. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// SetServiceAccount: Sets the service account on the instance. For more +// information, read Changing the service account and access scopes for +// an instance. // -// - instance: Name or id of the instance scoping this request. +// - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { + c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy + c.instancessetserviceaccountrequest = instancessetserviceaccountrequest return c } @@ -107178,7 +107529,7 @@ func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zo // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { c.urlParams_.Set("requestId", requestId) return c } @@ -107186,7 +107537,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107194,21 +107545,21 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { +func (c *InstancesSetServiceAccountCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107216,16 +107567,16 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -107238,14 +107589,14 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. +// Do executes the "compute.instances.setServiceAccount" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107276,10 +107627,10 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", - // "httpMethod": "PATCH", - // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", + // "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", + // "httpMethod": "POST", + // "id": "compute.instances.setServiceAccount", // "parameterOrder": [ // "project", // "zone", @@ -107287,7 +107638,7 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C // ], // "parameters": { // "instance": { - // "description": "Name or id of the instance scoping this request.", + // "description": "Name of the instance resource to start.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -107313,9 +107664,9 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount", // "request": { - // "$ref": "ShieldedInstanceIntegrityPolicy" + // "$ref": "InstancesSetServiceAccountRequest" // }, // "response": { // "$ref": "Operation" @@ -107328,31 +107679,33 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C } -// method id "compute.instances.setTags": +// method id "compute.instances.setShieldedInstanceIntegrityPolicy": -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetShieldedInstanceIntegrityPolicyCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetTags: Sets network tags for the specified instance to the data -// included in the request. +// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance +// integrity policy for an instance. You can only use this method on a +// running instance. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. // -// - instance: Name of the instance scoping this request. +// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.tags = tags + c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy return c } @@ -107367,7 +107720,7 @@ func (r *InstancesService) SetTags(project string, zone string, instance string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -107375,7 +107728,7 @@ func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107383,21 +107736,21 @@ func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107405,16 +107758,16 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -107427,14 +107780,14 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setTags" call. +// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107465,10 +107818,10 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Sets network tags for the specified instance to the data included in the request.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setTags", - // "httpMethod": "POST", - // "id": "compute.instances.setTags", + // "description": "Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", + // "httpMethod": "PATCH", + // "id": "compute.instances.setShieldedInstanceIntegrityPolicy", // "parameterOrder": [ // "project", // "zone", @@ -107476,7 +107829,7 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err // ], // "parameters": { // "instance": { - // "description": "Name of the instance scoping this request.", + // "description": "Name or id of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -107502,9 +107855,9 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/setTags", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy", // "request": { - // "$ref": "Tags" + // "$ref": "ShieldedInstanceIntegrityPolicy" // }, // "response": { // "$ref": "Operation" @@ -107517,29 +107870,31 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err } -// method id "compute.instances.simulateMaintenanceEvent": +// method id "compute.instances.setTags": -type InstancesSimulateMaintenanceEventCall struct { +type InstancesSetTagsCall struct { s *Service project string zone string instance string + tags *Tags urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. -// For more information, see Simulate a host maintenance event. +// SetTags: Sets network tags for the specified instance to the data +// included in the request. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { - c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { + c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.tags = tags return c } @@ -107554,7 +107909,7 @@ func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -107562,7 +107917,7 @@ func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *Ins // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107570,21 +107925,21 @@ func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *In // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { +func (c *InstancesSetTagsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107592,9 +107947,14 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -107609,14 +107969,14 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.simulateMaintenanceEvent" call. +// Do executes the "compute.instances.setTags" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107647,10 +108007,10 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", + // "description": "Sets network tags for the specified instance to the data included in the request.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/setTags", // "httpMethod": "POST", - // "id": "compute.instances.simulateMaintenanceEvent", + // "id": "compute.instances.setTags", // "parameterOrder": [ // "project", // "zone", @@ -107684,7 +108044,10 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/setTags", + // "request": { + // "$ref": "Tags" + // }, // "response": { // "$ref": "Operation" // }, @@ -107696,9 +108059,9 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) } -// method id "compute.instances.start": +// method id "compute.instances.simulateMaintenanceEvent": -type InstancesStartCall struct { +type InstancesSimulateMaintenanceEventCall struct { s *Service project string zone string @@ -107708,14 +108071,14 @@ type InstancesStartCall struct { header_ http.Header } -// Start: Starts an instance that was stopped using the instances().stop -// method. For more information, see Restart an instance. +// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. +// For more information, see Simulate a host maintenance event. // -// - instance: Name of the instance resource to start. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { + c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance @@ -107733,7 +108096,7 @@ func (r *InstancesService) Start(project string, zone string, instance string) * // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { +func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { c.urlParams_.Set("requestId", requestId) return c } @@ -107741,7 +108104,7 @@ func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { +func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107749,21 +108112,21 @@ func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { +func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesStartCall) Header() http.Header { +func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107773,7 +108136,7 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -107788,14 +108151,14 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.start" call. +// Do executes the "compute.instances.simulateMaintenanceEvent" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -107826,10 +108189,10 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } return ret, nil // { - // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/start", + // "description": "Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", // "httpMethod": "POST", - // "id": "compute.instances.start", + // "id": "compute.instances.simulateMaintenanceEvent", // "parameterOrder": [ // "project", // "zone", @@ -107837,7 +108200,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error // ], // "parameters": { // "instance": { - // "description": "Name of the instance resource to start.", + // "description": "Name of the instance scoping this request.", // "location": "path", // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", // "required": true, @@ -107863,7 +108226,7 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/start", + // "path": "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent", // "response": { // "$ref": "Operation" // }, @@ -107875,32 +108238,29 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error } -// method id "compute.instances.startWithEncryptionKey": +// method id "compute.instances.start": -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStartCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StartWithEncryptionKey: Starts an instance that was stopped using the -// instances().stop method. For more information, see Restart an -// instance. +// Start: Starts an instance that was stopped using the instances().stop +// method. For more information, see Restart an instance. // // - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { + c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest return c } @@ -107915,7 +108275,7 @@ func (r *InstancesService) StartWithEncryptionKey(project string, zone string, i // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { +func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { c.urlParams_.Set("requestId", requestId) return c } @@ -107923,7 +108283,7 @@ func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *Insta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { +func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -107931,21 +108291,21 @@ func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *Inst // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { +func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { +func (c *InstancesStartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -107953,14 +108313,9 @@ func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Respo } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -107975,14 +108330,14 @@ func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.startWithEncryptionKey" call. +// Do executes the "compute.instances.start" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -108014,9 +108369,9 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( return ret, nil // { // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", - // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/start", // "httpMethod": "POST", - // "id": "compute.instances.startWithEncryptionKey", + // "id": "compute.instances.start", // "parameterOrder": [ // "project", // "zone", @@ -108050,10 +108405,7 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // } // }, - // "path": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", - // "request": { - // "$ref": "InstancesStartWithEncryptionKeyRequest" - // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/start", // "response": { // "$ref": "Operation" // }, @@ -108065,41 +108417,32 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( } -// method id "compute.instances.stop": +// method id "compute.instances.startWithEncryptionKey": -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStartWithEncryptionKeyCall struct { + s *Service + project string + zone string + instance string + instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Stop: Stops a running instance, shutting it down cleanly, and allows -// you to restart the instance at a later time. Stopped instances do not -// incur VM usage charges while they are stopped. However, resources -// that the VM is using, such as persistent disks and static IP -// addresses, will continue to be charged until they are deleted. For -// more information, see Stopping an instance. +// StartWithEncryptionKey: Starts an instance that was stopped using the +// instances().stop method. For more information, see Restart an +// instance. // -// - instance: Name of the instance resource to stop. +// - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { + c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If -// true, discard the contents of any attached localSSD partitions. -// Default value is false. -func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) + c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest return c } @@ -108114,7 +108457,7 @@ func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStop // clients from accidentally creating duplicate commitments. The request // ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { +func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -108122,7 +108465,7 @@ func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { +func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -108130,21 +108473,21 @@ func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { +func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InstancesStopCall) Header() http.Header { +func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -108152,9 +108495,14 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -108169,14 +108517,208 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.stop" call. +// Do executes the "compute.instances.startWithEncryptionKey" call. // Exactly one of *Operation or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified // to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.", + // "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", + // "httpMethod": "POST", + // "id": "compute.instances.startWithEncryptionKey", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance resource to start.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey", + // "request": { + // "$ref": "InstancesStartWithEncryptionKeyRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.stop": + +type InstancesStopCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stops a running instance, shutting it down cleanly, and allows +// you to restart the instance at a later time. Stopped instances do not +// incur VM usage charges while they are stopped. However, resources +// that the VM is using, such as persistent disks and static IP +// addresses, will continue to be charged until they are deleted. For +// more information, see Stopping an instance. +// +// - instance: Name of the instance resource to stop. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { + c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// DiscardLocalSsd sets the optional parameter "discardLocalSsd": If +// true, discard the contents of any attached localSSD partitions. +// Default value is false. +func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { + c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.stop" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -140794,6 +141336,196 @@ func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) } +// method id "compute.regionBackendServices.setSecurityPolicy": + +type RegionBackendServicesSetSecurityPolicyCall struct { + s *Service + project string + region string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified backend service. For more information, see Google Cloud +// Armor Overview +// +// - backendService: Name of the BackendService resource to which the +// security policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { + c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.regionBackendServices.setSecurityPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionBackendServices.update": type RegionBackendServicesUpdateCall struct { @@ -191117,6 +191849,196 @@ func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInsta } } +// method id "compute.targetInstances.setSecurityPolicy": + +type TargetInstancesSetSecurityPolicyCall struct { + s *Service + project string + zone string + targetInstance string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified target instance. For more information, see Google Cloud +// Armor Overview +// +// - project: Project ID for this request. +// - targetInstance: Name of the TargetInstance resource to which the +// security policy should be set. The name should conform to RFC1035. +// - zone: Name of the zone scoping this request. +func (r *TargetInstancesService) SetSecurityPolicy(project string, zone string, targetInstance string, securitypolicyreference *SecurityPolicyReference) *TargetInstancesSetSecurityPolicyCall { + c := &TargetInstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.targetInstance = targetInstance + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *TargetInstancesSetSecurityPolicyCall) RequestId(requestId string) *TargetInstancesSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetInstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetInstancesSetSecurityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TargetInstancesSetSecurityPolicyCall) Context(ctx context.Context) *TargetInstancesSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetInstancesSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetInstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "targetInstance": c.targetInstance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.targetInstances.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *TargetInstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Google Cloud Armor security policy for the specified target instance. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.targetInstances.setSecurityPolicy", + // "parameterOrder": [ + // "project", + // "zone", + // "targetInstance" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetInstance": { + // "description": "Name of the TargetInstance resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/targetInstances/{targetInstance}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.targetPools.addHealthCheck": type TargetPoolsAddHealthCheckCall struct { @@ -193358,6 +194280,196 @@ func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, } +// method id "compute.targetPools.setSecurityPolicy": + +type TargetPoolsSetSecurityPolicyCall struct { + s *Service + project string + region string + targetPool string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for +// the specified target pool. For more information, see Google Cloud +// Armor Overview +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - targetPool: Name of the TargetPool resource to which the security +// policy should be set. The name should conform to RFC1035. +func (r *TargetPoolsService) SetSecurityPolicy(project string, region string, targetPool string, securitypolicyreference *SecurityPolicyReference) *TargetPoolsSetSecurityPolicyCall { + c := &TargetPoolsSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.targetPool = targetPool + c.securitypolicyreference = securitypolicyreference + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. For example, consider a +// situation where you make an initial request and the request times +// out. If you make the request again with the same request ID, the +// server can check if original operation with the same request ID was +// received, and if so, will ignore the second request. This prevents +// clients from accidentally creating duplicate commitments. The request +// ID must be a valid UUID with the exception that zero UUID is not +// supported ( 00000000-0000-0000-0000-000000000000). +func (c *TargetPoolsSetSecurityPolicyCall) RequestId(requestId string) *TargetPoolsSetSecurityPolicyCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsSetSecurityPolicyCall) Fields(s ...googleapi.Field) *TargetPoolsSetSecurityPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *TargetPoolsSetSecurityPolicyCall) Context(ctx context.Context) *TargetPoolsSetSecurityPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *TargetPoolsSetSecurityPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *TargetPoolsSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.targetPools.setSecurityPolicy" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *TargetPoolsSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the Google Cloud Armor security policy for the specified target pool. For more information, see Google Cloud Armor Overview", + // "flatPath": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + // "httpMethod": "POST", + // "id": "compute.targetPools.setSecurityPolicy", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which the security policy should be set. The name should conform to RFC1035.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/targetPools/{targetPool}/setSecurityPolicy", + // "request": { + // "$ref": "SecurityPolicyReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.targetSslProxies.delete": type TargetSslProxiesDeleteCall struct { diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index a9c75821817..3664551e6ff 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1773,7 +1773,7 @@ } } }, - "revision": "20230806", + "revision": "20230812", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2450,6 +2450,10 @@ "description": "This cofiguration provides infra configs like rate limit threshold which need to be configurable for every connector version", "id": "ConnectorInfraConfig", "properties": { + "hpaConfig": { + "$ref": "HPAConfig", + "description": "HPA autoscaling config." + }, "internalclientRatelimitThreshold": { "description": "Max QPS supported for internal requests originating from Connd.", "format": "int64", @@ -2459,6 +2463,14 @@ "description": "Max QPS supported by the connector version before throttling of requests.", "format": "int64", "type": "string" + }, + "resourceLimits": { + "$ref": "ResourceLimits", + "description": "System resource limits." + }, + "resourceRequests": { + "$ref": "ResourceRequests", + "description": "System resource requests." } }, "type": "object" @@ -2590,6 +2602,11 @@ "description": "This cofiguration provides infra configs like rate limit threshold which need to be configurable for every connector version", "id": "ConnectorVersionInfraConfig", "properties": { + "hpaConfig": { + "$ref": "HPAConfig", + "description": "Output only. HPA autoscaling config.", + "readOnly": true + }, "internalclientRatelimitThreshold": { "description": "Output only. Max QPS supported for internal requests originating from Connd.", "format": "int64", @@ -2601,6 +2618,16 @@ "format": "int64", "readOnly": true, "type": "string" + }, + "resourceLimits": { + "$ref": "ResourceLimits", + "description": "Output only. System resource limits.", + "readOnly": true + }, + "resourceRequests": { + "$ref": "ResourceRequests", + "description": "Output only. System resource requests.", + "readOnly": true } }, "type": "object" @@ -3438,6 +3465,25 @@ }, "type": "object" }, + "HPAConfig": { + "description": "Autoscaling config for connector deployment system metrics.", + "id": "HPAConfig", + "properties": { + "cpuUtilizationThreshold": { + "description": "Output only. Percent CPU utilization where HPA triggers autoscaling.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "memoryUtilizationThreshold": { + "description": "Output only. Percent Memory utilization where HPA triggers autoscaling.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Header": { "description": "Header details for a given header to be added to Endpoint.", "id": "Header", @@ -4345,6 +4391,40 @@ }, "type": "object" }, + "ResourceLimits": { + "description": "Resource limits defined for connection pods of a given connector type.", + "id": "ResourceLimits", + "properties": { + "cpu": { + "description": "Output only. CPU limit.", + "readOnly": true, + "type": "string" + }, + "memory": { + "description": "Output only. Memory limit.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ResourceRequests": { + "description": "Resource requests defined for connection pods of a given connector type.", + "id": "ResourceRequests", + "properties": { + "cpu": { + "description": "Output only. CPU request.", + "readOnly": true, + "type": "string" + }, + "memory": { + "description": "Output only. Memory request.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ResultMetadata": { "description": "Metadata of result field.", "id": "ResultMetadata", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index f9bcad5a719..d63e2e407f7 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // connectorsService, err := connectors.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // connectorsService, err := connectors.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // connectorsService, err := connectors.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package connectors // import "google.golang.org/api/connectors/v1" import ( @@ -1114,6 +1127,9 @@ func (s *Connector) MarshalJSON() ([]byte, error) { // rate limit threshold which need to be configurable for every // connector version type ConnectorInfraConfig struct { + // HpaConfig: HPA autoscaling config. + HpaConfig *HPAConfig `json:"hpaConfig,omitempty"` + // InternalclientRatelimitThreshold: Max QPS supported for internal // requests originating from Connd. InternalclientRatelimitThreshold int64 `json:"internalclientRatelimitThreshold,omitempty,string"` @@ -1122,22 +1138,26 @@ type ConnectorInfraConfig struct { // throttling of requests. RatelimitThreshold int64 `json:"ratelimitThreshold,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "InternalclientRatelimitThreshold") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ResourceLimits: System resource limits. + ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"` + + // ResourceRequests: System resource requests. + ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HpaConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "InternalclientRatelimitThreshold") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "HpaConfig") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -1256,6 +1276,9 @@ func (s *ConnectorVersion) MarshalJSON() ([]byte, error) { // like rate limit threshold which need to be configurable for every // connector version type ConnectorVersionInfraConfig struct { + // HpaConfig: Output only. HPA autoscaling config. + HpaConfig *HPAConfig `json:"hpaConfig,omitempty"` + // InternalclientRatelimitThreshold: Output only. Max QPS supported for // internal requests originating from Connd. InternalclientRatelimitThreshold int64 `json:"internalclientRatelimitThreshold,omitempty,string"` @@ -1264,22 +1287,26 @@ type ConnectorVersionInfraConfig struct { // version before throttling of requests. RatelimitThreshold int64 `json:"ratelimitThreshold,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "InternalclientRatelimitThreshold") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ResourceLimits: Output only. System resource limits. + ResourceLimits *ResourceLimits `json:"resourceLimits,omitempty"` + + // ResourceRequests: Output only. System resource requests. + ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HpaConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "InternalclientRatelimitThreshold") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "HpaConfig") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -2351,6 +2378,42 @@ func (s *FieldComparison) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// HPAConfig: Autoscaling config for connector deployment system +// metrics. +type HPAConfig struct { + // CpuUtilizationThreshold: Output only. Percent CPU utilization where + // HPA triggers autoscaling. + CpuUtilizationThreshold int64 `json:"cpuUtilizationThreshold,omitempty,string"` + + // MemoryUtilizationThreshold: Output only. Percent Memory utilization + // where HPA triggers autoscaling. + MemoryUtilizationThreshold int64 `json:"memoryUtilizationThreshold,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "CpuUtilizationThreshold") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CpuUtilizationThreshold") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HPAConfig) MarshalJSON() ([]byte, error) { + type NoMethod HPAConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Header: Header details for a given header to be added to Endpoint. type Header struct { // Key: Key of Header. @@ -3646,6 +3709,70 @@ func (s *Resource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResourceLimits: Resource limits defined for connection pods of a +// given connector type. +type ResourceLimits struct { + // Cpu: Output only. CPU limit. + Cpu string `json:"cpu,omitempty"` + + // Memory: Output only. Memory limit. + Memory string `json:"memory,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cpu") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cpu") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceLimits) MarshalJSON() ([]byte, error) { + type NoMethod ResourceLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResourceRequests: Resource requests defined for connection pods of a +// given connector type. +type ResourceRequests struct { + // Cpu: Output only. CPU request. + Cpu string `json:"cpu,omitempty"` + + // Memory: Output only. Memory request. + Memory string `json:"memory,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cpu") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cpu") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceRequests) MarshalJSON() ([]byte, error) { + type NoMethod ResourceRequests + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ResultMetadata: Metadata of result field. type ResultMetadata struct { // DataType: The data type of the field. diff --git a/connectors/v2/connectors-api.json b/connectors/v2/connectors-api.json index e3ee7d9f89d..095bfd7b59b 100644 --- a/connectors/v2/connectors-api.json +++ b/connectors/v2/connectors-api.json @@ -478,7 +478,7 @@ } } }, - "revision": "20230621", + "revision": "20230812", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "Action": { @@ -1035,9 +1035,180 @@ "description": "A wrapper around the SQL query statement. This is needed so that the JSON representation of ExecuteSqlQueryRequest has the following format: `{\"query\":\"select *\"}`.", "id": "Query", "properties": { + "maxRows": { + "description": "Sets the limit for the maximum number of rows returned after the query execution.", + "format": "int64", + "type": "string" + }, "query": { "description": "Required. Sql query to execute.", "type": "string" + }, + "queryParameters": { + "description": "In the struct, the value corresponds to the value of query parameter and date type corresponds to the date type of the query parameter.", + "items": { + "$ref": "QueryParameter" + }, + "type": "array" + }, + "timeout": { + "description": "Sets the number of seconds the driver will wait for a query to execute.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "QueryParameter": { + "description": "Query parameter definition", + "id": "QueryParameter", + "properties": { + "dataType": { + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "INT", + "SMALLINT", + "DOUBLE", + "DATE", + "DATETIME", + "TIME", + "STRING", + "LONG", + "BOOLEAN", + "DECIMAL", + "UUID", + "BLOB", + "BIT", + "TINYINT", + "INTEGER", + "BIGINT", + "FLOAT", + "REAL", + "NUMERIC", + "CHAR", + "VARCHAR", + "LONGVARCHAR", + "TIMESTAMP", + "NCHAR", + "NVARCHAR", + "LONGNVARCHAR", + "NULL", + "OTHER", + "JAVA_OBJECT", + "DISTINCT", + "STRUCT", + "ARRAY", + "CLOB", + "REF", + "DATALINK", + "ROWID", + "BINARY", + "VARBINARY", + "LONGVARBINARY", + "NCLOB", + "SQLXML", + "REF_CURSOR", + "TIME_WITH_TIMEZONE", + "TIMESTAMP_WITH_TIMEZONE" + ], + "enumDeprecated": [ + false, + true, + false, + false, + false, + true, + false, + true, + true, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Datatype unspecified.", + "Deprecated Int type, use INTEGER type instead.", + "Small int type.", + "Double type.", + "Date type.", + "Deprecated Datetime type.", + "Time type.", + "Deprecated string type, use VARCHAR type instead.", + "Deprecated Long type, use BIGINT type instead.", + "Boolean type.", + "Decimal type.", + "Deprecated UUID type, use VARCHAR instead.", + "Blob type.", + "Bit type.", + "Tiny int type.", + "Integer type.", + "Big int type.", + "Float type.", + "Real type.", + "Numeric type.", + "Char type.", + "Varchar type.", + "Long varchar type.", + "Timestamp type.", + "Nchar type.", + "Nvarchar type.", + "Long Nvarchar type.", + "Null type.", + "Other type.", + "Java object type.", + "Distinct type keyword.", + "Struct type.", + "Array type.", + "Clob type.", + "Ref type.", + "Datalink type.", + "Row ID type.", + "Binary type.", + "Varbinary type.", + "Long Varbinary type.", + "Nclob type.", + "SQLXML type.", + "Ref_cursor type.", + "Time with timezone type.", + "Timestamp with timezone type." + ], + "type": "string" + }, + "value": { + "type": "string" } }, "type": "object" diff --git a/connectors/v2/connectors-gen.go b/connectors/v2/connectors-gen.go index 6beea6cb97b..f00a0c5230b 100644 --- a/connectors/v2/connectors-gen.go +++ b/connectors/v2/connectors-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // connectorsService, err := connectors.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // connectorsService, err := connectors.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // connectorsService, err := connectors.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package connectors // import "google.golang.org/api/connectors/v2" import ( @@ -772,10 +785,23 @@ func (s *ListEntityTypesResponse) MarshalJSON() ([]byte, error) { // that the JSON representation of ExecuteSqlQueryRequest has the // following format: `{"query":"select *"}`. type Query struct { + // MaxRows: Sets the limit for the maximum number of rows returned after + // the query execution. + MaxRows int64 `json:"maxRows,omitempty,string"` + // Query: Required. Sql query to execute. Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "Query") to + // QueryParameters: In the struct, the value corresponds to the value of + // query parameter and date type corresponds to the date type of the + // query parameter. + QueryParameters []*QueryParameter `json:"queryParameters,omitempty"` + + // Timeout: Sets the number of seconds the driver will wait for a query + // to execute. + Timeout int64 `json:"timeout,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MaxRows") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -783,8 +809,8 @@ type Query struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Query") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "MaxRows") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -798,6 +824,81 @@ func (s *Query) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QueryParameter: Query parameter definition +type QueryParameter struct { + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Datatype unspecified. + // "INT" - Deprecated Int type, use INTEGER type instead. + // "SMALLINT" - Small int type. + // "DOUBLE" - Double type. + // "DATE" - Date type. + // "DATETIME" - Deprecated Datetime type. + // "TIME" - Time type. + // "STRING" - Deprecated string type, use VARCHAR type instead. + // "LONG" - Deprecated Long type, use BIGINT type instead. + // "BOOLEAN" - Boolean type. + // "DECIMAL" - Decimal type. + // "UUID" - Deprecated UUID type, use VARCHAR instead. + // "BLOB" - Blob type. + // "BIT" - Bit type. + // "TINYINT" - Tiny int type. + // "INTEGER" - Integer type. + // "BIGINT" - Big int type. + // "FLOAT" - Float type. + // "REAL" - Real type. + // "NUMERIC" - Numeric type. + // "CHAR" - Char type. + // "VARCHAR" - Varchar type. + // "LONGVARCHAR" - Long varchar type. + // "TIMESTAMP" - Timestamp type. + // "NCHAR" - Nchar type. + // "NVARCHAR" - Nvarchar type. + // "LONGNVARCHAR" - Long Nvarchar type. + // "NULL" - Null type. + // "OTHER" - Other type. + // "JAVA_OBJECT" - Java object type. + // "DISTINCT" - Distinct type keyword. + // "STRUCT" - Struct type. + // "ARRAY" - Array type. + // "CLOB" - Clob type. + // "REF" - Ref type. + // "DATALINK" - Datalink type. + // "ROWID" - Row ID type. + // "BINARY" - Binary type. + // "VARBINARY" - Varbinary type. + // "LONGVARBINARY" - Long Varbinary type. + // "NCLOB" - Nclob type. + // "SQLXML" - SQLXML type. + // "REF_CURSOR" - Ref_cursor type. + // "TIME_WITH_TIMEZONE" - Time with timezone type. + // "TIMESTAMP_WITH_TIMEZONE" - Timestamp with timezone type. + DataType string `json:"dataType,omitempty"` + + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueryParameter) MarshalJSON() ([]byte, error) { + type NoMethod QueryParameter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Reference struct { // Name: Name of the reference field. Name string `json:"name,omitempty"` diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json index 87af3b3ba66..a92f8d76933 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-api.json @@ -512,7 +512,7 @@ } } }, - "revision": "20230809", + "revision": "20230823", "rootUrl": "https://contactcenteraiplatform.googleapis.com/", "schemas": { "AdminUser": { @@ -537,7 +537,7 @@ "type": "object" }, "ContactCenter": { - "description": "Message describing ContactCenter object Next ID: 15", + "description": "Message describing ContactCenter object Next ID: 16", "id": "ContactCenter", "properties": { "adminUser": { diff --git a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go index 425b2d62a32..ef670153308 100644 --- a/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go +++ b/contactcenteraiplatform/v1alpha1/contactcenteraiplatform-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/solutions/contact-center-ai-platform // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // contactcenteraiplatformService, err := contactcenteraiplatform.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // contactcenteraiplatformService, err := contactcenteraiplatform.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // contactcenteraiplatformService, err := contactcenteraiplatform.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package contactcenteraiplatform // import "google.golang.org/api/contactcenteraiplatform/v1alpha1" import ( @@ -220,7 +233,7 @@ func (s *AdminUser) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } -// ContactCenter: Message describing ContactCenter object Next ID: 15 +// ContactCenter: Message describing ContactCenter object Next ID: 16 type ContactCenter struct { // AdminUser: Optional. Info about the first admin user, such as given // name and family name. diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index bc0a8c301f8..860b674023e 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/contact-center/insights/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // contactcenterinsightsService, err := contactcenterinsights.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // contactcenterinsightsService, err := contactcenterinsights.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // contactcenterinsightsService, err := contactcenterinsights.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package contactcenterinsights // import "google.golang.org/api/contactcenterinsights/v1" import ( diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 871d6e5e40e..bf9c407b552 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20230723", + "revision": "20230810", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5812,6 +5812,10 @@ "description": "If set, refers to the name of a custom resource policy supplied by the user. The resource policy must be in the same project and region as the node pool. If not found, InvalidArgument error is returned.", "type": "string" }, + "tpuTopology": { + "description": "Optional. TPU placement topology for pod slice node pool. https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies", + "type": "string" + }, "type": { "description": "The type of placement.", "enum": [ @@ -6983,6 +6987,15 @@ "$ref": "ConfidentialNodes", "description": "Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled." }, + "diskSizeGb": { + "description": "Optional. The desired disk size for nodes in the node pool specified in GB. The smallest allowed disk size is 10GB. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk size.", + "format": "int64", + "type": "string" + }, + "diskType": { + "description": "Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or 'pd-balanced') for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk type.", + "type": "string" + }, "etag": { "description": "The current etag of the node pool. If an etag is provided and does not match the current etag of the node pool, update will be blocked and an ABORTED error will be returned.", "type": "string" @@ -7026,6 +7039,10 @@ "$ref": "NodePoolLoggingConfig", "description": "Logging configuration." }, + "machineType": { + "description": "Optional. The desired [Google Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified machine type.", + "type": "string" + }, "name": { "description": "The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", "type": "string" diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 388ecf1d50e..a10430b2a70 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-engine/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // containerService, err := container.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // containerService, err := container.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package container // import "google.golang.org/api/container/v1" import ( @@ -5638,6 +5651,11 @@ type PlacementPolicy struct { // returned. PolicyName string `json:"policyName,omitempty"` + // TpuTopology: Optional. TPU placement topology for pod slice node + // pool. + // https://cloud.google.com/tpu/docs/types-topologies#tpu_topologies + TpuTopology string `json:"tpuTopology,omitempty"` + // Type: The type of placement. // // Possible values: @@ -7678,6 +7696,18 @@ type UpdateNodePoolRequest struct { // node pool will be Confidential VM once enabled. ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` + // DiskSizeGb: Optional. The desired disk size for nodes in the node + // pool specified in GB. The smallest allowed disk size is 10GB. + // Initiates an upgrade operation that migrates the nodes in the node + // pool to the specified disk size. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // DiskType: Optional. The desired disk type (e.g. 'pd-standard', + // 'pd-ssd' or 'pd-balanced') for nodes in the node pool. Initiates an + // upgrade operation that migrates the nodes in the node pool to the + // specified disk type. + DiskType string `json:"diskType,omitempty"` + // Etag: The current etag of the node pool. If an etag is provided and // does not match the current etag of the node pool, update will be // blocked and an ABORTED error will be returned. @@ -7721,6 +7751,12 @@ type UpdateNodePoolRequest struct { // LoggingConfig: Logging configuration. LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` + // MachineType: Optional. The desired Google Compute Engine machine type + // (https://cloud.google.com/compute/docs/machine-types) for nodes in + // the node pool. Initiates an upgrade operation that migrates the nodes + // in the node pool to the specified machine type. + MachineType string `json:"machineType,omitempty"` + // Name: The name (project, location, cluster, node pool) of the node // pool to update. Specified in the format // `projects/*/locations/*/clusters/*/nodePools/*`. diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 2c2099a8c08..1025642ed2a 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20230802", + "revision": "20230810", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2907,6 +2907,12 @@ }, "type": "object" }, + "AutoscaledRolloutPolicy": { + "description": "Autoscaled rollout policy uses cluster autoscaler during blue-green upgrades to scale both the green and blue pools.", + "id": "AutoscaledRolloutPolicy", + "properties": {}, + "type": "object" + }, "AvailableVersion": { "deprecated": true, "description": "Deprecated.", @@ -3044,6 +3050,10 @@ "description": "Settings for blue-green upgrade.", "id": "BlueGreenSettings", "properties": { + "autoscaledRolloutPolicy": { + "$ref": "AutoscaledRolloutPolicy", + "description": "Autoscaled policy for cluster autoscaler enabled blue-green upgrade." + }, "nodePoolSoakDuration": { "description": "Time needed after draining entire blue pool. After this period, blue pool will be cleaned up.", "format": "google-duration", @@ -6631,12 +6641,14 @@ "enum": [ "VULNERABILITY_MODE_UNSPECIFIED", "VULNERABILITY_DISABLED", - "VULNERABILITY_BASIC" + "VULNERABILITY_BASIC", + "VULNERABILITY_ENTERPRISE" ], "enumDescriptions": [ "Default value not specified.", "Disables vulnerability scanning on the cluster.", - "Applies basic vulnerability scanning on the cluster." + "Applies basic vulnerability scanning on the cluster.", + "Applies the Security Posture's vulnerability on cluster Enterprise level features." ], "type": "string" } @@ -7422,6 +7434,15 @@ "$ref": "ConfidentialNodes", "description": "Confidential nodes config. All the nodes in the node pool will be Confidential VM once enabled." }, + "diskSizeGb": { + "description": "Optional. The desired disk size for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk size.", + "format": "int64", + "type": "string" + }, + "diskType": { + "description": "Optional. The desired disk type for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified disk type.", + "type": "string" + }, "etag": { "description": "The current etag of the node pool. If an etag is provided and does not match the current etag of the node pool, update will be blocked and an ABORTED error will be returned.", "type": "string" @@ -7465,6 +7486,10 @@ "$ref": "NodePoolLoggingConfig", "description": "Logging configuration." }, + "machineType": { + "description": "Optional. The desired machine type for nodes in the node pool. Initiates an upgrade operation that migrates the nodes in the node pool to the specified machine type.", + "type": "string" + }, "name": { "description": "The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", "type": "string" diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index bed5691fad1..4b03dc75f59 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-engine/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // containerService, err := container.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // containerService, err := container.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // containerService, err := container.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package container // import "google.golang.org/api/container/v1beta1" import ( @@ -856,6 +869,12 @@ func (s *AutoprovisioningNodePoolDefaults) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AutoscaledRolloutPolicy: Autoscaled rollout policy uses cluster +// autoscaler during blue-green upgrades to scale both the green and +// blue pools. +type AutoscaledRolloutPolicy struct { +} + // AvailableVersion: Deprecated. type AvailableVersion struct { // Reason: Reason for availability. @@ -1066,6 +1085,10 @@ func (s *BlueGreenInfo) MarshalJSON() ([]byte, error) { // BlueGreenSettings: Settings for blue-green upgrade. type BlueGreenSettings struct { + // AutoscaledRolloutPolicy: Autoscaled policy for cluster autoscaler + // enabled blue-green upgrade. + AutoscaledRolloutPolicy *AutoscaledRolloutPolicy `json:"autoscaledRolloutPolicy,omitempty"` + // NodePoolSoakDuration: Time needed after draining entire blue pool. // After this period, blue pool will be cleaned up. NodePoolSoakDuration string `json:"nodePoolSoakDuration,omitempty"` @@ -1074,18 +1097,18 @@ type BlueGreenSettings struct { StandardRolloutPolicy *StandardRolloutPolicy `json:"standardRolloutPolicy,omitempty"` // ForceSendFields is a list of field names (e.g. - // "NodePoolSoakDuration") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // "AutoscaledRolloutPolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NodePoolSoakDuration") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "AutoscaledRolloutPolicy") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. @@ -6961,6 +6984,8 @@ type SecurityPostureConfig struct { // cluster. // "VULNERABILITY_BASIC" - Applies basic vulnerability scanning on the // cluster. + // "VULNERABILITY_ENTERPRISE" - Applies the Security Posture's + // vulnerability on cluster Enterprise level features. VulnerabilityMode string `json:"vulnerabilityMode,omitempty"` // ForceSendFields is a list of field names (e.g. "Mode") to @@ -8327,6 +8352,16 @@ type UpdateNodePoolRequest struct { // node pool will be Confidential VM once enabled. ConfidentialNodes *ConfidentialNodes `json:"confidentialNodes,omitempty"` + // DiskSizeGb: Optional. The desired disk size for nodes in the node + // pool. Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified disk size. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // DiskType: Optional. The desired disk type for nodes in the node pool. + // Initiates an upgrade operation that migrates the nodes in the node + // pool to the specified disk type. + DiskType string `json:"diskType,omitempty"` + // Etag: The current etag of the node pool. If an etag is provided and // does not match the current etag of the node pool, update will be // blocked and an ABORTED error will be returned. @@ -8370,6 +8405,11 @@ type UpdateNodePoolRequest struct { // LoggingConfig: Logging configuration. LoggingConfig *NodePoolLoggingConfig `json:"loggingConfig,omitempty"` + // MachineType: Optional. The desired machine type for nodes in the node + // pool. Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified machine type. + MachineType string `json:"machineType,omitempty"` + // Name: The name (project, location, cluster, node pool) of the node // pool to update. Specified in the format // `projects/*/locations/*/clusters/*/nodePools/*`. diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index 226b4eb714a..336769e0dd9 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -755,7 +755,7 @@ } } }, - "revision": "20230811", + "revision": "20230829", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -2735,7 +2735,7 @@ "type": "array" }, "buildStepOutputs": { - "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.", + "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored.", "items": { "format": "byte", "type": "string" diff --git a/containeranalysis/v1/containeranalysis-gen.go b/containeranalysis/v1/containeranalysis-gen.go index 77a48f3db83..3e308ce6549 100644 --- a/containeranalysis/v1/containeranalysis-gen.go +++ b/containeranalysis/v1/containeranalysis-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-analysis/api/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // containeranalysisService, err := containeranalysis.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package containeranalysis // import "google.golang.org/api/containeranalysis/v1" import ( @@ -2866,7 +2879,7 @@ type ContaineranalysisGoogleDevtoolsCloudbuildV1Results struct { // images, in the order corresponding to build step indices. Cloud // Builders (https://cloud.google.com/cloud-build/docs/cloud-builders) // can produce this output by writing to `$BUILDER_OUTPUT/output`. Only - // the first 4KB of data is stored. + // the first 50KB of data is stored. BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` // Images: Container images that were built as a part of the build. diff --git a/containeranalysis/v1alpha1/containeranalysis-api.json b/containeranalysis/v1alpha1/containeranalysis-api.json index dcf86aeea91..c3b2748514e 100644 --- a/containeranalysis/v1alpha1/containeranalysis-api.json +++ b/containeranalysis/v1alpha1/containeranalysis-api.json @@ -1233,7 +1233,7 @@ } } }, - "revision": "20230811", + "revision": "20230829", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AnalysisCompleted": { @@ -3024,7 +3024,7 @@ "type": "array" }, "buildStepOutputs": { - "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.", + "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored.", "items": { "format": "byte", "type": "string" diff --git a/containeranalysis/v1alpha1/containeranalysis-gen.go b/containeranalysis/v1alpha1/containeranalysis-gen.go index ab640e6e3ca..d6b59683791 100644 --- a/containeranalysis/v1alpha1/containeranalysis-gen.go +++ b/containeranalysis/v1alpha1/containeranalysis-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-analysis/api/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // containeranalysisService, err := containeranalysis.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package containeranalysis // import "google.golang.org/api/containeranalysis/v1alpha1" import ( @@ -2741,7 +2754,7 @@ type ContaineranalysisGoogleDevtoolsCloudbuildV1Results struct { // images, in the order corresponding to build step indices. Cloud // Builders (https://cloud.google.com/cloud-build/docs/cloud-builders) // can produce this output by writing to `$BUILDER_OUTPUT/output`. Only - // the first 4KB of data is stored. + // the first 50KB of data is stored. BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` // Images: Container images that were built as a part of the build. diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index b2ee9674ab0..40c0df693dd 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -815,7 +815,7 @@ } } }, - "revision": "20230811", + "revision": "20230829", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -2708,7 +2708,7 @@ "type": "array" }, "buildStepOutputs": { - "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 4KB of data is stored.", + "description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored.", "items": { "format": "byte", "type": "string" diff --git a/containeranalysis/v1beta1/containeranalysis-gen.go b/containeranalysis/v1beta1/containeranalysis-gen.go index 108d7be5415..773cb0027cd 100644 --- a/containeranalysis/v1beta1/containeranalysis-gen.go +++ b/containeranalysis/v1beta1/containeranalysis-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-analysis/api/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // containeranalysisService, err := containeranalysis.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // containeranalysisService, err := containeranalysis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package containeranalysis // import "google.golang.org/api/containeranalysis/v1beta1" import ( @@ -2755,7 +2768,7 @@ type ContaineranalysisGoogleDevtoolsCloudbuildV1Results struct { // images, in the order corresponding to build step indices. Cloud // Builders (https://cloud.google.com/cloud-build/docs/cloud-builders) // can produce this output by writing to `$BUILDER_OUTPUT/output`. Only - // the first 4KB of data is stored. + // the first 50KB of data is stored. BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` // Images: Container images that were built as a part of the build. diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index b299dc720c3..cbde141ff8f 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -2705,6 +2705,93 @@ } } }, + "merchantsupport": { + "methods": { + "renderaccountissues": { + "description": "Provide a list of merchant's issues with a support content and available actions. This content and actions are meant to be rendered and shown in third-party applications.", + "flatPath": "{merchantId}/merchantsupport/renderaccountissues", + "httpMethod": "POST", + "id": "content.merchantsupport.renderaccountissues", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "languageCode": { + "description": "Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize support content. If not set, the result will be in default language ('en-US').", + "location": "query", + "type": "string" + }, + "merchantId": { + "description": "Required. The ID of the account to fetch issues for.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in support content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.", + "location": "query", + "type": "string" + } + }, + "path": "{merchantId}/merchantsupport/renderaccountissues", + "request": { + "$ref": "RenderAccountIssuesRequestPayload" + }, + "response": { + "$ref": "RenderAccountIssuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "renderproductissues": { + "description": "Provide a list of issues for merchant's product with a support content and available actions. This content and actions are meant to be rendered and shown in third-party applications.", + "flatPath": "{merchantId}/merchantsupport/renderproductissues/{productId}", + "httpMethod": "POST", + "id": "content.merchantsupport.renderproductissues", + "parameterOrder": [ + "merchantId", + "productId" + ], + "parameters": { + "languageCode": { + "description": "Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize support content. If not set, the result will be in default language ('en-US').", + "location": "query", + "type": "string" + }, + "merchantId": { + "description": "Required. The ID of the account that contains the product.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "productId": { + "description": "Required. The [REST_ID](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) of the product to fetch issues for.", + "location": "path", + "required": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in support content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.", + "location": "query", + "type": "string" + } + }, + "path": "{merchantId}/merchantsupport/renderproductissues/{productId}", + "request": { + "$ref": "RenderProductIssuesRequestPayload" + }, + "response": { + "$ref": "RenderProductIssuesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, "orderinvoices": { "methods": { "createchargeinvoice": { @@ -6352,7 +6439,7 @@ } } }, - "revision": "20230811", + "revision": "20230905", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -6661,6 +6748,66 @@ }, "type": "object" }, + "AccountIssue": { + "description": "An issue affecting specific merchant.", + "id": "AccountIssue", + "properties": { + "actions": { + "description": "A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when merchant disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to merchant when they expand the issue.", + "items": { + "$ref": "Action" + }, + "type": "array" + }, + "impact": { + "$ref": "AccountIssueImpact", + "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." + }, + "prerenderedContent": { + "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", + "type": "string" + }, + "title": { + "description": "Title of the issue.", + "type": "string" + } + }, + "type": "object" + }, + "AccountIssueImpact": { + "description": "Overall impact of the issue.", + "id": "AccountIssueImpact", + "properties": { + "breakdowns": { + "description": "Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the merchant. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details.", + "items": { + "$ref": "Breakdown" + }, + "type": "array" + }, + "message": { + "description": "Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the merchant. For example: \"Disapproves 90k offers in 25 countries\"", + "type": "string" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Causes either an account suspension or an item disapproval. Errors should be resolved as soon as possible to ensure items are eligible to appear in results again.", + "Warnings can negatively impact the performance of ads and can lead to item or account suspensions in the future unless the issue is resolved.", + "Infos are suggested optimizations to increase data quality. Resolving these issues is recommended, but not required." + ], + "type": "string" + } + }, + "type": "object" + }, "AccountItemUpdates": { "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown.", "id": "AccountItemUpdates", @@ -7537,6 +7684,55 @@ }, "type": "object" }, + "Action": { + "description": "An actionable step that can be executed to solve the issue.", + "id": "Action", + "properties": { + "builtinSimpleAction": { + "$ref": "BuiltInSimpleAction", + "description": "Action implemented and performed in (your) third-party application. The application should point the merchant to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available." + }, + "buttonLabel": { + "description": "Label of the action button.", + "type": "string" + }, + "externalAction": { + "$ref": "ExternalAction", + "description": "Action that is implemented and performed outside of (your) third-party application. The application needs to redirect the merchant to the external location where they can perform the action." + }, + "isAvailable": { + "description": "Controlling whether the button is active or disabled. The value is 'false' when the action was already requested or is not available. If the action is not available then a reason will be present. If (your) third-party application shows a disabled button for action that is not available, then it should also show reasons.", + "type": "boolean" + }, + "reasons": { + "description": "List of reasons why the action is not available. The list of reasons is empty if the action is available. If there is only one reason, it can be displayed next to the disabled button. If there are more reasons, all of them should be displayed, for example in a pop-up dialog.", + "items": { + "$ref": "ActionReason" + }, + "type": "array" + } + }, + "type": "object" + }, + "ActionReason": { + "description": "A single reason why the action is not available.", + "id": "ActionReason", + "properties": { + "action": { + "$ref": "Action", + "description": "Optional. An action that needs to be performed to solve the problem represented by this reason. This action will always be available. Should be rendered as a link or button next to the summarizing message. For example, the review may be available only once merchant configure all required attributes. In such a situation this action can be a link to the form, where they can fill the missing attribute to unblock the main action." + }, + "detail": { + "description": "Detailed explanation of the reason. Should be displayed as a hint if present.", + "type": "string" + }, + "message": { + "description": "Messages summarizing the reason, why the action is not available. For example: \"Review requested on Jan 03. Review requests can take a few days to complete.\"", + "type": "string" + } + }, + "type": "object" + }, "ActivateBuyOnGoogleProgramRequest": { "description": "Request message for the ActivateProgram method.", "id": "ActivateBuyOnGoogleProgramRequest", @@ -7569,6 +7765,21 @@ }, "type": "object" }, + "AlternateDisputeResolution": { + "description": "The Alternate Dispute Resolution (ADR) that may be available to merchants in some regions. If present, the link should be shown on the same page as the list of issues.", + "id": "AlternateDisputeResolution", + "properties": { + "label": { + "description": "The label for the alternate dispute resolution link.", + "type": "string" + }, + "uri": { + "description": "The URL pointing to a page, where merchant can request alternative dispute resolution with an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501).", + "type": "string" + } + }, + "type": "object" + }, "Amount": { "id": "Amount", "properties": { @@ -7754,6 +7965,103 @@ }, "type": "object" }, + "Breakdown": { + "description": "A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.", + "id": "Breakdown", + "properties": { + "details": { + "description": "Human readable, localized description of issue's effect on different targets. Should be rendered as a list. For example: * \"Products not showing in ads\" * \"Products not showing organically\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "regions": { + "description": "Lists of regions. Should be rendered as a title for this group of details. The full list should be shown to merchant. If the list is too long, it is recommended to make it expandable.", + "items": { + "$ref": "BreakdownRegion" + }, + "type": "array" + } + }, + "type": "object" + }, + "BreakdownRegion": { + "description": "Region with code and localized name.", + "id": "BreakdownRegion", + "properties": { + "code": { + "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)", + "type": "string" + }, + "name": { + "description": "The localized name of the region. For region with code='001' the value is 'All countries' or the equivalent in other languages.", + "type": "string" + } + }, + "type": "object" + }, + "BuiltInSimpleAction": { + "description": "Action that is implemented and performed in (your) third-party application. Represents various functionality that is expected to be available to merchant and will help them with resolving the issue. The application should point the merchant to the place, where they can access the corresponding functionality. If the functionality is not supported, it is recommended to explain the situation to merchant and provide them with instructions how to solve the issue.", + "id": "BuiltInSimpleAction", + "properties": { + "additionalContent": { + "$ref": "BuiltInSimpleActionAdditionalContent", + "description": "Long text from an external source that should be available to the merchant. Present when the type is `SHOW_ADDITIONAL_CONTENT`." + }, + "attributeCode": { + "description": "The attribute that needs to be updated. Present when the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, represented in snake_case. You can find a list of product's attributes, with their codes [here](https://support.google.com/merchants/answer/7052112).", + "type": "string" + }, + "type": { + "description": "The type of action that represents a functionality that is expected to be available in third-party application.", + "enum": [ + "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED", + "VERIFY_PHONE", + "CLAIM_WEBSITE", + "ADD_PRODUCTS", + "ADD_CONTACT_INFO", + "LINK_ADS_ACCOUNT", + "ADD_BUSINESS_REGISTRATION_NUMBER", + "EDIT_ITEM_ATTRIBUTE", + "FIX_ACCOUNT_ISSUE", + "SHOW_ADDITIONAL_CONTENT" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Redirect merchant to the part of your application where they can verify their phone.", + "Redirect merchant to the part of your application where they can claim their website.", + "Redirect merchant to the part of your application where they can add products.", + "Open a form where the merchant can edit their contact information.", + "Redirect merchant to the part of your application where they can link ads account.", + "Open a form where the merchant can add their business registration number.", + "Open a form where the merchant can edit an attribute. The attribute that needs to be updated is specified in attribute_code field of the action.", + "Redirect merchant from the product issues to the diagnostic page with their account issues in your application. This action will be returned only for product issues that are caused by an account issue and thus merchant should resolve the problem on the account level.", + "Show additional content to the merchant. This action will be used for example to deliver a justification from national authority." + ], + "type": "string" + } + }, + "type": "object" + }, + "BuiltInSimpleActionAdditionalContent": { + "description": "Long text from external source.", + "id": "BuiltInSimpleActionAdditionalContent", + "properties": { + "paragraphs": { + "description": "Long text organized into paragraphs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "description": "Title of the additional content;", + "type": "string" + } + }, + "type": "object" + }, "BusinessDayConfig": { "id": "BusinessDayConfig", "properties": { @@ -7844,7 +8152,8 @@ "PENDING_REVIEW", "REVIEW_DISAPPROVED", "ACTIVE", - "PAUSED" + "PAUSED", + "DEPRECATED" ], "enumDescriptions": [ "Default value when participation stage is not set.", @@ -7855,7 +8164,8 @@ "Merchant is waiting for the review to be completed in a specific region code.", "The review for a merchant has been rejected in a specific region code.", "Merchant's program participation is active for a specific region code.", - "Participation has been paused." + "Participation has been paused.", + "The program cannot be further reactivated or paused. See more about [Buy on Google](https://support.google.com/merchants/answer/7679273)." ], "readOnly": true, "type": "string" @@ -9215,6 +9525,33 @@ }, "type": "object" }, + "ExternalAction": { + "description": "Action that is implemented and performed outside of the third-party application. It should redirect the merchant to the provided URL of an external system where they can perform the action. For example to request a review in the Merchant Center.", + "id": "ExternalAction", + "properties": { + "type": { + "description": "The type of external action.", + "enum": [ + "EXTERNAL_ACTION_TYPE_UNSPECIFIED", + "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER", + "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER", + "LEGAL_APPEAL_IN_HELP_CENTER" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Redirect to Merchant Center where the merchant can request a review for issue related to their product.", + "Redirect to Merchant Center where the merchant can request a review for issue related to their account.", + "Redirect to the form in Help Center where the merchant can request a legal appeal for the issue." + ], + "type": "string" + }, + "uri": { + "description": "URL to external system, for example Merchant Center, where the merchant can perform the action.", + "type": "string" + } + }, + "type": "object" + }, "FreeListingsProgramStatus": { "description": "Response message for GetFreeListingsProgramStatus.", "id": "FreeListingsProgramStatus", @@ -14278,6 +14615,66 @@ }, "type": "object" }, + "ProductIssue": { + "description": "An issue affecting specific product.", + "id": "ProductIssue", + "properties": { + "actions": { + "description": "A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when merchant disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to merchant when they expand the issue.", + "items": { + "$ref": "Action" + }, + "type": "array" + }, + "impact": { + "$ref": "ProductIssueImpact", + "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." + }, + "prerenderedContent": { + "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", + "type": "string" + }, + "title": { + "description": "Title of the issue.", + "type": "string" + } + }, + "type": "object" + }, + "ProductIssueImpact": { + "description": "Overall impact of product issue.", + "id": "ProductIssueImpact", + "properties": { + "breakdowns": { + "description": "Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the merchant. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details.", + "items": { + "$ref": "Breakdown" + }, + "type": "array" + }, + "message": { + "description": "Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the merchant. For example: \"Limits visibility in France\"", + "type": "string" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Causes either an account suspension or an item disapproval. Errors should be resolved as soon as possible to ensure items are eligible to appear in results again.", + "Warnings can negatively impact the performance of ads and can lead to item or account suspensions in the future unless the issue is resolved.", + "Infos are suggested optimizations to increase data quality. Resolving these issues is recommended, but not required." + ], + "type": "string" + } + }, + "type": "object" + }, "ProductProductDetail": { "id": "ProductProductDetail", "properties": { @@ -15865,6 +16262,80 @@ }, "type": "object" }, + "RenderAccountIssuesRequestPayload": { + "description": "The payload for configuring how the content should be rendered.", + "id": "RenderAccountIssuesRequestPayload", + "properties": { + "contentOption": { + "description": "Optional. How the detailed content should be returned. Default option is to return the content as a pre-rendered HTML text.", + "enum": [ + "CONTENT_OPTION_UNSPECIFIED", + "PRE_RENDERED_HTML" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Returns the detail of the issue as a pre-rendered HTML text." + ], + "type": "string" + } + }, + "type": "object" + }, + "RenderAccountIssuesResponse": { + "description": "Response containing support content and actions for listed account issues.", + "id": "RenderAccountIssuesResponse", + "properties": { + "alternateDisputeResolution": { + "$ref": "AlternateDisputeResolution", + "description": "The Alternate Dispute Resolution (ADR) contains a link to a page where merchant can bring their appeal to an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). If the ADR is present, it MUST be available to the merchant on the page that shows the list with their account issues." + }, + "issues": { + "description": "List of account issues for a given account. This list can be shown with compressed, expandable items. In the compressed form, the title and impact should be shown for each issue. Once the issue is expanded, the detailed content and available actions should be rendered.", + "items": { + "$ref": "AccountIssue" + }, + "type": "array" + } + }, + "type": "object" + }, + "RenderProductIssuesRequestPayload": { + "description": "The payload for configuring how the content should be rendered.", + "id": "RenderProductIssuesRequestPayload", + "properties": { + "contentOption": { + "description": "Optional. How the detailed content should be returned. Default option is to return the content as a pre-rendered HTML text.", + "enum": [ + "CONTENT_OPTION_UNSPECIFIED", + "PRE_RENDERED_HTML" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Returns the detail of the issue as a pre-rendered HTML text." + ], + "type": "string" + } + }, + "type": "object" + }, + "RenderProductIssuesResponse": { + "description": "Response containing support content and actions for listed product issues.", + "id": "RenderProductIssuesResponse", + "properties": { + "alternateDisputeResolution": { + "$ref": "AlternateDisputeResolution", + "description": "The Alternate Dispute Resolution (ADR) contains a link to a page where merchant can bring their appeal to an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). If present, the link should be shown on the same page as the list of issues." + }, + "issues": { + "description": "List of issues for a given product. This list can be shown with compressed, expandable items. In the compressed form, the title and impact should be shown for each issue. Once the issue is expanded, the detailed content and available actions should be rendered.", + "items": { + "$ref": "ProductIssue" + }, + "type": "array" + } + }, + "type": "object" + }, "ReportInteractionRequest": { "description": "Request to report interactions on a recommendation.", "id": "ReportInteractionRequest", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 9ce253dc6c4..9c1b3cd169b 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/shopping-content/v2/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // contentService, err := content.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // contentService, err := content.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // contentService, err := content.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package content // import "google.golang.org/api/content/v2.1" import ( @@ -131,6 +144,7 @@ func New(client *http.Client) (*APIService, error) { s.Freelistingsprogram = NewFreelistingsprogramService(s) s.Liasettings = NewLiasettingsService(s) s.Localinventory = NewLocalinventoryService(s) + s.Merchantsupport = NewMerchantsupportService(s) s.Orderinvoices = NewOrderinvoicesService(s) s.Orderreports = NewOrderreportsService(s) s.Orderreturns = NewOrderreturnsService(s) @@ -189,6 +203,8 @@ type APIService struct { Localinventory *LocalinventoryService + Merchantsupport *MerchantsupportService + Orderinvoices *OrderinvoicesService Orderreports *OrderreportsService @@ -410,6 +426,15 @@ type LocalinventoryService struct { s *APIService } +func NewMerchantsupportService(s *APIService) *MerchantsupportService { + rs := &MerchantsupportService{s: s} + return rs +} + +type MerchantsupportService struct { + s *APIService +} + func NewOrderinvoicesService(s *APIService) *OrderinvoicesService { rs := &OrderinvoicesService{s: s} return rs @@ -1223,6 +1248,149 @@ func (s *AccountImageImprovementsSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccountIssue: An issue affecting specific merchant. +type AccountIssue struct { + // Actions: A list of actionable steps that can be executed to solve the + // issue. An example is requesting a re-review or providing arguments + // when merchant disagrees with the issue. Actions that are supported in + // (your) third-party application can be rendered as buttons and should + // be available to merchant when they expand the issue. + Actions []*Action `json:"actions,omitempty"` + + // Impact: Clarifies the severity of the issue. The summarizing message, + // if present, should be shown right under the title for each issue. It + // helps merchants to quickly understand the impact of the issue. The + // detailed breakdown helps the merchant to fully understand the impact + // of the issue. It can be rendered as dialog that opens when the + // merchant mouse over the summarized impact statement. Issues with + // different severity can be styled differently. They may use a + // different color or icon to signal the difference between `ERROR`, + // `WARNING` and `INFO`. + Impact *AccountIssueImpact `json:"impact,omitempty"` + + // PrerenderedContent: Details of the issue as a pre-rendered HTML. HTML + // elements contain CSS classes that can be used to customize the style + // of the content. Always sanitize the HTML before embedding it directly + // to your application. The sanitizer needs to allow basic HTML tags, + // such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. + // For example, you can use DOMPurify + // (https://www.npmjs.com/package/dompurify). CSS classes: * + // `issue-detail` - top level container for the detail of the issue * + // `callout-banners` - section of the `issue-detail` with callout + // banners * `callout-banner` - single callout banner, inside + // `callout-banners` * `callout-banner-info` - callout with important + // information (default) * `callout-banner-warning` - callout with a + // warning * `callout-banner-error` - callout informing about an error + // (most severe) * `issue-content` - section of the `issue-detail`, + // contains multiple `content-element` * `content-element` - content + // element such as a list, link or paragraph, inside `issue-content` * + // `root-causes` - unordered list with items describing root causes of + // the issue, inside `issue-content` * `root-causes-intro` - intro text + // before the `root-causes` list, inside `issue-content` * `segment` - + // section of the text, `span` inside paragraph * `segment-attribute` - + // section of the text that represents a product attribute, for example + // 'image\_link' * `segment-literal` - section of the text that contains + // a special value, for example '0-1000 kg' * `segment-bold` - section + // of the text that should be rendered as bold * `segment-italic` - + // section of the text that should be rendered as italic * `tooltip` - + // used on paragraphs that should be rendered with a tooltip. A section + // of the text in such a paragraph will have a class `tooltip-text` and + // is intended to be shown in a mouse over dialog. If the style is not + // used, the `tooltip-text` section would be shown on a new line, after + // the main part of the text. * `tooltip-text` - marks a section of the + // text within a `tooltip`, that is intended to be shown in a mouse over + // dialog. * `tooltip-icon` - marks a section of the text within a + // `tooltip`, that can be replaced with a tooltip icon, for example '?' + // or 'i'. By default, this section contains a `br` tag, that is + // separating the main text and the tooltip text when the style is not + // used. * `tooltip-style-question` - the tooltip shows helpful + // information, can use the '?' as an icon. * `tooltip-style-info` - the + // tooltip adds additional information fitting to the context, can use + // the 'i' as an icon. * `content-moderation` - marks the paragraph that + // explains how the issue was identified. * `new-element` - Present for + // new elements added to the pre-rendered content in the future. To make + // sure that a new content element does not break your style, you can + // hide everything with this class. + PrerenderedContent string `json:"prerenderedContent,omitempty"` + + // Title: Title of the issue. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccountIssue) MarshalJSON() ([]byte, error) { + type NoMethod AccountIssue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AccountIssueImpact: Overall impact of the issue. +type AccountIssueImpact struct { + // Breakdowns: Detailed impact breakdown. Explains the types of + // restriction the issue has in different shopping destinations and + // territory. If present, it should be rendered to the merchant. Can be + // shown as a mouse over dropdown or a dialog. Each breakdown item + // represents a group of regions with the same impact details. + Breakdowns []*Breakdown `json:"breakdowns,omitempty"` + + // Message: Optional. Message summarizing the overall impact of the + // issue. If present, it should be rendered to the merchant. For + // example: "Disapproves 90k offers in 25 countries" + Message string `json:"message,omitempty"` + + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "ERROR" - Causes either an account suspension or an item + // disapproval. Errors should be resolved as soon as possible to ensure + // items are eligible to appear in results again. + // "WARNING" - Warnings can negatively impact the performance of ads + // and can lead to item or account suspensions in the future unless the + // issue is resolved. + // "INFO" - Infos are suggested optimizations to increase data + // quality. Resolving these issues is recommended, but not required. + Severity string `json:"severity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Breakdowns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Breakdowns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccountIssueImpact) MarshalJSON() ([]byte, error) { + type NoMethod AccountIssueImpact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AccountItemUpdates: Turning on item updates // (https://support.google.com/merchants/answer/3246284) allows Google // to automatically update items for you. When item updates are on, @@ -2737,6 +2905,103 @@ func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Action: An actionable step that can be executed to solve the issue. +type Action struct { + // BuiltinSimpleAction: Action implemented and performed in (your) + // third-party application. The application should point the merchant to + // the place, where they can access the corresponding functionality or + // provide instructions, if the specific functionality is not available. + BuiltinSimpleAction *BuiltInSimpleAction `json:"builtinSimpleAction,omitempty"` + + // ButtonLabel: Label of the action button. + ButtonLabel string `json:"buttonLabel,omitempty"` + + // ExternalAction: Action that is implemented and performed outside of + // (your) third-party application. The application needs to redirect the + // merchant to the external location where they can perform the action. + ExternalAction *ExternalAction `json:"externalAction,omitempty"` + + // IsAvailable: Controlling whether the button is active or disabled. + // The value is 'false' when the action was already requested or is not + // available. If the action is not available then a reason will be + // present. If (your) third-party application shows a disabled button + // for action that is not available, then it should also show reasons. + IsAvailable bool `json:"isAvailable,omitempty"` + + // Reasons: List of reasons why the action is not available. The list of + // reasons is empty if the action is available. If there is only one + // reason, it can be displayed next to the disabled button. If there are + // more reasons, all of them should be displayed, for example in a + // pop-up dialog. + Reasons []*ActionReason `json:"reasons,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BuiltinSimpleAction") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuiltinSimpleAction") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Action) MarshalJSON() ([]byte, error) { + type NoMethod Action + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ActionReason: A single reason why the action is not available. +type ActionReason struct { + // Action: Optional. An action that needs to be performed to solve the + // problem represented by this reason. This action will always be + // available. Should be rendered as a link or button next to the + // summarizing message. For example, the review may be available only + // once merchant configure all required attributes. In such a situation + // this action can be a link to the form, where they can fill the + // missing attribute to unblock the main action. + Action *Action `json:"action,omitempty"` + + // Detail: Detailed explanation of the reason. Should be displayed as a + // hint if present. + Detail string `json:"detail,omitempty"` + + // Message: Messages summarizing the reason, why the action is not + // available. For example: "Review requested on Jan 03. Review requests + // can take a few days to complete." + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ActionReason) MarshalJSON() ([]byte, error) { + type NoMethod ActionReason + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ActivateBuyOnGoogleProgramRequest: Request message for the // ActivateProgram method. type ActivateBuyOnGoogleProgramRequest struct { @@ -2788,6 +3053,41 @@ func (s *Address) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) +// that may be available to merchants in some regions. If present, the +// link should be shown on the same page as the list of issues. +type AlternateDisputeResolution struct { + // Label: The label for the alternate dispute resolution link. + Label string `json:"label,omitempty"` + + // Uri: The URL pointing to a page, where merchant can request + // alternative dispute resolution with an external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Label") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Label") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AlternateDisputeResolution) MarshalJSON() ([]byte, error) { + type NoMethod AlternateDisputeResolution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Amount struct { // PriceAmount: [required] The pre-tax or post-tax price depending on // the location of the order. @@ -3043,6 +3343,183 @@ func (s *Brand) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Breakdown: A detailed impact breakdown for a group of regions where +// the impact of the issue on different shopping destinations is the +// same. +type Breakdown struct { + // Details: Human readable, localized description of issue's effect on + // different targets. Should be rendered as a list. For example: * + // "Products not showing in ads" * "Products not showing organically" + Details []string `json:"details,omitempty"` + + // Regions: Lists of regions. Should be rendered as a title for this + // group of details. The full list should be shown to merchant. If the + // list is too long, it is recommended to make it expandable. + Regions []*BreakdownRegion `json:"regions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Details") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Details") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Breakdown) MarshalJSON() ([]byte, error) { + type NoMethod Breakdown + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BreakdownRegion: Region with code and localized name. +type BreakdownRegion struct { + // Code: The [CLDR territory code] + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) + Code string `json:"code,omitempty"` + + // Name: The localized name of the region. For region with code='001' + // the value is 'All countries' or the equivalent in other languages. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BreakdownRegion) MarshalJSON() ([]byte, error) { + type NoMethod BreakdownRegion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BuiltInSimpleAction: Action that is implemented and performed in +// (your) third-party application. Represents various functionality that +// is expected to be available to merchant and will help them with +// resolving the issue. The application should point the merchant to the +// place, where they can access the corresponding functionality. If the +// functionality is not supported, it is recommended to explain the +// situation to merchant and provide them with instructions how to solve +// the issue. +type BuiltInSimpleAction struct { + // AdditionalContent: Long text from an external source that should be + // available to the merchant. Present when the type is + // `SHOW_ADDITIONAL_CONTENT`. + AdditionalContent *BuiltInSimpleActionAdditionalContent `json:"additionalContent,omitempty"` + + // AttributeCode: The attribute that needs to be updated. Present when + // the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for + // attribute, represented in snake_case. You can find a list of + // product's attributes, with their codes here + // (https://support.google.com/merchants/answer/7052112). + AttributeCode string `json:"attributeCode,omitempty"` + + // Type: The type of action that represents a functionality that is + // expected to be available in third-party application. + // + // Possible values: + // "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED" - Default value. Will + // never be provided by the API. + // "VERIFY_PHONE" - Redirect merchant to the part of your application + // where they can verify their phone. + // "CLAIM_WEBSITE" - Redirect merchant to the part of your application + // where they can claim their website. + // "ADD_PRODUCTS" - Redirect merchant to the part of your application + // where they can add products. + // "ADD_CONTACT_INFO" - Open a form where the merchant can edit their + // contact information. + // "LINK_ADS_ACCOUNT" - Redirect merchant to the part of your + // application where they can link ads account. + // "ADD_BUSINESS_REGISTRATION_NUMBER" - Open a form where the merchant + // can add their business registration number. + // "EDIT_ITEM_ATTRIBUTE" - Open a form where the merchant can edit an + // attribute. The attribute that needs to be updated is specified in + // attribute_code field of the action. + // "FIX_ACCOUNT_ISSUE" - Redirect merchant from the product issues to + // the diagnostic page with their account issues in your application. + // This action will be returned only for product issues that are caused + // by an account issue and thus merchant should resolve the problem on + // the account level. + // "SHOW_ADDITIONAL_CONTENT" - Show additional content to the + // merchant. This action will be used for example to deliver a + // justification from national authority. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalContent") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalContent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BuiltInSimpleAction) MarshalJSON() ([]byte, error) { + type NoMethod BuiltInSimpleAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BuiltInSimpleActionAdditionalContent: Long text from external source. +type BuiltInSimpleActionAdditionalContent struct { + // Paragraphs: Long text organized into paragraphs. + Paragraphs []string `json:"paragraphs,omitempty"` + + // Title: Title of the additional content; + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Paragraphs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Paragraphs") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BuiltInSimpleActionAdditionalContent) MarshalJSON() ([]byte, error) { + type NoMethod BuiltInSimpleActionAdditionalContent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type BusinessDayConfig struct { // BusinessDays: Regular business days, such as '"monday"'. May not be // empty. @@ -3153,6 +3630,9 @@ type BuyOnGoogleProgramStatus struct { // "ACTIVE" - Merchant's program participation is active for a // specific region code. // "PAUSED" - Participation has been paused. + // "DEPRECATED" - The program cannot be further reactivated or paused. + // See more about [Buy on + // Google](https://support.google.com/merchants/answer/7679273). ParticipationStage string `json:"participationStage,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5378,6 +5858,53 @@ func (s *Errors) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExternalAction: Action that is implemented and performed outside of +// the third-party application. It should redirect the merchant to the +// provided URL of an external system where they can perform the action. +// For example to request a review in the Merchant Center. +type ExternalAction struct { + // Type: The type of external action. + // + // Possible values: + // "EXTERNAL_ACTION_TYPE_UNSPECIFIED" - Default value. Will never be + // provided by the API. + // "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER" - Redirect to Merchant + // Center where the merchant can request a review for issue related to + // their product. + // "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER" - Redirect to Merchant + // Center where the merchant can request a review for issue related to + // their account. + // "LEGAL_APPEAL_IN_HELP_CENTER" - Redirect to the form in Help Center + // where the merchant can request a legal appeal for the issue. + Type string `json:"type,omitempty"` + + // Uri: URL to external system, for example Merchant Center, where the + // merchant can perform the action. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalAction) MarshalJSON() ([]byte, error) { + type NoMethod ExternalAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FreeListingsProgramStatus: Response message for // GetFreeListingsProgramStatus. type FreeListingsProgramStatus struct { @@ -14024,6 +14551,149 @@ func (s *ProductId) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ProductIssue: An issue affecting specific product. +type ProductIssue struct { + // Actions: A list of actionable steps that can be executed to solve the + // issue. An example is requesting a re-review or providing arguments + // when merchant disagrees with the issue. Actions that are supported in + // (your) third-party application can be rendered as buttons and should + // be available to merchant when they expand the issue. + Actions []*Action `json:"actions,omitempty"` + + // Impact: Clarifies the severity of the issue. The summarizing message, + // if present, should be shown right under the title for each issue. It + // helps merchants to quickly understand the impact of the issue. The + // detailed breakdown helps the merchant to fully understand the impact + // of the issue. It can be rendered as dialog that opens when the + // merchant mouse over the summarized impact statement. Issues with + // different severity can be styled differently. They may use a + // different color or icon to signal the difference between `ERROR`, + // `WARNING` and `INFO`. + Impact *ProductIssueImpact `json:"impact,omitempty"` + + // PrerenderedContent: Details of the issue as a pre-rendered HTML. HTML + // elements contain CSS classes that can be used to customize the style + // of the content. Always sanitize the HTML before embedding it directly + // to your application. The sanitizer needs to allow basic HTML tags, + // such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. + // For example, you can use DOMPurify + // (https://www.npmjs.com/package/dompurify). CSS classes: * + // `issue-detail` - top level container for the detail of the issue * + // `callout-banners` - section of the `issue-detail` with callout + // banners * `callout-banner` - single callout banner, inside + // `callout-banners` * `callout-banner-info` - callout with important + // information (default) * `callout-banner-warning` - callout with a + // warning * `callout-banner-error` - callout informing about an error + // (most severe) * `issue-content` - section of the `issue-detail`, + // contains multiple `content-element` * `content-element` - content + // element such as a list, link or paragraph, inside `issue-content` * + // `root-causes` - unordered list with items describing root causes of + // the issue, inside `issue-content` * `root-causes-intro` - intro text + // before the `root-causes` list, inside `issue-content` * `segment` - + // section of the text, `span` inside paragraph * `segment-attribute` - + // section of the text that represents a product attribute, for example + // 'image\_link' * `segment-literal` - section of the text that contains + // a special value, for example '0-1000 kg' * `segment-bold` - section + // of the text that should be rendered as bold * `segment-italic` - + // section of the text that should be rendered as italic * `tooltip` - + // used on paragraphs that should be rendered with a tooltip. A section + // of the text in such a paragraph will have a class `tooltip-text` and + // is intended to be shown in a mouse over dialog. If the style is not + // used, the `tooltip-text` section would be shown on a new line, after + // the main part of the text. * `tooltip-text` - marks a section of the + // text within a `tooltip`, that is intended to be shown in a mouse over + // dialog. * `tooltip-icon` - marks a section of the text within a + // `tooltip`, that can be replaced with a tooltip icon, for example '?' + // or 'i'. By default, this section contains a `br` tag, that is + // separating the main text and the tooltip text when the style is not + // used. * `tooltip-style-question` - the tooltip shows helpful + // information, can use the '?' as an icon. * `tooltip-style-info` - the + // tooltip adds additional information fitting to the context, can use + // the 'i' as an icon. * `content-moderation` - marks the paragraph that + // explains how the issue was identified. * `new-element` - Present for + // new elements added to the pre-rendered content in the future. To make + // sure that a new content element does not break your style, you can + // hide everything with this class. + PrerenderedContent string `json:"prerenderedContent,omitempty"` + + // Title: Title of the issue. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ProductIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductIssue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ProductIssueImpact: Overall impact of product issue. +type ProductIssueImpact struct { + // Breakdowns: Detailed impact breakdown. Explains the types of + // restriction the issue has in different shopping destinations and + // territory. If present, it should be rendered to the merchant. Can be + // shown as a mouse over dropdown or a dialog. Each breakdown item + // represents a group of regions with the same impact details. + Breakdowns []*Breakdown `json:"breakdowns,omitempty"` + + // Message: Optional. Message summarizing the overall impact of the + // issue. If present, it should be rendered to the merchant. For + // example: "Limits visibility in France" + Message string `json:"message,omitempty"` + + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "ERROR" - Causes either an account suspension or an item + // disapproval. Errors should be resolved as soon as possible to ensure + // items are eligible to appear in results again. + // "WARNING" - Warnings can negatively impact the performance of ads + // and can lead to item or account suspensions in the future unless the + // issue is resolved. + // "INFO" - Infos are suggested optimizations to increase data + // quality. Resolving these issues is recommended, but not required. + Severity string `json:"severity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Breakdowns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Breakdowns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ProductIssueImpact) MarshalJSON() ([]byte, error) { + type NoMethod ProductIssueImpact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ProductProductDetail struct { // AttributeName: The name of the product detail. AttributeName string `json:"attributeName,omitempty"` @@ -16380,6 +17050,172 @@ func (s *RegionalinventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RenderAccountIssuesRequestPayload: The payload for configuring how +// the content should be rendered. +type RenderAccountIssuesRequestPayload struct { + // ContentOption: Optional. How the detailed content should be returned. + // Default option is to return the content as a pre-rendered HTML text. + // + // Possible values: + // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be + // provided by the API. + // "PRE_RENDERED_HTML" - Returns the detail of the issue as a + // pre-rendered HTML text. + ContentOption string `json:"contentOption,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentOption") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentOption") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RenderAccountIssuesRequestPayload) MarshalJSON() ([]byte, error) { + type NoMethod RenderAccountIssuesRequestPayload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RenderAccountIssuesResponse: Response containing support content and +// actions for listed account issues. +type RenderAccountIssuesResponse struct { + // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) + // contains a link to a page where merchant can bring their appeal to an + // external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + // If the ADR is present, it MUST be available to the merchant on the + // page that shows the list with their account issues. + AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` + + // Issues: List of account issues for a given account. This list can be + // shown with compressed, expandable items. In the compressed form, the + // title and impact should be shown for each issue. Once the issue is + // expanded, the detailed content and available actions should be + // rendered. + Issues []*AccountIssue `json:"issues,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AlternateDisputeResolution") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AlternateDisputeResolution") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RenderAccountIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RenderAccountIssuesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RenderProductIssuesRequestPayload: The payload for configuring how +// the content should be rendered. +type RenderProductIssuesRequestPayload struct { + // ContentOption: Optional. How the detailed content should be returned. + // Default option is to return the content as a pre-rendered HTML text. + // + // Possible values: + // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be + // provided by the API. + // "PRE_RENDERED_HTML" - Returns the detail of the issue as a + // pre-rendered HTML text. + ContentOption string `json:"contentOption,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentOption") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentOption") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RenderProductIssuesRequestPayload) MarshalJSON() ([]byte, error) { + type NoMethod RenderProductIssuesRequestPayload + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RenderProductIssuesResponse: Response containing support content and +// actions for listed product issues. +type RenderProductIssuesResponse struct { + // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) + // contains a link to a page where merchant can bring their appeal to an + // external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + // If present, the link should be shown on the same page as the list of + // issues. + AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` + + // Issues: List of issues for a given product. This list can be shown + // with compressed, expandable items. In the compressed form, the title + // and impact should be shown for each issue. Once the issue is + // expanded, the detailed content and available actions should be + // rendered. + Issues []*ProductIssue `json:"issues,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AlternateDisputeResolution") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AlternateDisputeResolution") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RenderProductIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RenderProductIssuesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ReportInteractionRequest: Request to report interactions on a // recommendation. type ReportInteractionRequest struct { @@ -32777,6 +33613,364 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven } +// method id "content.merchantsupport.renderaccountissues": + +type MerchantsupportRenderaccountissuesCall struct { + s *APIService + merchantId int64 + renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Renderaccountissues: Provide a list of merchant's issues with a +// support content and available actions. This content and actions are +// meant to be rendered and shown in third-party applications. +// +// - merchantId: The ID of the account to fetch issues for. +func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { + c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF +// BCP-47 (https://tools.ietf.org/html/bcp47) language code used to +// localize support content. If not set, the result will be in default +// language ('en-US'). +func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in +// support content. For example 'America/Los_Angeles'. If not set, +// results will use as a default UTC. +func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("timeZone", timeZone) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MerchantsupportRenderaccountissuesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MerchantsupportRenderaccountissuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderaccountissuesrequestpayload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.merchantsupport.renderaccountissues" call. +// Exactly one of *RenderAccountIssuesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RenderAccountIssuesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RenderAccountIssuesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Provide a list of merchant's issues with a support content and available actions. This content and actions are meant to be rendered and shown in third-party applications.", + // "flatPath": "{merchantId}/merchantsupport/renderaccountissues", + // "httpMethod": "POST", + // "id": "content.merchantsupport.renderaccountissues", + // "parameterOrder": [ + // "merchantId" + // ], + // "parameters": { + // "languageCode": { + // "description": "Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize support content. If not set, the result will be in default language ('en-US').", + // "location": "query", + // "type": "string" + // }, + // "merchantId": { + // "description": "Required. The ID of the account to fetch issues for.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "timeZone": { + // "description": "Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in support content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{merchantId}/merchantsupport/renderaccountissues", + // "request": { + // "$ref": "RenderAccountIssuesRequestPayload" + // }, + // "response": { + // "$ref": "RenderAccountIssuesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } + +} + +// method id "content.merchantsupport.renderproductissues": + +type MerchantsupportRenderproductissuesCall struct { + s *APIService + merchantId int64 + productId string + renderproductissuesrequestpayload *RenderProductIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Renderproductissues: Provide a list of issues for merchant's product +// with a support content and available actions. This content and +// actions are meant to be rendered and shown in third-party +// applications. +// +// - merchantId: The ID of the account that contains the product. +// - productId: The REST_ID +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) +// of the product to fetch issues for. +func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { + c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.productId = productId + c.renderproductissuesrequestpayload = renderproductissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF +// BCP-47 (https://tools.ietf.org/html/bcp47) language code used to +// localize support content. If not set, the result will be in default +// language ('en-US'). +func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in +// support content. For example 'America/Los_Angeles'. If not set, +// results will use as a default UTC. +func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("timeZone", timeZone) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MerchantsupportRenderproductissuesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderproductissuesrequestpayload) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "productId": c.productId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "content.merchantsupport.renderproductissues" call. +// Exactly one of *RenderProductIssuesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RenderProductIssuesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RenderProductIssuesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Provide a list of issues for merchant's product with a support content and available actions. This content and actions are meant to be rendered and shown in third-party applications.", + // "flatPath": "{merchantId}/merchantsupport/renderproductissues/{productId}", + // "httpMethod": "POST", + // "id": "content.merchantsupport.renderproductissues", + // "parameterOrder": [ + // "merchantId", + // "productId" + // ], + // "parameters": { + // "languageCode": { + // "description": "Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize support content. If not set, the result will be in default language ('en-US').", + // "location": "query", + // "type": "string" + // }, + // "merchantId": { + // "description": "Required. The ID of the account that contains the product.", + // "format": "int64", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "productId": { + // "description": "Required. The [REST_ID](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) of the product to fetch issues for.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "timeZone": { + // "description": "Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in support content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "{merchantId}/merchantsupport/renderproductissues/{productId}", + // "request": { + // "$ref": "RenderProductIssuesRequestPayload" + // }, + // "response": { + // "$ref": "RenderProductIssuesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/content" + // ] + // } + +} + // method id "content.orderinvoices.createchargeinvoice": type OrderinvoicesCreatechargeinvoiceCall struct { diff --git a/contentwarehouse/v1/contentwarehouse-api.json b/contentwarehouse/v1/contentwarehouse-api.json index 27a46c259fa..18ac1ecfa0d 100644 --- a/contentwarehouse/v1/contentwarehouse-api.json +++ b/contentwarehouse/v1/contentwarehouse-api.json @@ -1156,7 +1156,7 @@ } } }, - "revision": "20230814", + "revision": "20230901", "rootUrl": "https://contentwarehouse.googleapis.com/", "schemas": { "AbuseiamAbuseType": { @@ -3725,7 +3725,9 @@ "ENGAGEMENTS_AFFINITY", "TRUSTED_CONTACTS_FL_AFFINITY", "CALENDAR_WEB_TEAM_MEMBERS_AFFINITY", - "CLOUDCONNECT_AFFINITY" + "CLOUDCONNECT_AFFINITY", + "PERSONAL_AGENT_AFFINITY", + "MOBILE_HARNESS_AFFINITY" ], "enumDeprecated": [ false, @@ -3991,6 +3993,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -4257,6 +4261,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -7355,11 +7361,12 @@ }, "profileUrl": { "deprecated": true, - "description": "DEPRECATED. (go/people-api-concepts#repeated): Use person.profile_url_repeated instead. Access to this field is restricted to a set of legacy clients. This is a Google+-only field. See go/fbs-g+-deprecation. NOTE: `Person.profile_url` is only populated for profile-centric person.", + "description": "DEPRECATED. No data is returned for this field anymore. (go/people-api-concepts#repeated): Use person.profile_url_repeated instead. Access to this field is restricted to a set of legacy clients. This is a Google+-only field. See go/fbs-g+-deprecation. NOTE: `Person.profile_url` is only populated for profile-centric person.", "type": "string" }, "profileUrlRepeated": { - "description": "This is a Google+-only field. See go/fbs-g+-deprecation.", + "deprecated": true, + "description": "DEPRECATED. No data is returned for this field anymore. This is a Google+-only field. See go/fbs-g+-deprecation.", "items": { "$ref": "AppsPeopleOzExternalMergedpeopleapiProfileUrl" }, @@ -10026,27 +10033,6 @@ }, "type": "object" }, - "AssistantApiCapabilitiesHomeAppCapabilities": { - "description": "Information about the readiness of Home app features on the device. As of January 2023, this is only populated by Assistant on Android.", - "id": "AssistantApiCapabilitiesHomeAppCapabilities", - "properties": { - "setupState": { - "description": "The app's installation and setup state. This is most pertinent for Tangor, where lock screen Smart Home queries are fulfilled by a Home app activity that may be blocked if this value is not `SETUP_STATE_COMPLETE`.", - "enum": [ - "SETUP_STATE_UNKNOWN", - "SETUP_STATE_INCOMPLETE", - "SETUP_STATE_COMPLETE" - ], - "enumDescriptions": [ - "Setup state is not known, potentially because the installed version of the app does not have the app state service.", - "First-time setup has not been completed.", - "First-time setup is known to be complete." - ], - "type": "string" - } - }, - "type": "object" - }, "AssistantApiCarAssistantCapabilities": { "description": "Capabilities that are associated with Assistants on auto surfaces. This is different from other capabilities such as CarSettingsCapabilities, CloudCarCapabilities since they are specific to settings and 3P cloud information. All the auto/car Assistant specific capabilities should live here.", "id": "AssistantApiCarAssistantCapabilities", @@ -14379,6 +14365,7 @@ "type": "string" }, "virtualReleaseChannel": { + "deprecated": true, "description": "A string describing device's release channel. For cast devices, the string will look like \"qa-beta-channel\", \"eng-no-update\", etc.", "type": "string" } @@ -15586,6 +15573,7 @@ }, "kidsMode": { "$ref": "AssistantApiSettingsKidsMode", + "deprecated": true, "description": "Specifies if kids-mode is enabled for the device. See go/aff-parentalsupervision-dd." }, "lastCastRegistrationTimestamp": { @@ -15633,6 +15621,7 @@ }, "notificationProfile": { "$ref": "AssistantApiSettingsNotificationProfile", + "deprecated": true, "description": "Information about how to send the user a notification. This won't be populated for fb-conv users (allo group chat users)." }, "oauthClientId": { @@ -15665,6 +15654,7 @@ }, "reauthTrustedDeviceSettings": { "$ref": "AssistantApiSettingsReauthTrustedDeviceSettings", + "deprecated": true, "description": "Trusted device preferences Assistant reauth. go/assistant-reauth-verify-skip." }, "shortenedAddress": { @@ -17054,10 +17044,6 @@ "gcmCapabilities": { "$ref": "AssistantApiGcmCapabilities" }, - "homeAppCapabilities": { - "$ref": "AssistantApiCapabilitiesHomeAppCapabilities", - "description": "Google Home app features." - }, "liveTvChannelCapabilities": { "$ref": "AssistantApiLiveTvChannelCapabilities", "description": "Capabilities related to live TV channels." @@ -19069,12 +19055,14 @@ "enum": [ "UNKNOWN_TYPE", "ZEROTH_PARTY_TYPE", - "ANDROID_SYSTEM_API_TYPE" + "ANDROID_SYSTEM_API_TYPE", + "ANDROID_APP_TYPE" ], "enumDescriptions": [ "", "Provider fulfillment is through 0-party assistant app (AGSA) on mobile or 0-party libassistant on other surfaces. See go/0p-and-system-api-in-pc.", - "Provider fulfillment is through Android System API. See go/0p-and-system-api-in-pc." + "Provider fulfillment is through Android System API. See go/0p-and-system-api-in-pc.", + "Provider fulfillment is through Android app fulfillment (App Actions)." ], "type": "string" } @@ -19085,55 +19073,68 @@ "id": "AssistantGroundingRankerAssistantInteractionFeatures", "properties": { "timeDecayed14dHalfLife": { + "deprecated": true, "format": "float", "type": "number" }, "timeDecayed1dHalfLife": { + "deprecated": true, "description": "Frequency features.", "format": "float", "type": "number" }, "timeDecayed7dHalfLife": { + "deprecated": true, "format": "float", "type": "number" }, "timeDecayedAccepted14dHalfLife": { + "deprecated": true, "format": "float", "type": "number" }, "timeDecayedAuis14dHalfLife": { + "deprecated": true, "format": "float", "type": "number" }, "timeDecayedCanceled14dHalfLife": { + "deprecated": true, "format": "float", "type": "number" }, "timeDecayedDeclined14dHalfLife": { + "deprecated": true, "format": "float", "type": "number" }, "timeSinceLastButOneCanceledActionSecs": { + "deprecated": true, "format": "float", "type": "number" }, "timeSinceLastButOneCompletedActionSecs": { + "deprecated": true, "format": "float", "type": "number" }, "timeSinceLastButTwoCanceledActionSecs": { + "deprecated": true, "format": "float", "type": "number" }, "timeSinceLastButTwoCompletedActionSecs": { + "deprecated": true, "format": "float", "type": "number" }, "timeSinceLastCanceledActionSecs": { + "deprecated": true, "format": "float", "type": "number" }, "timeSinceLastCompletedActionSecs": { + "deprecated": true, "description": "Recency features.", "format": "float", "type": "number" @@ -19292,14 +19293,17 @@ "id": "AssistantGroundingRankerDeviceContactAffinityFeatures", "properties": { "aggregateAffinity": { + "deprecated": true, "format": "float", "type": "number" }, "callAffinity": { + "deprecated": true, "format": "float", "type": "number" }, "messageAffinity": { + "deprecated": true, "format": "float", "type": "number" } @@ -19482,11 +19486,11 @@ "type": "object" }, "AssistantGroundingRankerDeviceTargetingFeaturesStates": { - "description": "The states of the device. They are dynamic and may change based on the current context. Next ID: 5", + "description": "The states of the device. They are dynamic and may change based on the current context. Next ID: 6", "id": "AssistantGroundingRankerDeviceTargetingFeaturesStates", "properties": { "distance": { - "description": "The distance of the device relative to others that hear the user's OKG. Timestamp of when the device was last used. Should correspond to when the AssistantRequestParams (in ASSISTANT_SNAPSHOT corpus) were last written for this device.", + "description": "The distance of the device relative to others that hear the user's OKG.", "enum": [ "UNKNOWN_DISTANCE", "CLOSEST", @@ -19505,6 +19509,10 @@ "description": "Indicate whether the device is docked on a base.", "type": "boolean" }, + "isLocal": { + "description": "Whether the device is a local device, i.e. the device that heard OKG from a user and is processed by an assistant pipeline. If multiple devices heard OKG (MDA case), each hearing device would be considered a local device in its own assistant pipeline. Example: A user says \"OKG, play music on TV\" to Google Home, and music is played on the TV. Google home is considered a local device, while TV is considered a remote device. Timestamp of when the device was last used. Should correspond to when the AssistantRequestParams (in ASSISTANT_SNAPSHOT corpus) were last written for this device.", + "type": "boolean" + }, "isLocked": { "description": "Indicate whether the device is locked.", "type": "boolean" @@ -19580,13 +19588,16 @@ "id": "AssistantGroundingRankerLaaFeatures", "properties": { "bindingSet": { - "$ref": "AssistantGroundingRankerLaaFeaturesBindingSet" + "$ref": "AssistantGroundingRankerLaaFeaturesBindingSet", + "deprecated": true }, "communicationEndpoint": { - "$ref": "AssistantGroundingRankerLaaFeaturesCommunicationEndpoint" + "$ref": "AssistantGroundingRankerLaaFeaturesCommunicationEndpoint", + "deprecated": true }, "contact": { - "$ref": "AssistantGroundingRankerLaaFeaturesContact" + "$ref": "AssistantGroundingRankerLaaFeaturesContact", + "deprecated": true }, "features": { "items": { @@ -19595,7 +19606,8 @@ "type": "array" }, "provider": { - "$ref": "AssistantGroundingRankerLaaFeaturesProvider" + "$ref": "AssistantGroundingRankerLaaFeaturesProvider", + "deprecated": true } }, "type": "object" @@ -19604,7 +19616,8 @@ "id": "AssistantGroundingRankerLaaFeaturesBindingSet", "properties": { "assistantInteractionFeatures": { - "$ref": "AssistantGroundingRankerAssistantInteractionFeatures" + "$ref": "AssistantGroundingRankerAssistantInteractionFeatures", + "deprecated": true } }, "type": "object" @@ -19613,7 +19626,8 @@ "id": "AssistantGroundingRankerLaaFeaturesCommunicationEndpoint", "properties": { "assistantInteractionFeatures": { - "$ref": "AssistantGroundingRankerAssistantInteractionFeatures" + "$ref": "AssistantGroundingRankerAssistantInteractionFeatures", + "deprecated": true } }, "type": "object" @@ -19622,10 +19636,12 @@ "id": "AssistantGroundingRankerLaaFeaturesContact", "properties": { "assistantInteractionFeatures": { - "$ref": "AssistantGroundingRankerAssistantInteractionFeatures" + "$ref": "AssistantGroundingRankerAssistantInteractionFeatures", + "deprecated": true }, "deviceContactAffinityFeatures": { - "$ref": "AssistantGroundingRankerDeviceContactAffinityFeatures" + "$ref": "AssistantGroundingRankerDeviceContactAffinityFeatures", + "deprecated": true } }, "type": "object" @@ -19634,13 +19650,14 @@ "id": "AssistantGroundingRankerLaaFeaturesProvider", "properties": { "assistantInteractionFeatures": { - "$ref": "AssistantGroundingRankerAssistantInteractionFeatures" + "$ref": "AssistantGroundingRankerAssistantInteractionFeatures", + "deprecated": true } }, "type": "object" }, "AssistantGroundingRankerMediaGroundingProviderFeatures": { - "description": "Features to be passed from Media GP to HGR. Next ID: 17", + "description": "Features to be passed from Media GP to HGR. Next ID: 18", "id": "AssistantGroundingRankerMediaGroundingProviderFeatures", "properties": { "albumReleaseType": { @@ -19679,6 +19696,10 @@ "description": "Mid of the media item. This is currently only used in manual rules.", "type": "string" }, + "hasCastVideoDeeplink": { + "description": "True if the candidate has a CAST_VIDEO deeplink regardless of which provider was chosen.", + "type": "boolean" + }, "hasTypeSemanticEdge": { "description": "True if the argument's type was explicitly mentioned in the query.", "type": "boolean" @@ -19876,6 +19897,7 @@ "NEWS", "NARRATED_WEB", "NEWS_CALL_TO_ACTION", + "NEWS_OVERVIEW", "AUDIO_STORY", "PODCAST_SERIES", "PODCAST_EPISODE" @@ -19906,6 +19928,7 @@ "", "", "Repesents a Call To Action media item. See go/newsplayer-outro-gnews. Current use case is to ask users to continue their news journey in the Google News app / web app. Future cases could include asking users to adjust their news settings.", + "Represents a Narrative News Overview media item. This a multi-segment news media item with interactive elements. See go/gen-narrative-news-intro.", "Representing a short audio story. go/tmas-design", "Represent different kinds of podcast content", "" @@ -19920,7 +19943,7 @@ "type": "object" }, "AssistantGroundingRankerPodcastGroundingProviderFeatures": { - "description": "Features to be extracted from Podcast GP for ranking in HGR. Next ID: 6", + "description": "Features to be extracted from Podcast GP for ranking in HGR. Next ID: 7", "id": "AssistantGroundingRankerPodcastGroundingProviderFeatures", "properties": { "isExclusive": { @@ -19946,6 +19969,11 @@ "description": "Tstar score is a signal that indicates the quality of the entity.", "format": "double", "type": "number" + }, + "youtubeConfidenceScore": { + "description": "This score is in the range [0.0, 1.0] and is used for cross-backend (e.g., YT vs another Music/Podcast service provider) ranking and scoring. 0.0 means no confidence and 1.0 means full confidence.", + "format": "double", + "type": "number" } }, "type": "object" @@ -20888,6 +20916,7 @@ "NEWS", "NARRATED_WEB", "NEWS_CALL_TO_ACTION", + "NEWS_OVERVIEW", "AUDIO_STORY", "PODCAST_SERIES", "PODCAST_EPISODE" @@ -20918,6 +20947,7 @@ "", "", "Repesents a Call To Action media item. See go/newsplayer-outro-gnews. Current use case is to ask users to continue their news journey in the Google News app / web app. Future cases could include asking users to adjust their news settings.", + "Represents a Narrative News Overview media item. This a multi-segment news media item with interactive elements. See go/gen-narrative-news-intro.", "Representing a short audio story. go/tmas-design", "Represent different kinds of podcast content", "" @@ -21935,8 +21965,22 @@ }, "type": "object" }, + "AssistantPfrTiebreakingMetadata": { + "description": "Features used by the PrefulfillmentRanker's scorer exclusively to break ties.", + "id": "AssistantPfrTiebreakingMetadata", + "properties": { + "fingerprint": { + "format": "uint64", + "type": "string" + }, + "sortedNameString": { + "type": "string" + } + }, + "type": "object" + }, "AssistantPrefulfillmentRankerPrefulfillmentSignals": { - "description": "Signals to be used by the Prefulfillment Ranker. Derived from the ParsingSignals and GroundingSignals carried by the FunctionCall. LINT.IfChange Next ID: 62", + "description": "Signals to be used by the Prefulfillment Ranker. Derived from the ParsingSignals and GroundingSignals carried by the FunctionCall. LINT.IfChange Next ID: 65", "id": "AssistantPrefulfillmentRankerPrefulfillmentSignals", "properties": { "bindingSetAuis": { @@ -22097,6 +22141,10 @@ "description": "Whether the intent is an intent marked disabled by the Sage IG.", "type": "boolean" }, + "isSageInNageIntent": { + "description": "Whether the intent is produced by the Sage IntentGenerator invoked by the NSP intent-generator (thus, Sage-in-NSP-invoking_Sage, or Sage-in-Nage).", + "type": "boolean" + }, "isSageIntent": { "description": "Whether this intent was generated by Sage.", "type": "boolean" @@ -22222,6 +22270,10 @@ ], "type": "string" }, + "platinumSource": { + "description": "Whether the intent comes from the Sage IntentGenerator's \"platinum\" source, signifying high-confidence in quality.", + "type": "boolean" + }, "pq2tVsAssistantIbstCosine": { "description": "Cosine similarity between predicted query-to-term model and assistant intent-type-based salient terms. This is intended to be only used for ACE ranking and only populated for assistant traffic.", "format": "double", @@ -22306,7 +22358,9 @@ "SUB_INTENT_TYPE_PODCAST", "SUB_INTENT_TYPE_MUSIC_INITIATION_INTENT", "SUB_INTENT_TYPE_PLAY_RADIO_INTENT", - "SUB_INTENT_TYPE_PLAY_TVM_INTENT" + "SUB_INTENT_TYPE_PLAY_TVM_INTENT", + "SUB_INTENT_TYPE_PLAY_VIDEO_INTENT", + "SUB_INTENT_TYPE_BROWSE_VIDEO_INTENT" ], "enumDescriptions": [ "", @@ -22314,10 +22368,15 @@ "Play_media, Play_media, Play_media, Listen_to_media, Media_entity_bare, Play_and_shuffle_media", "Play_media", "Play_media", - "Play_media" + "Play_media", + "Play media", + "Find_media, Media_entity_bare" ], "type": "string" }, + "tiebreakingMetadata": { + "$ref": "AssistantPfrTiebreakingMetadata" + }, "topHypothesisConfidence": { "description": "Average of per-word confidence for top speech recognition hypothesis. The value is from RecognizerHypothesisLog: http://google3/logs/proto/speech/service/recognizer_log.proto?l=848\u0026rcl=281400256", "format": "float", @@ -24605,7 +24664,7 @@ "type": "object" }, "CompositeDoc": { - "description": "Protocol record used for collecting together all information about a document. Please consult go/dj-explorer for two basic questions about `CompositeDoc`: - Where should I look up certain information (e.g: pagerank, language)? - What does each field in CompositeDoc mean and who should I contact if I have questions? To add a new field into CompositeDoc, or change existing field's size significantly, please file a ticket at go/dj-new-field, fill in necessary information and get approved by docjoin-access@ team. Next id: 191", + "description": "Protocol record used for collecting together all information about a document. Please consult go/dj-explorer for two basic questions about `CompositeDoc`: - Where should I look up certain information (e.g: pagerank, language)? - What does each field in CompositeDoc mean and who should I contact if I have questions? To add a new field into CompositeDoc, or change existing field's size significantly, please file a ticket at go/dj-new-field, fill in necessary information and get approved by docjoin-access@ team. Next id: 193", "id": "CompositeDoc", "properties": { "ContentChecksum96": { @@ -24627,10 +24686,12 @@ "type": "array" }, "anchorStats": { - "$ref": "IndexingDocjoinerAnchorStatistics" + "$ref": "IndexingDocjoinerAnchorStatistics", + "description": "Mark as non-personal since it's an aggregation of anchors. For more details of Search personal data, see go/dma52-search-cdoc-fields." }, "anchors": { - "$ref": "Anchors" + "$ref": "Anchors", + "description": "Mark as non-personal since no personal fields will be populated in `anchors.link_additional_info` and `anchors.additional_info`. For more details of Search personal data, see go/dma52-search-cdoc-fields." }, "badSslCertificate": { "$ref": "IndexingBadSSLCertificate", @@ -25125,6 +25186,10 @@ "format": "float", "type": "number" }, + "primaryVertical": { + "description": "Vertical membership of the document. - `primary_vertical` is the vertical that initiated indexing of this document (or empty if the vertical was websearch). - `verticals` is the full list of verticals that contained this document (excluding websearch) at indexing time. `primary_vertical` may or may not be an element of `verticals` because of vertical membership skew between the ingestion time and indexing time. See go/one-indexing-for-web for more background.", + "type": "string" + }, "rawNavboost": { "description": "The raw navboost count for the canonical url without aggregating the navboost from dup urls. This field is used when building forwarding map.", "format": "int32", @@ -25159,6 +25224,12 @@ "$ref": "IndexingSignalAggregatorUrlPatternSignals", "description": "UrlPatternSignals for this doc, used to compute document score in LTG (see indexing/signal_aggregator/proto/signal-aggregator.proto for details)." }, + "verticals": { + "items": { + "type": "string" + }, + "type": "array" + }, "videoIndexingInfo": { "$ref": "ImageRepositoryVideoIndexingInfo", "description": "Indexing info about videos." @@ -25264,12 +25335,14 @@ "enum": [ "RAFFIA_WEBSEARCH", "RAFFIA_FASTPATH_DAILY", - "RAFFIA_FASTPATH_INSTANT" + "RAFFIA_FASTPATH_INSTANT", + "DOCJOINS" ], "enumDescriptions": [ "Base Raffia corpora", "Fastpath Raffia corpora", - "" + "", + "Docjoins repository" ], "type": "string" }, @@ -36229,7 +36302,7 @@ "properties": { "duplicateOf": { "$ref": "GeostoreFeatureIdProto", - "description": "If the feature has been marked as a DUPLICATE of another feature, this is the feature ID of that other feature. Note that the other feature may itself be removed. This field is NOT set in (1)." + "description": "If the feature has been marked as a DUPLICATE of another feature, this is the feature ID of that other feature. Note that the other feature may itself be removed. This field is always set." }, "forwardedId": { "$ref": "GeostoreFeatureIdProto", @@ -36478,6 +36551,7 @@ "SEGMENT_PEDESTRIAN_FACILITY", "SEGMENT_PEDESTRIAN_GRADE", "SEGMENT_PRIORITY", + "SEGMENT_RAMP_MAX_CONNECTED_PRIORITY", "SEGMENT_RESTRICTION", "SEGMENT_ROAD_CAMERA", "SEGMENT_ROAD_SIGN", @@ -36501,6 +36575,7 @@ "STATUS_REMOVED_REASON", "STATUS_START_DATE", "STOREFRONT_GEOMETRY", + "STOREFRONT_GEOMETRY_MODEL", "SYNTHETIC_GEOMETRY", "THREE_DIMENSIONAL_MODEL", "TOLL_CLUSTER_INTERSECTION", @@ -36724,6 +36799,8 @@ false, false, false, + false, + false, true, true, true, @@ -36979,6 +37056,8 @@ "", "", "", + "", + "", "" ], "type": "string" @@ -37208,9 +37287,7 @@ "type": "array" }, "political": { - "$ref": "GeostorePoliticalProto", - "deprecated": true, - "description": "** DEPRECATED ** Detail discussion could be found at b/18611003." + "$ref": "GeostorePoliticalProto" }, "polygon": { "items": { @@ -37347,6 +37424,10 @@ }, "type": "array" }, + "storefrontGeometryModel": { + "$ref": "GeostoreGeometryStoreReferenceProto", + "description": "Geometry Store ID and materialized geometry for a POI feature's storefront(s)." + }, "syntheticGeometry": { "description": "We prefer features that have geometry over those that do not. In some cases we synthesize geometry (e.g., polygons for postal codes). This flag is set to indicate features that have such synthetic geometry.", "type": "boolean" @@ -38555,24 +38636,25 @@ "type": "object" }, "GeostoreFieldWithRightsProto": { - "description": "Proto used to represent rights for a field type. See go/geo-rights for more details. NOTE: Use google3/geostore/provenance/public/rights.h or google3/java/com/google/geostore/provenance/rights/Rights.java instead of accessing this proto directly.", + "description": "Proto used to represent rights for a feature property id. See go/geo-rights for more details. NOTE: Use google3/geostore/provenance/public/rights.h or google3/java/com/google/geostore/provenance/rights/Rights.java instead of accessing this proto directly.", "id": "GeostoreFieldWithRightsProto", "properties": { "attributeId": { "deprecated": true, - "description": "** DEPRECATED ** If field_type is set to FEATURE_ATTRIBUTE or KNOWLEDGE_GRAPH_PROPERTY, the attribute ID / KG property ID that makes this field with rights complete.", + "description": "**DEPRECATED** Never set. ", "type": "string" }, "featurePropertyId": { - "$ref": "GeostoreFeaturePropertyIdProto" + "$ref": "GeostoreFeaturePropertyIdProto", + "description": "The feature property id for which this entry tracks rights." }, "fieldType": { - "description": "The field type for which the rights level are tracked on. The default value here has to match the value of fieldtype::NONE.", + "description": "**DEPRECATED** The field type for which this entry tracks rights. There may be multiple entries for the same field type - prefer feature_property_id to uniquely identify a particular entry. ", "format": "int32", "type": "integer" }, "minRightsLevel": { - "description": "The minimum rights level for all the current values on the field type.", + "description": "The minimum rights level among all current values for this feature property id.", "enum": [ "UNKNOWN_RIGHTS", "GT_RIGHTS", @@ -44692,16 +44774,19 @@ "description": "Many political regions have a conceptual center (capitals of a country or a top-level division are examples). If set, the target feature must be a TYPE_LOCALITY feature." }, "grossDomesticProductUsdMillions": { + "deprecated": true, "description": "The Gross Domestic Product of the political region measured in millions of current United States dollars. It must not be negative.", "format": "double", "type": "number" }, "literacyPercent": { + "deprecated": true, "description": "Percentage of population that are literate within a political region. It must be between 0 and 100.", "format": "float", "type": "number" }, "population": { + "deprecated": true, "description": "The number of people in this political region. This field is intended to store accurate population, not an estimation such as representative value for population range. It must not be negative.", "format": "int64", "type": "string" @@ -48930,6 +49015,10 @@ "$ref": "GeostoreFieldMetadataProto", "description": "Field-level metadata for the priority." }, + "ramp": { + "$ref": "GeostoreSegmentProtoRampProto", + "description": "RESERVED" + }, "restriction": { "description": "The set of restrictions that apply to this segment. Restrictions may make a single segment, turn, or more complex maneuver along a set of segments unroutable for the specified travel modes, or may only add penalties or warnings, depending on the restriction type. Turn restrictions are one example of a restriction. By default, turns are allowed onto all outgoing segments from this segment's intersection (including the sibling of this segment, i.e. U-turns are allowed by default). If any of these turns are disallowed they will be listed as \"subpath restrictions\". A subpath restriction disallows travel on given sequence of segments. In the case of a disallowed turn, the subpath simply consists of the source and destination feature ids. There may also be restrictions that apply to all travel on this segment (e.g. chains required, or closed in winter), or restrictions that just apply to certain lanes (e.g. high occupancy vehicle lanes).", "items": { @@ -49099,6 +49188,41 @@ }, "type": "object" }, + "GeostoreSegmentProtoRampProto": { + "description": "Encapsulates ramp-specific properties.", + "id": "GeostoreSegmentProtoRampProto", + "properties": { + "maxConnectedPriority": { + "description": "The highest priority of any TYPE_ROAD endpoint segment which is transitively connected to this ramp via other ramp segments. For instance, if we have two roads connected through a series of ramps (omitting intersections): Road(P=96)-\u003e Ramp 1 -\u003e Ramp 2 -\u003e Ramp 3 -\u003e Road(P=122) -\u003e Road(P=144) The `max_connected_priority` of all three intermediary ramps is 122. It's not 144, since Road(P=144) is connected through another road, not a ramp. This differs from the usual `SegmentProto.priority` field, which contains the lowest priority across any connected road segment.", + "enum": [ + "PRIORITY_UNKNOWN", + "PRIORITY_NON_TRAFFIC", + "PRIORITY_TERMINAL", + "PRIORITY_LOCAL", + "PRIORITY_MINOR_ARTERIAL", + "PRIORITY_MAJOR_ARTERIAL", + "PRIORITY_SECONDARY_ROAD", + "PRIORITY_PRIMARY_HIGHWAY", + "PRIORITY_LIMITED_ACCESS", + "PRIORITY_CONTROLLED_ACCESS" + ], + "enumDescriptions": [ + "The priority of the segment is unknown. This is not actually allowed to be set in MapFacts, but best-practice is to have a default 0 value for enums.", + "A non-traffic segment is not intended for normal vehicles, e.g. a pedestrian mall. 0x10", + "A terminal road is not intended to carry through traffic, e.g. a narrow residential street or an access road to a point of interest. 0x20", + "A small city street, typically for travel in a residential neighborhood, or a small rural road. This is the lowest priority suitable for through traffic. 0x30", + "A moderate-capacity \"collector\" that funnels traffic from local roads towards arterial roads or business areas. 0x40", + "A high-capacity road that carries large volumes of traffic between different neighborhoods or towns. 0x50", + "Roads that act as conduits a) between primary highways (and above), or b) from major/minor arterial roads to primary highways (and above). They may be state highways, for example. 0x60", + "These highways are major preferred roads that connect between regions, but that do not have significant access restrictions. Most crossings are level grade (traffic light, stop sign) and there may be driveways and local roads that connect directly to the highway. NOTE: Where a dense network of limited/controlled access roads carries most of the traffic between regions, this priority may be infrequent. 0x70", + "Limited access highways have some access restrictions, but are not fully access controlled. Typically driveways and local roads connect to a separate \"frontage road\" that is connected to the highway via spaced traffic lights, interchanges, or stop signs. Limited access roads are sometimes called expressways. 0x80", + "Controlled access highways have grade-separated crossings and are accessed exclusively by ramps. They are usually called \"freeways\" or \"motorways\". 0x90" + ], + "type": "string" + } + }, + "type": "object" + }, "GeostoreServiceAreaProto": { "description": "This proto represents the geographic area served by an establishment. WARNING: This proto is not meant to be used directly. Please use the provided libraries. http://google3/geostore/base/public/service_area.h http://google3/java/com/google/geostore/base/ServiceArea.java", "id": "GeostoreServiceAreaProto", @@ -60828,7 +60952,7 @@ "type": "object" }, "ImageData": { - "description": "This defines the per-doc data which is extracted from thumbnails and propagated over to indexing. It contains all information that can be used for restricts. Next tag id: 129", + "description": "This defines the per-doc data which is extracted from thumbnails and propagated over to indexing. It contains all information that can be used for restricts. Next tag id: 130", "id": "ImageData", "properties": { "adaboostImageFeaturePorn": { @@ -61017,7 +61141,7 @@ "type": "number" }, "h2i": { - "description": "'Hovers to Impressions' and 'Hovers to Clicks' ratios for an image.", + "description": "'Hovers to Impressions' and 'Hovers to Clicks' ratios for an image. These are considered Search CPS Personal Data due to concerns that they may be used to reidentify or confirm the presence of specific singleton (unique) queries.", "format": "float", "type": "number" }, @@ -61118,6 +61242,11 @@ "format": "int32", "type": "integer" }, + "linkinfoType": { + "description": "Bitmask of LinkInfo enum in google3/indexing/converter/outlinks/linkinfo.h.", + "format": "uint64", + "type": "string" + }, "multibangKgEntities": { "$ref": "ImageDataMultibangEntities" }, @@ -62440,7 +62569,7 @@ "type": "object" }, "ImageRepositoryAmarnaCloudSpeechSignals": { - "description": "Next Tag: 8", + "description": "Next Tag: 9", "id": "ImageRepositoryAmarnaCloudSpeechSignals", "properties": { "duplicateOfYtS3Asr": { @@ -62452,7 +62581,6 @@ "type": "string" }, "modelIdentifier": { - "description": "Identifying which ASR models are used for the result", "type": "string" }, "results": { @@ -62462,6 +62590,10 @@ }, "type": "array" }, + "s3RecognizerMetadataResponse": { + "$ref": "ImageRepositoryS3RecognizerMetadataResponse", + "description": "The metadata about the S3 recognizer used." + }, "transcriptAsr": { "$ref": "PseudoVideoData", "description": "This field contains full (stitched) transcription, word-level time offset , and word-level byte offset. The value of this field is derived from the SpeechRecognitionResult field above." @@ -63224,6 +63356,22 @@ }, "type": "object" }, + "ImageRepositoryS3RecognizerMetadataResponse": { + "description": "This proto is trimmed down from RecognizerMetadataResponse in google3/speech/service/s3/services/recognizer/recognizer.proto", + "id": "ImageRepositoryS3RecognizerMetadataResponse", + "properties": { + "mode": { + "type": "string" + }, + "modelInfoLabel": { + "type": "string" + }, + "serviceName": { + "type": "string" + } + }, + "type": "object" + }, "ImageRepositoryShoppingProductInformation": { "description": "A message containing embedding information and localization scores using the VSS product recognition module.", "id": "ImageRepositoryShoppingProductInformation", @@ -70585,6 +70733,10 @@ "description": "Accepts any non-empty value. This is meant for special cases allowing any value or any composition to be valid in a slot. If you are thinking of using this, please contact mrf-team@.", "id": "KnowledgeAnswersAnyType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -70603,6 +70755,10 @@ }, "type": "array" }, + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "pivotEntitySlot": { "description": "If exist, the attribute will be applied on the given pivot slot. This helps type checking when qrewrite constructs function calls with an attribute-typed slot.", "type": "string" @@ -70618,6 +70774,10 @@ "description": "A BooleanType configures a yes/no value.", "id": "KnowledgeAnswersBooleanType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -70636,6 +70796,10 @@ }, "type": "array" }, + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -70647,6 +70811,10 @@ "description": "A CompoundType configures a value composed of multiple answer values.", "id": "KnowledgeAnswersCompoundType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -70667,7 +70835,7 @@ "type": "object" }, "KnowledgeAnswersDateType": { - "description": "A DateType configures a value whose type is intended to be a date. LINT.IfChange Next id: 16", + "description": "A DateType configures a value whose type is intended to be a date. LINT.IfChange Next id: 17", "id": "KnowledgeAnswersDateType", "properties": { "allowAllRangeResolutions": { @@ -70722,6 +70890,10 @@ "description": "If true, will parse a mention to DateTime of resolution year. This allows parsing strings like \"Next year \", \"2010\";", "type": "boolean" }, + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -70749,6 +70921,10 @@ "KnowledgeAnswersDependencyType": { "id": "KnowledgeAnswersDependencyType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "containerType": { "$ref": "KnowledgeAnswersContainerType" }, @@ -70802,6 +70978,10 @@ "description": "A DurationType configures a value whose type is a duration.", "id": "KnowledgeAnswersDurationType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "rangeConstraint": { "$ref": "KnowledgeAnswersRangeConstraint", "description": "Range constraint limits the set of durations accepted. The values of the range are in milliseconds. Currently, this constraint is only enforced in Loose Parser." @@ -70814,7 +70994,7 @@ "type": "object" }, "KnowledgeAnswersEntityType": { - "description": "An EntityType configures a value whose type is intended to be an entity. Entities may be specified using either the collection(s) to which they belong, or explicitly via a list of KG-ids. Both collections and ids can be specified, in which case the type will be the union of the id(s) and all mids within the collection(s). Next available tag: 9", + "description": "An EntityType configures a value whose type is intended to be an entity. Entities may be specified using either the collection(s) to which they belong, or explicitly via a list of KG-ids. Both collections and ids can be specified, in which case the type will be the union of the id(s) and all mids within the collection(s). Next available tag: 10", "id": "KnowledgeAnswersEntityType", "properties": { "collection": { @@ -70824,6 +71004,10 @@ }, "type": "array" }, + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "excludedCollection": { "description": "The entity that this value is filled with must not be any of these collections (denoted by a /collection/* id). This restriction does not affect parsing; it is used only to filter attributes in the extraction flow.", "items": { @@ -71262,7 +71446,7 @@ "type": "object" }, "KnowledgeAnswersIntentQueryArgumentSignals": { - "description": "A message representing the signals associated with an argument. NEXT ID TO USE: 58 For //depot/google3/logs/proto/knowledge/interpretation/intent_query.proto in the \"ThenChange\", fields under Argument.signals in the serving proto are stored directly under Argument on the logging side. For example, see http://google3/nlp/semantic_parsing/data_management/logs/web_logs/semantic_logging_converters/semantic_logging_request_argument_converter.cc?l=58\u0026rcl=322925428. LINT.IfChange", + "description": "A message representing the signals associated with an argument. NEXT ID TO USE: 59 For //depot/google3/logs/proto/knowledge/interpretation/intent_query.proto in the \"ThenChange\", fields under Argument.signals in the serving proto are stored directly under Argument on the logging side. For example, see http://google3/nlp/semantic_parsing/data_management/logs/web_logs/semantic_logging_converters/semantic_logging_request_argument_converter.cc?l=58\u0026rcl=322925428. LINT.IfChange", "id": "KnowledgeAnswersIntentQueryArgumentSignals", "properties": { "addedByCloseAnswers": { @@ -71405,6 +71589,1126 @@ "$ref": "KnowledgeAnswersIntentQueryLocationMarkersSignals", "description": "The usual semantic role associated with the signal from lightweight tokens attached to this argument span." }, + "locationType": { + "description": "The type category for the location stored in this Argument, if it exists.", + "enum": [ + "TYPE_ANY", + "TYPE_TRANSPORTATION", + "TYPE_ROUTE", + "TYPE_DEPRECATED_HIGHWAY_DO_NOT_USE", + "TYPE_HIGHWAY", + "TYPE_HIGHWAY_1", + "TYPE_HIGHWAY_2", + "TYPE_HIGHWAY_3", + "TYPE_HIGHWAY_4", + "TYPE_HIGHWAY_5", + "TYPE_HIGHWAY_6", + "TYPE_HIGHWAY_7", + "TYPE_HIGHWAY_8", + "TYPE_HIGHWAY_9", + "TYPE_BICYCLE_ROUTE", + "TYPE_TRAIL", + "TYPE_SEGMENT", + "TYPE_ROAD", + "TYPE_RAILWAY", + "TYPE_STANDARD_TRACK", + "TYPE_JR_TRACK", + "TYPE_NARROW_TRACK", + "TYPE_MONORAIL_TRACK", + "TYPE_SUBWAY_TRACK", + "TYPE_LIGHT_RAIL_TRACK", + "TYPE_BROAD_TRACK", + "TYPE_HIGH_SPEED_RAIL", + "TYPE_TROLLEY_TRACK", + "TYPE_FERRY", + "TYPE_FERRY_BOAT", + "TYPE_FERRY_TRAIN", + "TYPE_VIRTUAL_SEGMENT", + "TYPE_INTERSECTION", + "TYPE_TRANSIT", + "TYPE_TRANSIT_STATION", + "TYPE_BUS_STATION", + "TYPE_TRAMWAY_STATION", + "TYPE_TRAIN_STATION", + "TYPE_SUBWAY_STATION", + "TYPE_FERRY_TERMINAL", + "TYPE_AIRPORT", + "TYPE_AIRPORT_CIVIL", + "TYPE_AIRPORT_MILITARY", + "TYPE_AIRPORT_MIXED", + "TYPE_HELIPORT", + "TYPE_SEAPLANE_BASE", + "TYPE_AIRSTRIP", + "TYPE_CABLE_CAR_STATION", + "TYPE_GONDOLA_LIFT_STATION", + "TYPE_FUNICULAR_STATION", + "TYPE_SPECIAL_STATION", + "TYPE_HORSE_CARRIAGE_STATION", + "TYPE_MONORAIL_STATION", + "TYPE_SEAPORT", + "TYPE_TRANSIT_STOP", + "TYPE_TRANSIT_TRIP", + "TYPE_TRANSIT_DEPARTURE", + "TYPE_TRANSIT_LEG", + "TYPE_TRANSIT_LINE", + "TYPE_TRANSIT_AGENCY_DEPRECATED_VALUE", + "TYPE_TRANSIT_TRANSFER", + "TYPE_SEGMENT_PATH", + "TYPE_ROAD_SIGN", + "TYPE_INTERSECTION_GROUP", + "TYPE_PATHWAY", + "TYPE_RESTRICTION_GROUP", + "TYPE_TOLL_CLUSTER", + "TYPE_POLITICAL", + "TYPE_COUNTRY", + "TYPE_ADMINISTRATIVE_AREA", + "TYPE_ADMINISTRATIVE_AREA1", + "TYPE_US_STATE", + "TYPE_GB_COUNTRY", + "TYPE_JP_TODOUFUKEN", + "TYPE_ADMINISTRATIVE_AREA2", + "TYPE_GB_FORMER_POSTAL_COUNTY", + "TYPE_GB_TRADITIONAL_COUNTY", + "TYPE_ADMINISTRATIVE_AREA3", + "TYPE_ADMINISTRATIVE_AREA4", + "TYPE_ADMINISTRATIVE_AREA5", + "TYPE_ADMINISTRATIVE_AREA6", + "TYPE_ADMINISTRATIVE_AREA7", + "TYPE_ADMINISTRATIVE_AREA8", + "TYPE_ADMINISTRATIVE_AREA9", + "TYPE_COLLOQUIAL_AREA", + "TYPE_RESERVATION", + "TYPE_LOCALITY", + "TYPE_GB_POST_TOWN", + "TYPE_JP_GUN", + "TYPE_JP_SHIKUCHOUSON", + "TYPE_JP_SUB_SHIKUCHOUSON", + "TYPE_COLLOQUIAL_CITY", + "TYPE_SUBLOCALITY", + "TYPE_US_BOROUGH", + "TYPE_GB_DEPENDENT_LOCALITY", + "TYPE_JP_OOAZA", + "TYPE_JP_KOAZA", + "TYPE_JP_GAIKU", + "TYPE_GB_DOUBLE_DEPENDENT_LOCALITY", + "TYPE_JP_CHIBAN", + "TYPE_JP_EDABAN", + "TYPE_SUBLOCALITY1", + "TYPE_SUBLOCALITY2", + "TYPE_SUBLOCALITY3", + "TYPE_SUBLOCALITY4", + "TYPE_SUBLOCALITY5", + "TYPE_NEIGHBORHOOD", + "TYPE_CONSTITUENCY", + "TYPE_DESIGNATED_MARKET_AREA", + "TYPE_SCHOOL_DISTRICT", + "TYPE_LAND_PARCEL", + "TYPE_DISPUTED_AREA", + "TYPE_POLICE_JURISDICTION", + "TYPE_STATISTICAL_AREA", + "TYPE_CONSTITUENCY_FUTURE", + "TYPE_PARK", + "TYPE_GOLF_COURSE", + "TYPE_LOCAL_PARK", + "TYPE_NATIONAL_PARK", + "TYPE_US_NATIONAL_PARK", + "TYPE_US_NATIONAL_MONUMENT", + "TYPE_NATIONAL_FOREST", + "TYPE_PROVINCIAL_PARK", + "TYPE_PROVINCIAL_FOREST", + "TYPE_CAMPGROUNDS", + "TYPE_HIKING_AREA", + "TYPE_BUSINESS", + "TYPE_GOVERNMENT", + "TYPE_BORDER_CROSSING", + "TYPE_CITY_HALL", + "TYPE_COURTHOUSE", + "TYPE_EMBASSY", + "TYPE_LIBRARY", + "TYPE_SCHOOL", + "TYPE_UNIVERSITY", + "TYPE_EMERGENCY", + "TYPE_HOSPITAL", + "TYPE_PHARMACY", + "TYPE_POLICE", + "TYPE_FIRE", + "TYPE_DOCTOR", + "TYPE_DENTIST", + "TYPE_VETERINARIAN", + "TYPE_TRAVEL_SERVICE", + "TYPE_LODGING", + "TYPE_RESTAURANT", + "TYPE_GAS_STATION", + "TYPE_PARKING", + "TYPE_POST_OFFICE", + "TYPE_REST_AREA", + "TYPE_CASH_MACHINE", + "TYPE_CAR_RENTAL", + "TYPE_CAR_REPAIR", + "TYPE_SHOPPING", + "TYPE_GROCERY", + "TYPE_TOURIST_DESTINATION", + "TYPE_ECO_TOURIST_DESTINATION", + "TYPE_BIRD_WATCHING", + "TYPE_FISHING", + "TYPE_HUNTING", + "TYPE_NATURE_RESERVE", + "TYPE_TEMPLE", + "TYPE_CHURCH", + "TYPE_GURUDWARA", + "TYPE_HINDU_TEMPLE", + "TYPE_MOSQUE", + "TYPE_SYNAGOGUE", + "TYPE_STADIUM", + "TYPE_BAR", + "TYPE_MOVIE_RENTAL", + "TYPE_COFFEE", + "TYPE_GOLF", + "TYPE_BANK", + "TYPE_DOODLE", + "TYPE_GROUNDS", + "TYPE_AIRPORT_GROUNDS", + "TYPE_BUILDING_GROUNDS", + "TYPE_CEMETERY", + "TYPE_HOSPITAL_GROUNDS", + "TYPE_INDUSTRIAL", + "TYPE_MILITARY", + "TYPE_SHOPPING_CENTER", + "TYPE_SPORTS_COMPLEX", + "TYPE_UNIVERSITY_GROUNDS", + "TYPE_DEPRECATED_TARMAC", + "TYPE_ENCLOSED_TRAFFIC_AREA", + "TYPE_PARKING_LOT", + "TYPE_PARKING_GARAGE", + "TYPE_OFF_ROAD_AREA", + "TYPE_BORDER", + "TYPE_BUILDING", + "TYPE_GEOCODED_ADDRESS", + "TYPE_NATURAL_FEATURE", + "TYPE_TERRAIN", + "TYPE_SAND", + "TYPE_BEACH", + "TYPE_DUNE", + "TYPE_ROCKY", + "TYPE_ICE", + "TYPE_GLACIER", + "TYPE_BUILT_UP_AREA", + "TYPE_VEGETATION", + "TYPE_SHRUBBERY", + "TYPE_WOODS", + "TYPE_AGRICULTURAL", + "TYPE_GRASSLAND", + "TYPE_TUNDRA", + "TYPE_DESERT", + "TYPE_SALT_FLAT", + "TYPE_WATER", + "TYPE_OCEAN", + "TYPE_BAY", + "TYPE_BIGHT", + "TYPE_LAGOON", + "TYPE_SEA", + "TYPE_STRAIT", + "TYPE_INLET", + "TYPE_FJORD", + "TYPE_LAKE", + "TYPE_SEASONAL_LAKE", + "TYPE_RESERVOIR", + "TYPE_POND", + "TYPE_RIVER", + "TYPE_RAPIDS", + "TYPE_DISTRIBUTARY", + "TYPE_CONFLUENCE", + "TYPE_WATERFALL", + "TYPE_SPRING", + "TYPE_GEYSER", + "TYPE_HOT_SPRING", + "TYPE_SEASONAL_RIVER", + "TYPE_WADI", + "TYPE_ESTUARY", + "TYPE_WETLAND", + "TYPE_WATER_NAVIGATION", + "TYPE_FORD", + "TYPE_CANAL", + "TYPE_HARBOR", + "TYPE_CHANNEL", + "TYPE_REEF", + "TYPE_REEF_FLAT", + "TYPE_REEF_GROWTH", + "TYPE_REEF_EXTENT", + "TYPE_REEF_ROCK_SUBMERGED", + "TYPE_IRRIGATION", + "TYPE_DAM", + "TYPE_DRINKING_WATER", + "TYPE_CURRENT", + "TYPE_WATERING_HOLE", + "TYPE_TECTONIC", + "TYPE_WATERING_HOLE_DEPRECATED", + "TYPE_VOLCANO", + "TYPE_LAVA_FIELD", + "TYPE_FISSURE", + "TYPE_FAULT", + "TYPE_LAND_MASS", + "TYPE_CONTINENT", + "TYPE_ISLAND", + "TYPE_ATOLL", + "TYPE_OCEAN_ROCK_EXPOSED", + "TYPE_CAY", + "TYPE_PENINSULA", + "TYPE_ISTHMUS", + "TYPE_ELEVATED", + "TYPE_PEAK", + "TYPE_NUNATAK", + "TYPE_SPUR", + "TYPE_PASS", + "TYPE_PLATEAU", + "TYPE_RIDGE", + "TYPE_RAVINE", + "TYPE_CRATER", + "TYPE_KARST", + "TYPE_CLIFF", + "TYPE_VISTA", + "TYPE_DIGITAL_ELEVATION_MODEL", + "TYPE_UPLAND", + "TYPE_TERRACE", + "TYPE_SLOPE", + "TYPE_CONTOUR_LINE", + "TYPE_PAN", + "TYPE_UNSTABLE_HILLSIDE", + "TYPE_MOUNTAIN_RANGE", + "TYPE_UNDERSEA", + "TYPE_SUBMARINE_SEAMOUNT", + "TYPE_SUBMARINE_RIDGE", + "TYPE_SUBMARINE_GAP", + "TYPE_SUBMARINE_PLATEAU", + "TYPE_SUBMARINE_DEEP", + "TYPE_SUBMARINE_VALLEY", + "TYPE_SUBMARINE_BASIN", + "TYPE_SUBMARINE_SLOPE", + "TYPE_SUBMARINE_CLIFF", + "TYPE_SUBMARINE_PLAIN", + "TYPE_SUBMARINE_FRACTURE_ZONE", + "TYPE_CAVE", + "TYPE_ROCK", + "TYPE_ARCHIPELAGO", + "TYPE_POSTAL", + "TYPE_POSTAL_CODE", + "TYPE_POSTAL_CODE_PREFIX", + "TYPE_PREMISE", + "TYPE_SUB_PREMISE", + "TYPE_SUITE", + "TYPE_POST_TOWN", + "TYPE_POSTAL_ROUND", + "TYPE_META_FEATURE", + "TYPE_DATA_SOURCE", + "TYPE_LOCALE", + "TYPE_TIMEZONE", + "TYPE_BUSINESS_CHAIN", + "TYPE_PHONE_NUMBER_PREFIX", + "TYPE_PHONE_NUMBER_AREA_CODE", + "TYPE_BUSINESS_CORRIDOR", + "TYPE_ADDRESS_TEMPLATE", + "TYPE_TRANSIT_AGENCY", + "TYPE_FUTURE_GEOMETRY", + "TYPE_EVENT", + "TYPE_EARTHQUAKE", + "TYPE_HURRICANE", + "TYPE_WEATHER_CONDITION", + "TYPE_TRANSIENT", + "TYPE_ENTRANCE", + "TYPE_CARTOGRAPHIC", + "TYPE_HIGH_TENSION", + "TYPE_SKI_TRAIL", + "TYPE_SKI_LIFT", + "TYPE_SKI_BOUNDARY", + "TYPE_WATERSHED_BOUNDARY", + "TYPE_TARMAC", + "TYPE_WALL", + "TYPE_PICNIC_AREA", + "TYPE_PLAY_GROUND", + "TYPE_TRAIL_HEAD", + "TYPE_GOLF_TEEING_GROUND", + "TYPE_GOLF_PUTTING_GREEN", + "TYPE_GOLF_ROUGH", + "TYPE_GOLF_SAND_BUNKER", + "TYPE_GOLF_FAIRWAY", + "TYPE_GOLF_HOLE", + "TYPE_DEPRECATED_GOLF_SHOP", + "TYPE_CAMPING_SITE", + "TYPE_DESIGNATED_BARBECUE_PIT", + "TYPE_DESIGNATED_COOKING_AREA", + "TYPE_CAMPFIRE_PIT", + "TYPE_WATER_FOUNTAIN", + "TYPE_LITTER_RECEPTACLE", + "TYPE_LOCKER_AREA", + "TYPE_ANIMAL_ENCLOSURE", + "TYPE_CARTOGRAPHIC_LINE", + "TYPE_ESTABLISHMENT", + "TYPE_ESTABLISHMENT_GROUNDS", + "TYPE_ESTABLISHMENT_BUILDING", + "TYPE_ESTABLISHMENT_POI", + "TYPE_ESTABLISHMENT_SERVICE", + "TYPE_CELESTIAL", + "TYPE_ROAD_MONITOR", + "TYPE_PUBLIC_SPACES_AND_MONUMENTS", + "TYPE_STATUE", + "TYPE_TOWN_SQUARE", + "TYPE_LEVEL", + "TYPE_COMPOUND", + "TYPE_COMPOUND_GROUNDS", + "TYPE_COMPOUND_BUILDING", + "TYPE_COMPOUND_SECTION", + "TYPE_TERMINAL_POINT", + "TYPE_REGULATED_AREA", + "TYPE_LOGICAL_BORDER", + "TYPE_DO_NOT_USE_RESERVED_TO_CATCH_GENERATED_FILES", + "TYPE_UNKNOWN" + ], + "enumDeprecated": [ + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false + ], + "enumDescriptions": [ + "ABSTRACT", + "ABSTRACT", + "A route is any section of road (or rails, etc.) that has a name. This includes city streets as well as highways. Road segments can belong to multiple routes (e.g. El Camino, CA-82).", + "DEPRECATED", + "ABSTRACT", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "A designated bicycle route, whose segments may consist of any combination of bicycle paths, bicycle lanes, or city streets.", + "A designated trail, which may consist of paved walkways, dirt paths, fire road, streets or highways, etc.", + "ABSTRACT", + "", + "Railroads use several different incompatible track types.", + "", + "", + "", + "", + "", + "", + "", + "", + "Tracks for streetcars, cable-cars, etc. Ferries are services that are part of the road network but are not roads. They typically involve fares and scheduled departure times.", + "ABSTRACT", + "The vast majority of ferries are ferry boats.", + "Also called a \"car transport\", a ferry train is a rail service that carries passengers and their vehicles across undrivable terrain. The Channel Tunnel (\"Chunnel\") is the most famous example, but they are also common in the Alps where they connect neighboring valleys otherwise separated by impassable mountains.", + "Any plausible 1-dimensional path through a 2+ dimensional space, for the purposes of making graph-search-based routing possible. Such segments can be used to model paths through parking lots, squares, floors of buildings and other areas.", + "An intersection consists of a collection of segments that terminate at the same location. This is topological definition: it may not match what a typical user would think of as an \"intersection\". See TYPE_INTERSECTION_GROUP, below, for more information. Each segment terminating at an intersection has an \"endpoint type\" that specifies how that segment is terminated: stop sign, yield sign, three-way light, etc.", + "ABSTRACT", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "A transit line is a collection of transit legs, associated with some invariant properties of the trips that run over the legs. See also transitline.proto", + "TYPE_TRANSIT_AGENCY was moved to 0xC91. This deprecated enum value still exists for debugging purposes only.", + "DEPRECATED", + "ABSTRACT", + "Road sign features have names, point geometry, etc. They also have segment_path data (see below) which lists the segments that refer to the sign. See segment.proto for the reference from the segment to the road sign.", + "Our TYPE_INTERSECTION feature, above, models the point where one or more segments terminate. This is topological definition: it may not match what a typical user would think of as an \"intersection\". Consider the intersections where Hayes, Market, Larkin, and 9th Street meet near (37.77765, -122.41638) in San Francisco. Most people would probably consider this a single feature, even though we model it as four separate TYPE_INTERSECTION features. This TYPE_INTERSECTION_GROUP is used to model the user's concept of a complex intersection.", + "RESERVED", + "A restriction group describes a set of segment restrictions that belong together and have a name or an associated event. See also restriction_group.proto", + "A toll cluster is either a single point on a segment (represented as a point at the end of the segment that has ENDPOINT_TOLL_BOOTH set) or a group of points on various road segments in MapFacts that represents one or more lanes passing through a toll fixture that all go to the same routing destination. Each toll cluster should have at most a single price per payment method. E.g. {CASH = $5, PASS = $1}. Note: If a toll fixture has different prices for multiple routing destinations, drivers need to be in the correct lane before passing through the toll fixture and hence such a fixture is represented by multiple toll clusters. A toll cluster does not necessarily represent a real-world entity, e.g. a particular plaza/structure as perceived by humans. This is because a plaza can be represented by more than one toll cluster. We require toll clusters to have names, but they might be non-unique. For example, a plaza might be represented by multiple toll clusters that may have the same plaza name. For further details, please see go/toll-cluster-schema.", + "ABSTRACT", + "", + "ABSTRACT", + "", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "", + "DEPRECATED", + "DEPRECATED", + "", + "", + "", + "", + "", + "", + "", + "e.g. Silicon Valley", + "A reservation is a region collectively held or governed by indigenous people and officially recognized by the country’s government at the federal or state level. A reservation may be fully contained within an administrative feature or partially contained within two or more. These regions are referred to by different categorical names depending on country and even by state, including but not limited to: “Indian Reservations”, “Indian Reserves”, “Land Claim Settlement Lands”, “Indian Lands”, “Treaty Lands”, “Indigenous Territories”, etc. A reservation is not a historic indigenous territory boundary or a region which has applied for land rights but has not yet received official recognition.", + "", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "An entity widely considered to be a city, that may itself be made up of smaller political entities, some of which are cities/towns/villages themselves. For example, the colloquial view of Sydney, Australia actually comprises many smaller cities, but is regarded as a city itself. This type is not suitable for modeling official metro-/micropolitan or other statistical areas.", + "ABSTRACT", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "", + "", + "", + "", + "", + "", + "", + "Designated Market Areas (or DMAs) are used by marketing and ratings companies (such as the Nielsen Media Research company) to describe geographical regions (such as the greater New York metropolitan area) that are covered by a set of television stations. (See http://www.schooldata.com/pdfs/DMA.pdf) In the United States, DMAs should have a DMA numeric ID name, tagged with the FLAG_DESIGNATED_MARKET_AREA_ID flag.", + "", + "", + "Eventually we'll have more data for disputed areas (e.g., who makes claims on the area, who has de facto control, etc.). For the moment, we just define a type so we can simply mark areas as disputed.", + "Boundaries representing the jurisdiction of a particular police station.", + "An area used for aggregating statistical data, eg, a census region. Note that TYPE_STATISTICAL_AREA has a third nibble so we can add an abstract parent above it later if need be at 0x2E1 (and rename TYPE_STATISTICAL_AREA as TYPE_STATISTICAL_AREA1).", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "A line representing the boundary between two features. See border.proto for details.", + "DEPRECATED", + "An association of a point with an address, with no other information.", + "ABSTRACT", + "Expanses of land that share common surface attributes. These areas would look more or less uniform from a high altitude.", + "", + "", + "", + "", + "", + "", + "Terrain that looks populated.", + "Terrain that is covered in vegetation.", + "", + "", + "", + "", + "", + "", + "A flat expanse of salt left by the evaporation of a body of salt water.", + "Features can be TYPE_WATER if we don't have enough information to properly type the body of water. TYPE_WATER is also used as the type for child features that compose a TYPE_RIVER feature.", + "One of the large salt-water bodies that covers most of the globe.", + "An ocean subdivision formed by a coastal indentation. Includes coves and gulfs.", + "An open body of water formed by a slight coastal indentation.", + "", + "An ocean subdivision more or less confined by land and islands.", + "A long narrow ocean subdivision. Includes sounds.", + "", + "", + "An inland body of standing water.", + "A lake that dries up part of the year.", + "An artificial body of water, possibly created by a dam, often used for irrigation or house use.", + "", + "An inland body of moving water, or parts associated with it in which there is little or no current (backwater).", + "", + "A branch which flows away from the main river. Includes deltas.", + "A place where two or more rivers join.", + "", + "A place where ground water flows naturally out of the ground.", + "", + "", + "A river that dries up part of the year.", + "A dry riverbed that occasionally receives flashfloods.", + "A place at the end of a river where fresh and salt water mix. Includes tidal creeks and limans.", + "Land that is usually flooded. Includes bogs, marshes, flats, moors, and swamps.", + "", + "A shallow place where water may be waded through.", + "A narrow passage used by boats. Normally artificial.", + "A deep place near a shore where ships commonly drop anchor.", + "A deep part in a body of water that is suitable for navigation. Includes narrows.", + "Rocks, coral, sandbars, or other features beneath the surface of the water that pose a hazard to passing ships. Includes shoals.", + "A relatively shallow zone of the back reef located closest to the shore, that may be exposed at low tide.", + "A small section of rocks, coral, sandbars, or other features beneath the surface of the water that forms part of a reef.", + "The full extent of the reef complex.", + "A submerged rock in the water.", + "Man-made (and sometimes natural) channels used to move water. This type was used for both dam structures and water that is hold back by dams. We should use TYPE_COMPOUND_BUILDING for dam structures and TYPE_RESERVOIR for water.", + "DEPRECATED", + "", + "Includes overfalls.", + "A natural depression filled with water where animals come to drink.", + "ABSTRACT This type is incorrectly under TYPE_TECTONIC instead of TYPE_WATER. This was a mistake and is now fixed. See TYPE_WATERING_HOLE for the replacement.", + "DEPRECATED", + "", + "", + "", + "", + "", + "", + "", + "", + "An exposed rock in the water.", + "A small, low-elevation, sandy island formed on the surface of coral reefs", + "A stretch of land projecting into water. Includes capes and spits.", + "A strip of land connecting two larger land masses, such as continents.", + "Features that are notable for being high (or low), or for having sudden changes in elevation. These features might have an \"elevation\" extension to specify the actual elevation. See ElevationProto for more information.", + "Elevations that have a distinctive peak.", + "A peak or ridge of a mountain that extends through a glacier.", + "A subsidiary peak of a mountain.", + "A route over an otherwise difficult to traverse feature. Includes saddle.", + "Elevations that are flat on top. Includes mesas and buttes.", + "A ridge is a geographical feature consisting of a chain of mountains or hills that form a continuous elevated crest with a single ridgeline for some distance.", + "Steep declines usually carved by erosion. Includes valleys, canyons, ditches, and gorges.", + "Depressions causes by impact, explosion, and sometimes sink-holes.", + "Topography formed on limestone and gypsum by dissolution with sinkholes, caves, etc.", + "A vertical or nearly vertical slope. Includes escarpments.", + "An elevated place that is notable for having a good view. Raster digital elevation data. This is not a type to be used by providers or consumed by clients.", + "RESERVED", + "Land along streams higher than the alluvial plain or stream terrace.", + "", + "Land not so steep as a cliff, but changing elevation. Includes slides.", + "All the points on the polygon are at the same elevation.", + "A near-level shallow, natural depression or basin, usually containing an intermittent lake, pond, or pool.", + "", + "A series of mountains or hills ranged in a line and connected by high ground. Mountain ranges usually consist of many smaller ridges. For example, the Himalayas, the Andes. the Alps, etc.", + "Features that are notable for being high (or low), or for having sudden changes in elevation. These features might have an \"elevation\" extension to specify the actual elevation. See ElevationProto for more information.", + "includes peaks, ranges, and spurs", + "", + "includes saddles", + "", + "", + "includes trenches and troughs", + "", + "", + "", + "", + "", + "Don't use 0xA7. Use 8 bits for additional types under TYPE_NATURAL_FEATURE, so we don't run out of space. The following are miscellaneous natural features that don't fit any of the categories above.", + "", + "A feature representing a group or chain of islands. ", + "ABSTRACT", + "This is the type for postal codes which are complete and independent enough that there should be a feature for them (e.g. US 5-digit ZIP codes). For even more detailed suffixes that further subdivide a postal code (such as the +4 component in US ZIP codes), store the information in a TYPE_POSTAL_CODE_SUFFIX address component. When a range or set of postal codes share the same geographical area, e.g. because a precise subdivision does not exist or this subdivision is unknown, this type is used for each individual postal code.", + "A prefix portion of a postal code which does not meet the requirements for TYPE_POSTAL_CODE, but which is useful to search for, for example UK outcodes.", + "DEPRECATED", + "DEPRECATED This is deprecated and we want to use TYPE_COMPOUND_SECTION instead.", + "DEPRECATED", + "The term \"post town\" is used for a locality-like-entity that is only used for postal addresses.", + "DEPRECATED", + "ABSTRACT", + "Every data source used in constructing a data repository has a corresponding feature that provides more information about that data source. The extra information is stored in the optional data_source field below.", + "A locale feature provides region specific conventions such as preferred language and formatting details for time, date, and currency values. Locales aren't necessary defined by physical geographic features, so they are classified as meta-features.", + "A timezone feature is used to specify the region covering an international timezone. When a point is covered by multiple timezone features, the most specific one can be used to compute the local time at this point. Most specific implies a much smaller region or the one that is closer to the center. A feature's timezone can be specified in the repeated related_timezone field.", + "A business chain feature is used to represent a chain, e.g. Starbucks, McDonald's, etc. Other features representing specific stores/franchises of this chain may refer to one such feature via RELATION_MEMBER_OF_CHAIN. This is not strictly reserved to commercial chains but can also be used to model organizations such as the Red Cross or the United Nations.", + "A phone number prefix feature is used to specify the region where phone numbers (typically fixed-line numbers) must begin with a certain prefix. Any phone number prefix down to any level of granularity could be represented by this type.", + "A phone number area code is a prefix which also coincides with the area code, or national destination code, of a particular region.", + "A Business Corridor is a dense cluster of semantically similar establishments. TYPE_BUSINESS_CORRIDOR features are distinguished from TYPE_COLLOQUIAL_AREA features because the corridors are not under the political hierarchy, are allowed to be nameless, and may not correspond to well-known real world locations. For more details, see go/geo-corridors-schema.", + "An address template feature provides region-specific conventions for structuring addresses. These features aren't necessarily defined by physical geographic features, so they are classified as meta-features.", + "A transit agency operates a number of lines, typically all in the same city, region or country. See also transitagency.proto", + "A feature whose geometry is planned to replace the geometry on another feature.", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "DEPRECATED", + "RESERVED", + "A portal of entry or exit to another feature. Examples: - Subway station entrance. - Parking lot entrance.", + "Cartographic features are used to capture real-world objects for which there is no current desire to model any specific attributes. These are only useful to make the map tiles look pretty.", + "DEPRECATED", + "Also see skitrail.proto", + "Also see skilift.proto", + "Also see skiboundary.proto", + "", + "Starting with TYPE_TARMAC, we use longer IDs, so that we can expand the number of feature types under TYPE_CARTOGRAPHIC.", + "Use TYPE_COMPOUND_GROUND and appropriate gcids for the next two.", + "DEPRECATED", + "DEPRECATED", + "", + "Sub-types within a golf course.", + "", + "", + "", + "", + "Use TYPE_ESTABLISHMENT_POI and gcid:golf_shop for golf shops instead.", + "DEPRECATED", + "DEPRECATED", + "", + "", + "", + "", + "", + "", + "Subtype within a zoo - a cage or fenced-off or otherwise delineated area containing animals.", + "A line for a cartographic detail. For example the international date line. Such features should have polyline geometry.", + "ABSTRACT This type is being replaced by TYPE_COMPOUND_GROUNDS. For further details, see go/compounds-v2", + "DEPRECATED This type has been replaced by TYPE_COMPOUND_BUILDING. For further details, see go/oyster-compounds", + "DEPRECATED", + "An establishment which has a address (a.k.a. location or storefront). Note that it *may* also have a service area (e.g. a restaurant that offers both dine-in and delivery). This type of business is also known as a \"hybrid\" Service Area Business. Establishment POIs can be referenced by TYPE_COMPOUND features using the RELATION_PRIMARILY_OCCUPIED_BY. This is the reciprocal relation of the RELATION_OCCUPIES.", + "A business without a storefront, e.g. a plumber. It would normally not have a place that a customer could visit to receive service, but it would have an area served by the business. Also known as a \"pure\" Service Area Business. NOTE(tcain): Using value 0xD441, since we could find ourselves with a need to differentiate service areas from online-only at this level in the future, but still benefit from being able to group those under a common parent, disjoint from TYPE_ESTABLISHMENT_POI.", + "The root of types of features that are in the sky, rather than on the earth. There will eventually be a hierarchy of types here.", + "Features responsible for monitoring traffic on roads (usually for speed). Includes cameras at particular points as well as monitors that cover larger spans. Features of this type should have a corresponding gcid that specifies the correct subtype (e.g. gcid:road_camera or gcid:speed_camera_zone). This type was originally named as TYPE_ROAD_CAMERA.", + "ABSTRACT", + "Note that this type does not distinguish the nature of the statue (religious, historical, memorial, tourist, ...).", + "Open space used for events, gathering, or as market-place.", + "A feature used to represent a logical level, e.g. floor.", + "ABSTRACT", + "e.g. campus, compound, parcel.", + "e.g. single family dwelling, office building.", + "e.g. suite, room, hallway, cubicle.", + "A terminal point represents a good location for a user to meet a taxi, ridesharing vehicle, or general driver.", + "An area controlled in some way by an authoritative source, such as a government-designated COVID containment zone or an area under government sanctions. Features of this type should have one or more gcids corresponding to their specific regulation, and client handling of these features may vary based on the type of regulation.", + "A grouping of TYPE_BORDER features (\"border segments\"), which together represent a border between two features of the same type.", + "DEPRECATED", + "A feature of completely unknown type. This should only be used when absolutely necessary. One example in which this type is useful is in the Chinese importer, which must heuristically segment addresses into components - it often does not know what types to make those components. Please note that the Oyster address formatter does not currently support address components of TYPE_UNKNOWN well." + ], + "type": "string" + }, "mediaEntitySignals": { "$ref": "KnowledgeAnswersIntentQueryMediaEntitySignals", "description": "Signals about the media entity for this argument." @@ -71865,7 +73169,7 @@ "type": "object" }, "KnowledgeAnswersIntentQueryFunctionCallSignals": { - "description": "Next ID: 37", + "description": "Next ID: 38", "id": "KnowledgeAnswersIntentQueryFunctionCallSignals", "properties": { "argumentComposingMid": { @@ -71983,6 +73287,10 @@ "description": "Whether the interpretation was generated from the neural categorical parser.", "type": "boolean" }, + "isRefinedMeaning": { + "description": "Whether the FunctionCall is created as a refined_meaning in resolution. Downstream code will look at this field to see if it needs to create a new refined QueryInterpretation.", + "type": "boolean" + }, "isUiCompositionIntent": { "description": "Denotes this is a sub-intent used for composing an Assistant UI response. The assistant dialog should output ui_composition_shelf in the SystemResponse if it can fulfill the intent. More info in go/davinci-design and go/davinci-di-fulfillment", "type": "boolean" @@ -73086,6 +74394,10 @@ "description": "A MeasurementType configures a value that consists of a measurement. The expected value should have a number and a mid representing the unit. Note: this is currently only used for attribute answer value types. Configuration intent slot as measurement is yet to be supported (or instead we should universally use SemanticType).", "id": "KnowledgeAnswersMeasurementType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -73097,6 +74409,10 @@ "description": "A NormalizedStringType configures a value that is one of the listed normalized_values. An arbitrary mapping from input strings to normalized_values can be specified in the local intent config. Only alphabetical strings can be used as normalized_values. This type should NOT be used for: - Mids, ids, dates, or other structured data. Use an annotator instead, and address any quality issues at the annotator level. - Simplifying grammar rules. If you are not using the normalized_values in your question semantics, you should remove the slot. Use additional query_examples instead.", "id": "KnowledgeAnswersNormalizedStringType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "normalizedValue": { "items": { "type": "string" @@ -73114,6 +74430,10 @@ "description": "A NumberType configures a value whose type is intended to be numeric.", "id": "KnowledgeAnswersNumberType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "keepAsString": { "description": "If true, the semantics of the NumberType argument are retained as a string, rather than being converted to a float-type object. This option is particularly useful in cases where leading 0s in the user input are meaningful, e.g. for zip codes or sports jersey numbers. For the user- specified value \"01\", for instance, the PathQuery semantics will be: def $Slot \"01\"", "type": "boolean" @@ -73213,7 +74533,6 @@ "type": "object" }, "KnowledgeAnswersOpaqueLocationType": { - "description": "A LocationType configures a value whose type is a Location message, for example, the output of the Location subgrammar. Note that this location type is not the same as a \"location entity\" (an entity with a location indicating type/collection, which is annotated by QRef). The scope of a LocationType is usually broader than a location entity, it may represent - businesses, places, and POIs (location entities from QRef) - addresses (\"123 Main St., New York, NY\") or even just coordinates (latitude, longitude) - business categories (e.g., \"pharmacies\" or \"gas stations\") - SAFT locations - aliases (including \"home\" and \"work\") - contacts - combinations of a location with modifiers and constraints (e.g., \"chinese restaurant near me\" or \"cheap kid-friendly hotels\") - ungrounded locations produced by ungrounded_location model See go/location-type for the details of the location proto output by location subgrammar.", "id": "KnowledgeAnswersOpaqueLocationType", "properties": {}, "type": "object" @@ -73300,7 +74619,7 @@ "type": "object" }, "KnowledgeAnswersOpaqueType": { - "description": "Note: OpaqueType is deprecated and addition of new fields is not allowed. Refer to go/opaque_type for details. If you think this is the only way to implement your feature, attend an office hours (go/meaning-help) and discuss with the MRF team. An OpaqueType configures a value whose type is only interpretable by _specific_ clients of the intent catalog. This means horizontal 'features' like pretty printing, correct logging, intent blacklisting and signal aggregation will not work for opaque value types. It has a field for each type in IntentQuery that is not covered by a non-opaque type (specifically: protocol messages). The fields are themselves messages declared in this file. The specific opaque value types must be empty messages. If you find a need to add any fields to these messages, make them non-opaque and implement all of the code to treat them as first class types. It is allowable for a value to have more than one of the opaque types. See http://go/opaque-type-for-value-type. LINT.IfChange Next Id: 31", + "description": "Note: OpaqueType is deprecated and addition of new fields is not allowed. Refer to go/opaque_type for details. If you think this is the only way to implement your feature, attend an office hours (go/meaning-help) and discuss with the MRF team. An OpaqueType configures a value whose type is only interpretable by _specific_ clients of the intent catalog. This means horizontal 'features' like pretty printing, correct logging, intent blacklisting and signal aggregation will not work for opaque value types. It has a field for each type in IntentQuery that is not covered by a non-opaque type (specifically: protocol messages). The fields are themselves messages declared in this file. The specific opaque value types must be empty messages. If you find a need to add any fields to these messages, make them non-opaque and implement all of the code to treat them as first class types. It is allowable for a value to have more than one of the opaque types. See http://go/opaque-type-for-value-type. LINT.IfChange Next Id: 32", "id": "KnowledgeAnswersOpaqueType", "properties": { "aogType": { @@ -73327,6 +74646,10 @@ "componentReferenceType": { "$ref": "KnowledgeAnswersOpaqueComponentReferenceIndexType" }, + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "deviceIdType": { "$ref": "KnowledgeAnswersOpaqueDeviceIdType" }, @@ -73401,6 +74724,10 @@ "description": "Plexity is a conceptual distinction between viewing something (a slot filler, for example) as a single individual, or as a complex concept consisting of multiple individuals or subparts. Note that plexity is not the same as (or correlated with) either grammatical number or with distributive and collective interpretations of the slot. The PlexityRequirement proto and Plexity enum are defined outside ValueType as we may move the plexity specification to a different place in the intent protos in future.", "id": "KnowledgeAnswersPlexityRequirement", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -73428,6 +74755,10 @@ "description": "A special type representing a polar question.", "id": "KnowledgeAnswersPolarQuestionType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -73479,6 +74810,10 @@ "description": "If true, is compatible with a schema whose answer_type is any semantic_type including empty (since by default schemas return themselves as semantic_types (b/211438997). This is used primarily for slot composition. Example: for the slot name: Operand type { semantic_type { allow_all: true } entity_type {} } * An entity_type or a schema with answer_type 'entity_type' can fill Operand. * A schema with either (a) no answer_type or (b) answer_type with !semantic_type.names().empty() can fill Operand * A schema with answer_type 'date' CAN NOT fill Operand. Note that when there is an explicit answer_type, the 'self' semantic_type is not considered.", "type": "boolean" }, + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "includesContainingIntent": { "description": "Determines whether or not the meaning schema that contains this semantic_type conforms to a function call with the name and arguments taken from the meaning schema. As it refers to the \"containing_intent\", this field should only be set in a semantic_type declared in an intent's type_members field. The behavior of this field is undefined in other cases, for example, declaring the type of an intent slot. On Assistant, we use meaning schemas for argument types to represent both function call values as well as a reusable tool to host other argument values (opaque types, normalized strings, subsets of entities) across intents. Teams need this information to run conformance checks and annotate new data. Example: If the intents below are in the intent catalog, then: - Intent(slot=\"some string\") is conformant, because Type has string_type{} in its type_members. - Intent(slot=Type()) is not conformant, because Type has set semantic_type.includes_containing_intent to false. - Intent(slot=SubType()) is conformant, because type_members is not inherited. { id: \"Intent\" slot: { name: \"slot\" type: { semantic_type { name: \"Type\" }} } } { id: \"Type\" type_members { string_type{} semantic_type { includes_containing_intent: false } } } { id: \"SubType\" parent { id: \"Type\" relationship_type: SUBTYPE } }", "type": "boolean" @@ -73490,6 +74825,13 @@ }, "type": "array" }, + "nameContracts": { + "description": "Like `name_remodelings`, but for ComponentSpecificContracts instead of remodelings.", + "items": { + "$ref": "NlpMeaningSemanticTypeNameComponentSpecificContracts" + }, + "type": "array" + }, "nameRemodelings": { "description": "Contains data about current schema remodelings at the SemanticType name level. The \"name\" field contains all possible semantic type names and \"semantic_type_name_remodelings\" acts as an overlay to determine which ones to surface based on which schema remodeling IDs are requested. For more information see go/meaning-remodeling-framework.", "items": { @@ -73499,7 +74841,7 @@ }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", - "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." + "description": "Contains data about current schema remodelings at this ValueType lev©el. For more information see go/meaning-remodeling-framework." } }, "type": "object" @@ -73898,6 +75240,10 @@ "description": "A special type representing a StateOfAffairs. Currently (as of 2021Q2) this is duplicative with semantic_type { name: \"StateOfAffairs\" } but we (mrf-team) will encourage clients to migrate to this new type.", "id": "KnowledgeAnswersStateOfAffairsType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -73909,6 +75255,10 @@ "description": "A StringType configures a value whose type is intended to be arbitrary text.", "id": "KnowledgeAnswersStringType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -73924,6 +75274,10 @@ "description": "A TimeZoneType configures a value whose type is a timezone.", "id": "KnowledgeAnswersTimeZoneType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -73935,6 +75289,10 @@ "description": "A TrackingNumberType configures a value whose type is a TrackingNumber.", "id": "KnowledgeAnswersTrackingNumberType", "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts", + "description": "Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance." + }, "remodelings": { "$ref": "NlpMeaningMeaningRemodelings", "description": "Contains data about current schema remodelings at this ValueType level. For more information see go/meaning-remodeling-framework." @@ -77033,6 +78391,27 @@ }, "type": "object" }, + "NlpMeaningComponentSpecificContracts": { + "description": "A Component-Specific Contract is a proto message that can be placed on various elements of the MeaningCatalog (intent schemas, slots, types) that signals whether that element is part of the contract for a given component. go/contract-based-conformance", + "id": "NlpMeaningComponentSpecificContracts", + "properties": { + "componentSpecificContracts": { + "items": { + "enum": [ + "UNSPECIFIED", + "P2_LWA" + ], + "enumDescriptions": [ + "The unspecified contract is synonymous with LWA.", + "" + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "NlpMeaningMeaningRemodeling": { "id": "NlpMeaningMeaningRemodeling", "properties": { @@ -77075,6 +78454,20 @@ }, "type": "object" }, + "NlpMeaningSemanticTypeNameComponentSpecificContracts": { + "description": "Component-Specific Contract for SemanticTypes, which are atomic string values (and thus can't have a ComponentSpecificContracts message attached to them). go/contract-based-conformance", + "id": "NlpMeaningSemanticTypeNameComponentSpecificContracts", + "properties": { + "componentSpecificContracts": { + "$ref": "NlpMeaningComponentSpecificContracts" + }, + "name": { + "description": "Semantic type name.", + "type": "string" + } + }, + "type": "object" + }, "NlpMeaningSemanticTypeNameMeaningRemodelings": { "description": "Associates remodeling data with a semantic type name.", "id": "NlpMeaningSemanticTypeNameMeaningRemodelings", @@ -89146,6 +90539,8 @@ "TWENTYPERCENT_JOBPOSTINGS", "ENGAGEMENTS", "CLOUDCONNECT", + "PERSONAL_AGENT", + "MOBILE_HARNESS", "DEPRECATED_QUICKSTART_FLUME", "DUO_CLIENT", "ALBERT", @@ -89480,47 +90875,146 @@ false, false, false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - true, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + true, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, false, false, false, @@ -89627,47 +91121,7 @@ false, false, false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, + true, true, false, false, @@ -89726,63 +91180,6 @@ false, false, false, - true, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false, false, @@ -90444,6 +91841,8 @@ "Twentypercent Jobpostings Team contact: 20p-wg@google.com", "Engagements Team contact: engagements-eng@google.com", "Cloudconnect Team contact: rev-platforms@google.com", + "Personal Agent Team contact: page-1-eng@google.com", + "Mobile Harness Team contact: omnilab-lmp@google.com", "", "Duo Client Team contact: duo-eng@google.com", "Project albert (go/albert-frontend) Team contact: albert-eng@google.com", @@ -90634,7 +92033,7 @@ "Pumice Team contact: pumice-team@google.com", "Backlight Team contact: jsuite-eng@google.com", "Glossary Manager Team contact: tm-team-core@google.com", - "Google Growth - UpgradeParty go/upgradeparty Team contact: google-growth-eng@google.com", + "Google Growth - UpgradeParty go/upgradeparty Team contact: google-growth-android-eng@google.com", "Onedev Workflow Team contact: one-developer-workflow+people-stack@google.com", "Avalanche Team contact: cpe-surveys-eng@google.com", "Kormo Team contact: kormo-eng@google.com", @@ -92520,6 +93919,10 @@ "$ref": "GeostorePointProto", "description": "lat/lng the icon is to be shown at." }, + "ptoken": { + "$ref": "PtokenPToken", + "description": "Encapsulates the privacy policy relevant signals for this event. See go/kansas-embedded-ptokens for additional details. Keep the type fully qualified in case (when) we decide to make proto compiler enforce '.ptoken.PToken' as the only allowed type for the field number 9099. Hence, don't remove the leading '.'. See go/protobuf-ptoken-field for details around the 9099 field number." + }, "stickerId": { "description": "The id of the sticker asset chosen by the user to replace the default asset for the alias.", "format": "uint32", @@ -92700,6 +94103,10 @@ "description": "Indicates that this image can be processed as an Adobe HDR (FlexDR) image by reading the MPF segments.", "type": "boolean" }, + "appleHdr": { + "description": "Indicates that this image can be processed as an Apple HDR image by reading the MPF segments (if JPEG) or HEIF segments (if HEIC).", + "type": "boolean" + }, "googleHdr": { "description": "Indicates that this image can be processed as a go/ghdr (UltraHDR) image by reading the GContainer in the primary XMP block.", "type": "boolean" @@ -95601,6 +97008,7 @@ "TRAIN_STATUS", "TRAIN_DELAY", "TRAIN_PLATFORM", + "NOTES_AND_LISTS_POST_MIGRATION", "UNIT_TESTING" ], "enumDeprecated": [ @@ -96021,6 +97429,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -96441,6 +97850,7 @@ "Notifications for Train Journeys go/proactive-assistant-india-mvp", "", "", + "Notifications for Notes and Lists", "NOTE: This should always stay at the bottom of the list." ], "type": "string" @@ -98427,7 +99837,7 @@ "type": "object" }, "QualityNsrNsrData": { - "description": "NOTE: When adding a new field to be propagated to Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 53", + "description": "NOTE: When adding a new field to be propagated to Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 54", "id": "QualityNsrNsrData", "properties": { "articleScore": { @@ -98448,6 +99858,11 @@ "format": "float", "type": "number" }, + "chromeInTotal": { + "description": "Site-level Chrome views.", + "format": "float", + "type": "number" + }, "clusterId": { "description": "An id for defining clusters of sites. Used in ecosystem experiments (project Tundra).", "format": "int32", @@ -99081,7 +100496,7 @@ true, true, true, - false, + true, true, false, false, @@ -99576,7 +100991,7 @@ true, true, true, - false, + true, true, false, false, @@ -100077,7 +101492,7 @@ true, true, true, - false, + true, true, false, false, @@ -105900,11 +107315,6 @@ "format": "float", "type": "number" }, - "geoTopicNormalizedScore": { - "description": "If the annotation corresponds to a geo topic, this is populated with GeoTopic::normalized_score.", - "format": "float", - "type": "number" - }, "isAuthor": { "description": "True if the entity is the author of the document. This was mainly developed and tuned for news articles (e.g. /m/02x27qn on \"www.vogue.com/article/flint-town-netflix\") but is also popluated for other content (e.g. scientific articles). Important: the semantics of this field may change in the future or it might be removed and replaced with a different API. If you want to use this field, please reach out to ke-authors@ first.", "type": "boolean" @@ -105917,11 +107327,6 @@ "description": "Set to true iff the entity matches the full URL of the document, meaning that it is a reference page or related page of the entity.", "type": "boolean" }, - "localEntityLocationConfidence": { - "description": "If the annotation corresponds to a local entity, this is populated with LocalEntityAnnotations::Instance::location_confidence.", - "format": "float", - "type": "number" - }, "normalizedTopicality": { "description": "Representation of the topicality score that is normalized in [0, 1] and which sum over all entities in the document is 1. It represents the \"proportion\" of the document that talks about the entity. This score is less human interpretable as the bucketized topicality score (EntityAnnotations.topicality_score), but is more suited for some usages like aggregations.", "format": "float", @@ -107136,7 +108541,7 @@ }, "productMetadata": { "$ref": "RepositoryWebrefProductMetadata", - "description": "Products-specific entity metadata." + "description": "Products-specific entity metadata. Only available in QrefMetadata output." }, "specialEntityType": { "description": "# LINT.ThenChange( //depot/google3/repository/webref/evaluation/query/metrics/util.cc)", @@ -107966,6 +109371,7 @@ "DEFINITE", "INDEFINITE", "FEMININE_DETERMINER", + "FEMININE_ADJECTIVE", "ABLATIVE", "ADESSIVE", "ALLATIVE", @@ -108067,6 +109473,7 @@ "Articles or markers that express the definitess of a noun (see go/wordgraph/definiteness).", "Articles or markers that express the indefiniteness of a noun (see go/wordgraph/definiteness).", "Determiners that mark *unambiguously* the feminine gender of the expression (e.g.: \"*une* artiste\")", + "Adjective that mark *unambiguously* the feminine gender of the expression they modify. E.g.: \"les *meilleures* artistes\"", "Linguistic markers that express the movement from a place (like the English preposition *from* in a sentence like \"I came *from* my place\").", "Linguistic markers that express the location *near* a place (like in the English preposition *near* in a sentence like \"I am near the house\").", "Linguistic markers that express the movement towards a place (like the English preposition *to* in a sentence like \"I go *to* my house\").", @@ -109788,7 +111195,7 @@ "type": "object" }, "RepositoryWebrefProductMetadata": { - "description": "Products-specific information about the entity. Next available tag: 16.", + "description": "Products-specific information about the entity. Only available in QrefMetadata output. Next available tag: 16.", "id": "RepositoryWebrefProductMetadata", "properties": { "productLineId": { @@ -109803,27 +111210,6 @@ "$ref": "KnowledgeAnswersIntentQueryShoppingIds", "description": "All ShoppingIds for this MID that need to be copied to IntentQuery (FunctionCall) if this MID is used in intent generation. See go/iql-shopping-ids for details." }, - "type": { - "enum": [ - "CATALOG_ENTRY", - "VARIANT_CLUSTER", - "OTHER", - "PRODUCT_LINE", - "BRAND", - "CATEGORY", - "NOT_PRODUCT" - ], - "enumDescriptions": [ - "It's an entity that maps to a single product catalog entry.", - "It's an entity that maps to a product variant cluster.", - "Higher level product entities.", - "A product line entity that includes more than one similar product from the same brand.", - "The entity is a product brand.", - "The entity is a category of products.", - "The entity does not have a known product type. This is equivalent to not having the type field set." - ], - "type": "string" - }, "variantClusterId": { "description": "All unique variant cluster ids (shopping's GPCs) of this entity.", "items": { @@ -110067,25 +111453,6 @@ "format": "float", "type": "number" }, - "firstScore": { - "description": "The raw topicality score of the primary entity.", - "format": "float", - "type": "number" - }, - "hasSpecialLinks": { - "description": "Whether the primary entity has any \"special\" links. Currently a link is considered special if it has a good implication probability and has no negative disambiguation probability.", - "type": "boolean" - }, - "medianMentionScore": { - "description": "The median mentions core of the primary entity.", - "format": "float", - "type": "number" - }, - "navboostCoverage": { - "description": "The navboost token coverage ratio. All queries are taken into account.", - "format": "float", - "type": "number" - }, "referencePageScore": { "description": "Reference page score used to select the reference page owner.", "format": "float", @@ -110104,16 +111471,6 @@ "description": "This should have the same semantic as single_topicness, and should replace it in the long term.", "format": "float", "type": "number" - }, - "titleCoverage": { - "description": "=================================== Signals for the single topicness. Only filled in for the primary (i.e., top ranked) entity. The title token coverage ratio.", - "format": "float", - "type": "number" - }, - "totalSum": { - "description": "The sum of raw topicality scores for all entities in this page.", - "format": "float", - "type": "number" } }, "type": "object" @@ -117619,6 +118976,10 @@ "description": "Indicates whether the query relevance features is disabled or not in Muppet scoring.", "type": "boolean" }, + "forceLeadingTextOrMeta": { + "description": "Indicates to not add any new candidates in SnippetFlow.", + "type": "boolean" + }, "snippetBrainSelectedCandidateIndex": { "description": "Snippet candidate index selected by snippet brain model. This field will get populated in SnippetFlow in superroot. go/snippets-brain", "format": "int32", @@ -118004,9 +119365,13 @@ "UNKNOWN_LINK_TYPE", "SELF_LINK" ], + "enumDeprecated": [ + false, + true + ], "enumDescriptions": [ "No link type specified.", - "This indicates that the link target points to the same object related to this segment. Example: A YouTube link with text=\"0.07\" and link_target: \"https://www.youtube.com/watch?v=leHVmSqd4_w\u0026t=0m07s\" points to the same YouTube video where this segment appears. See http://go/ignore-badwords-filtering-for-selflink for adding link_type design document." + "This indicates that the link target points to the same object related to this segment. Example: A YouTube link with text=\"0.07\" and link_target: \"https://www.youtube.com/watch?v=leHVmSqd4_w\u0026t=0m07s\" points to the same YouTube video where this segment appears. See http://go/ignore-badwords-filtering-for-selflink for adding link_type design document. ====== WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! ====== For YouTube use cases only: " ], "type": "string" }, @@ -123879,7 +125244,7 @@ "type": "object" }, "TrawlerTrawlerPrivateFetchReplyData": { - "description": "This is an optional container of arbitrary data that can be added to a FetchReplyData. This data is meant to be logged, but not sent back in a fetch reply (it should be added *after* the reply is prepared). Use FetchResponsePreparatorImpl::AddTrawlerPrivateDataToFetchReplyData to add. See also the comment in fetch_response_preparator_impl.cc. Next Tag: 46", + "description": "This is an optional container of arbitrary data that can be added to a FetchReplyData. This data is meant to be logged, but not sent back in a fetch reply (it should be added *after* the reply is prepared). Use FetchResponsePreparatorImpl::AddTrawlerPrivateDataToFetchReplyData to add. See also the comment in fetch_response_preparator_impl.cc. Next Tag: 47", "id": "TrawlerTrawlerPrivateFetchReplyData", "properties": { "BotGroupName": { @@ -124130,6 +125495,10 @@ "$ref": "TrawlerOriginalClientParams", "description": "Store the original client information." }, + "prodRegion": { + "description": "Log the prod region (only for regional harpoon requestor ids)", + "type": "string" + }, "resourceBucket": { "description": "If the requestor shares resource bucket with other requestorids, we will store the resource bucket name in these fields.", "type": "string" @@ -124610,6 +125979,7 @@ "FOP_ORDERING_RECOMMENDATION_SAME_FOP_EVENT_LEVEL", "FOP_ORDERING_STORED_VALUE_EVENT_LEVEL", "GEARHEAD_DUPLEX_COMPATIBLE_DIALER_ENABLED", + "CUSTOMER_UPDATE_CHALLENGE_EVENT_LEVEL", "EVENT_LEVEL_TEST_CODE_LIMIT", "ENTERTAINMENT_CLUSTER_TRIGGERING_AT_SESSION_LEVEL", "BEST_SELLER_CART_TAG_AT_SESSION_LEVEL", @@ -124780,6 +126150,11 @@ "IN_APP_OFFER_BATTLESTAR_APP_LAST_SURVIVOR_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_SUMMONERS_WAR_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_TOWER_OF_GOD_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_JACKPOT_WORLD_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_LOTSA_SLOTS_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_CASH_FRENZY_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL", "IN_APP_OFFER_ELIGIBLE_AT_SESSION_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_1_AT_SESSION_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_2_AT_SESSION_LEVEL", @@ -124792,6 +126167,11 @@ "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LAST_SURVIVOR_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_SUMMONERS_WAR_AT_SESSION_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_TOWER_OF_GOD_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_JACKPOT_WORLD_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LOTSA_SLOTS_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_CASH_FRENZY_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_WAR_PLANET_AT_SESSION_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL", "IN_APP_OFFER_SAVED_AT_SESSION_LEVEL", "IN_APP_OFFER_SAVED_APP_1_AT_SESSION_LEVEL", "IN_APP_OFFER_SAVED_APP_2_AT_SESSION_LEVEL", @@ -124828,6 +126208,7 @@ "OTHER_DEVICES_SUBNAV_RETURNED_IN_SESSION", "GEARHEAD_FRX_SENSITIVE_PERMISSION_SCREEN_SEEN", "POST_PURCHASE_ITEM_UPSELL_SESSION_LEVEL", + "POST_PURCHASE_ITEM_UPSELL_WAVE_2_SESSION_LEVEL", "PLAY_PASS_SIGNUP_INTERSTITIAL_SHOWN_SESSION_LEVEL", "FETCH_PROMOTION_BANNER_FROM_P3_SESSION_LEVEL", "AVP_SWOOP_10P_OFF_SESSION_LEVEL", @@ -125309,6 +126690,10 @@ "PLAY_PASS_SUPERHERO_CLUSTER_APP_WITH_VIDEO", "PLAY_PASS_SUPERHERO_CLUSTER_APP_WITH_PROMOTIONAL_DESCRIPTION", "CART_ABANDONMENT_ITEM_RECOMMENDATION_SESSION_LEVEL", + "BATTLESTAR_GAME_CENTRIC_CUJ_EMAIL_SESSION_LEVEL", + "PREREGISTRATION_START_PURCHASE_FLOW_ON_CLICK", + "CUSTOMER_UPDATE_CHALLENGE_SESSION_LEVEL", + "WEBSKY_DISPLAY_SUBSCRIPTION_ENTITLEMENT_BENEFITS_SESSION_LEVEL", "SESSION_LEVEL_TEST_CODE_LIMIT", "CART_ABANDONMENT_USER_LEVEL", "IN_APP_PRODUCTS_IN_DETAILS_PAGE_USER_LEVEL", @@ -125378,6 +126763,11 @@ "IN_APP_OFFER_BATTLESTAR_APP_LAST_SURVIVOR_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_SUMMONERS_WAR_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_APP_TOWER_OF_GOD_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_JACKPOT_WORLD_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_LOTSA_SLOTS_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_CASH_FRENZY_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL", "IN_APP_OFFER_ELIGIBLE_AT_USER_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_1_AT_USER_LEVEL", "IN_APP_OFFER_ELIGIBLE_APP_2_AT_USER_LEVEL", @@ -125390,6 +126780,11 @@ "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LAST_SURVIVOR_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_SUMMONERS_WAR_AT_USER_LEVEL", "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_TOWER_OF_GOD_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_JACKPOT_WORLD_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LOTSA_SLOTS_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_CASH_FRENZY_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_WAR_PLANET_AT_USER_LEVEL", + "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL", "IN_APP_OFFER_SAVED_AT_USER_LEVEL", "IN_APP_OFFER_SAVED_APP_1_AT_USER_LEVEL", "IN_APP_OFFER_SAVED_APP_2_AT_USER_LEVEL", @@ -125408,6 +126803,7 @@ "PLAY_GROWTH_IS_SCHEDULED", "GEARHEAD_VISUAL_PREVIEW_UNCHAINED_ELIGIBLE", "POST_PURCHASE_ITEM_UPSELL_USER_LEVEL", + "POST_PURCHASE_ITEM_UPSELL_WAVE_2_USER_LEVEL", "PLAY_PASS_SIGNUP_INTERSTITIAL_SHOWN_USER_LEVEL", "DISABLE_TOPUP_EXPERIMENT_CONTROL_GROUP_USER_LEVEL", "DISABLE_TOPUP_EXPERIMENT_TREATMENT_GROUP_USER_LEVEL", @@ -125500,6 +126896,7 @@ "HAS_LAST_7D_CART_ABANDONMENT_USER_LEVEL", "LINK_BIOMETRICS_NEW_SETUP_USER_LEVEL_V2", "LINK_BIOMETRICS_NEW_SETUP_USER_LEVEL_V3", + "LINK_BIOMETRICS_NEW_SETUP_USER_LEVEL_V3_1", "POST_SUCCESS_ADD_BACKUP_FLOW_USER_LEVEL", "SKIP_CHECK_MARK_SCREEN_WITH_BACKUP_FLOW_USER_LEVEL", "IS_ELIGIBLE_FOR_ONE_CLICK_BACKUP_FOP_USER_LEVEL", @@ -125610,6 +127007,7 @@ "IS_ELIGIBLE_FOR_APP_TARGETED_REWARD_SUPERCELL_USER_LEVEL", "IS_ELIGIBLE_FOR_APP_TARGETED_REWARD_KING_USER_LEVEL", "IS_ELIGIBLE_FOR_APP_TARGETED_REWARD_MINICLIP_USER_LEVEL", + "IS_APP_TARGETED_REWARD_BANNER_VISIBLE_USER_LEVEL", "GAME_HUB_DEVELOPER_VIDEO_AT_USER_LEVEL", "CART_ABANDONMENT_SUBSCRIPTION_BENEFITS_USER_LEVEL", "GAME_HUB_DEVELOPER_VIDEO_ELIGIBLE_AT_USER_LEVEL", @@ -125622,6 +127020,9 @@ "REDEEM_SAVE_BUYER_SPEND_MODEL_USER_LEVEL", "PURCHASE_ADD_FOP_OPTIONS_SCREEN_USER_LEVEL", "CART_ABANDONMENT_ITEM_RECOMMENDATION_USER_LEVEL", + "HAS_INSUFFICIENT_STORED_VALUE_BALANCE_BEFORE_RENEWAL_USER_LEVEL", + "IS_ELIGIBLE_FOR_ONE_CLICK_BAKCUP_FOP_IN_FIX_FLOW_USER_LEVEL", + "WEBSKY_DISPLAY_SUBSCRIPTION_ENTITLEMENT_BENEFITS_USER_LEVEL", "USER_LEVEL_TEST_CODE_LIMIT" ], "enumDeprecated": [ @@ -126131,6 +127532,18 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, true, false, false, @@ -126768,6 +128181,21 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, true, false, false, @@ -126792,6 +128220,7 @@ false, false, false, + false, true, false, false, @@ -126913,6 +128342,10 @@ false, false, false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -127192,6 +128625,7 @@ "", "", "Test code for sessions where a phone dialer that doesn't turn screen on during phone calls is enabled.", + "Event-level test code for the presence of customer update challenge.", "", "", "", @@ -127381,6 +128815,16 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "see go/reordering-subnav-tabs", "see go/reordering-subnav-tabs", "", @@ -127410,6 +128854,7 @@ "Test code for other devices subnav. Logged for eligible users when home subnavs are fetched.", "", "", + "", "Test code logged on client side for users who see the Play Pass signup interstitial.", "", "User eligible for 10% off for next renewal", @@ -127891,6 +129336,10 @@ "Session-level test code for when an app is eligible to have its video and description displayed in the Play Pass superhero cluster.", "", "Session-level test code for SKU Recommendation in Cart Abandonment.", + "Session-level test code for Battlestar signup email with game centric personalization.", + "Session-level test code for preregistration release notification click triggering purchase flow.", + "Session-level test code for the presence of customer update challenge.", + "Session-level test code for displaying sub-entitlement benefits on websky.", "", "Cart abandonment flow for purchase flow.", "User saw/would have seen the in app products section in App", @@ -127979,6 +129428,16 @@ "", "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "User saw/would have seen the subscription one time pass offer", "", "", @@ -127990,6 +129449,7 @@ "", "Test code for when a user was eligible for visual preview while in motion. E.g. received a notification and had visual preview setting enabled.", "", + "", "Test code logged on client side for users who see the Play Pass signup interstitial.", "Test codes for seeing the effects of disabling topup in select countries.", "", @@ -128082,6 +129542,7 @@ "User level test code for users who have any purchase card abandon behavior in the last 7 day (controlled by LAST_7D_CART_ABANDONMENT_BACKEND), used for AH/GH monetization experiments.", "User level test code for link biometrics with impression cap and foped user setup.", "User level test code for link biometrics with impression cap and foped user setup.", + "User level test code for link biometrics with impression cap and foped user setup after traffic rebalancing.", "User level test code for post success add backup flow.", "User level test code for skipping ckechmark screen with backup flow.", "User level test code for users who are eligible for one-click backup fop.", @@ -128192,6 +129653,7 @@ "", "", "", + "", "User-level test code for Game Hub Developer Video cluster.", "User-level for showing subscription benefits in cart abandonment.", "User-level test code for Game Hub Developer Video cluster eligibility.", @@ -128204,6 +129666,9 @@ "User level test code for Redeem Save buyer offer study, tracking users who actually get different experience between control and treatment.", "User-level test code marking users who have seen the add new fop option screen during purchase flow. This will be used for ranking of add fop options experiments.", "User level test code for SKU Recommendation in Cart Abandonment.", + "User level test code for stored value top-up email reminder.", + "User level test code for users who are eligible for one-click backup fop in fix flow", + "User level test code for displaying sub-entitlement benefits on websky.", "" ], "type": "string" @@ -128221,7 +129686,7 @@ "type": "object" }, "VendingConsumerProtoTrustedGenomeEntity": { - "description": "Proto message containing the id, localized title, score, and hierarchy level of a trusted genome entity. Next ID: 10", + "description": "Proto message containing the id, localized title, score, and hierarchy level of a trusted genome entity. Next ID: 12", "id": "VendingConsumerProtoTrustedGenomeEntity", "properties": { "categoryId": { @@ -128232,6 +129697,10 @@ "description": "The identifier of a play trusted genome entity. Required.", "type": "string" }, + "isLocalized": { + "description": "Indicate whether the trusted genome entity has localized title.", + "type": "boolean" + }, "level": { "description": "The level of the entity. E.g. in hierarchy like Action -\u003e Platformer \u003e Endless Runner. Action is level 1, Platformer is level 2 and Endless Runner is level 3. Currently, only APP_TAXONOMY and GAME_TAXONOMY type may have the levels. For entity that does not have hierarchy, its level is 1. Required.", "format": "int32", @@ -128245,6 +129714,13 @@ "description": "The localized query string for this trusted genome entity. This query will be used when we want to bring users to SERP on click.", "type": "string" }, + "recsTopicId": { + "description": "The corresponding recs topics created from the trusted genome entity if available.", + "items": { + "type": "string" + }, + "type": "array" + }, "score": { "description": "The confidence score of the entity to the app.", "format": "float", @@ -128318,13 +129794,14 @@ "GAME_MONETIZATION", "ACCESSIBLITY", "ASSISTANT", - "CHROMEBOOK_COMPATIBILITY" + "CHROMEBOOK_COMPATIBILITY", + "GLOBAL_ATTRIBUTE" ], "enumDescriptions": [ "", - "Apps taxonomy. e.g. Air travel.", + "============================= Apps =======================// Apps taxonomy. e.g. Air travel.", "Apps attribute, it can be universal, e.g. VR, or it can be category specific, e.g. Beauty type makeup.", - "Game taxonomy. e.g. Action.", + "============================= Games =======================// Game taxonomy. e.g. Action.", "Gameplay element. e.g. Arcade.", "Gameplay mode. e.g. Single player", "Game graphic stype. e.g. Anime", @@ -128332,9 +129809,10 @@ "Game connectivity. e.g. Offline", "Game dimensional planes. e.g. 3D", "Game monetization. e.g. subscription, try before you buy.", - "Accessiblity. e.g. Blind-Friendly", + "============================= General =======================// Accessiblity. e.g. Blind-Friendly", "Assistant tags, e.g. Assistant-Enabled", - "Chrome OS compatibility tags. e.g. Optimized for Chromebooks" + "Chrome OS compatibility tags. e.g. Optimized for Chromebooks", + "Global attribute shared between both App and Game. e.g. Companion App" ], "type": "string" } @@ -143983,7 +145461,7 @@ "type": "array" }, "siteDisplayName": { - "description": "The display name of the document's domain used as the first part of VisUrl, e.g, \"Google \u003e play \u003e store\" is the VisUrl of \"https://play.google.com/store/\". Wherein, \"Google\" is site_display_name of the domain \"google.com\". See go/site-display-name for more details.", + "description": "The domain-level display name of the website, such as \"Google\" for google.com. See go/site-display-name for more details. As of Aug 2023, this field is being deprecated in favor of `info.[AlternativeTitlesResponse].site_display_name_response` field, which also contains host-level site display names with additional information.", "type": "string" }, "snippetBylineDate": { @@ -144039,7 +145517,7 @@ }, "titleRenderedToken": { "deprecated": true, - "description": "How tokens are rendered in generating title. Note: In rendering a title, the page title part and the site/host/domain title part can be flipped after initial rendering. The flip, if happend, may not be reflected in this field. That is, this field may contain the tokens in the original, pre-flip, order.", + "description": "How tokens are rendered in generating title. Note: In rendering a title, the page title part and the site/host/domain title part can be flipped after initial rendering. The flip, if happened, may not be reflected in this field. That is, this field may contain the tokens in the original, pre-flip, order.", "items": { "$ref": "MustangSnippetsRenderedToken" }, @@ -144071,11 +145549,437 @@ }, "type": "object" }, + "WatchpageLanguageWatchPageLanguageModelPredictions": { + "description": "Next ID: 4", + "id": "WatchpageLanguageWatchPageLanguageModelPredictions", + "properties": { + "languageScore": { + "description": "A list of watchpage languages predicted arranged according to their scores.", + "items": { + "$ref": "WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore" + }, + "type": "array" + }, + "usesSpeechSignals": { + "description": "Does the prediction uses speech signals like audio language.", + "type": "boolean" + }, + "version": { + "description": "An identifier to recognize the model version used for this prediction.", + "enum": [ + "UNKNOWN_MODEL", + "V2" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore": { + "description": "Next ID: 3", + "id": "WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore", + "properties": { + "score": { + "description": "Score for the predicted language by the WatchPage Language model.", + "format": "float", + "type": "number" + }, + "watchpageLanguage": { + "description": "The language predicted by the WatchPage Language model.", + "enum": [ + "ENGLISH", + "DANISH", + "DUTCH", + "FINNISH", + "FRENCH", + "GERMAN", + "HEBREW", + "ITALIAN", + "JAPANESE", + "KOREAN", + "NORWEGIAN", + "POLISH", + "PORTUGUESE", + "RUSSIAN", + "SPANISH", + "SWEDISH", + "CHINESE", + "CZECH", + "GREEK", + "ICELANDIC", + "LATVIAN", + "LITHUANIAN", + "ROMANIAN", + "HUNGARIAN", + "ESTONIAN", + "TG_UNKNOWN_LANGUAGE", + "UNKNOWN_LANGUAGE", + "BULGARIAN", + "CROATIAN", + "SERBIAN", + "IRISH", + "GALICIAN", + "TAGALOG", + "TURKISH", + "UKRAINIAN", + "HINDI", + "MACEDONIAN", + "BENGALI", + "INDONESIAN", + "LATIN", + "MALAY", + "MALAYALAM", + "WELSH", + "NEPALI", + "TELUGU", + "ALBANIAN", + "TAMIL", + "BELARUSIAN", + "JAVANESE", + "OCCITAN", + "URDU", + "BIHARI", + "GUJARATI", + "THAI", + "ARABIC", + "CATALAN", + "ESPERANTO", + "BASQUE", + "INTERLINGUA", + "KANNADA", + "PUNJABI", + "SCOTS_GAELIC", + "SWAHILI", + "SLOVENIAN", + "MARATHI", + "MALTESE", + "VIETNAMESE", + "FRISIAN", + "SLOVAK", + "CHINESE_T", + "FAROESE", + "SUNDANESE", + "UZBEK", + "AMHARIC", + "AZERBAIJANI", + "GEORGIAN", + "TIGRINYA", + "PERSIAN", + "BOSNIAN", + "SINHALESE", + "NORWEGIAN_N", + "PORTUGUESE_P", + "PORTUGUESE_B", + "XHOSA", + "ZULU", + "GUARANI", + "SESOTHO", + "TURKMEN", + "KYRGYZ", + "BRETON", + "TWI", + "YIDDISH", + "SERBO_CROATIAN", + "SOMALI", + "UIGHUR", + "KURDISH", + "MONGOLIAN", + "ARMENIAN", + "LAOTHIAN", + "SINDHI", + "RHAETO_ROMANCE", + "AFRIKAANS", + "LUXEMBOURGISH", + "BURMESE", + "KHMER", + "TIBETAN", + "DHIVEHI", + "CHEROKEE", + "SYRIAC", + "LIMBU", + "ORIYA", + "ASSAMESE", + "CORSICAN", + "INTERLINGUE", + "KAZAKH", + "LINGALA", + "MOLDAVIAN", + "PASHTO", + "QUECHUA", + "SHONA", + "TAJIK", + "TATAR", + "TONGA", + "YORUBA", + "CREOLES_AND_PIDGINS_ENGLISH_BASED", + "CREOLES_AND_PIDGINS_FRENCH_BASED", + "CREOLES_AND_PIDGINS_PORTUGUESE_BASED", + "CREOLES_AND_PIDGINS_OTHER", + "MAORI", + "WOLOF", + "ABKHAZIAN", + "AFAR", + "AYMARA", + "BASHKIR", + "BISLAMA", + "DZONGKHA", + "FIJIAN", + "GREENLANDIC", + "HAUSA", + "HAITIAN_CREOLE", + "INUPIAK", + "INUKTITUT", + "KASHMIRI", + "KINYARWANDA", + "MALAGASY", + "NAURU", + "OROMO", + "RUNDI", + "SAMOAN", + "SANGO", + "SANSKRIT", + "SISWANT", + "TSONGA", + "TSWANA", + "VOLAPUK", + "ZHUANG", + "KHASI", + "SCOTS", + "GANDA", + "MANX", + "MONTENEGRIN", + "AKAN", + "IGBO", + "MAURITIAN_CREOLE", + "HAWAIIAN", + "CEBUANO", + "EWE", + "GA", + "HMONG", + "KRIO", + "LOZI", + "LUBA_LULUA", + "LUO_KENYA_AND_TANZANIA", + "NEWARI", + "NYANJA", + "OSSETIAN", + "PAMPANGA", + "PEDI", + "RAJASTHANI", + "SESELWA_CREOLE_FRENCH", + "TUMBUKA", + "VENDA", + "WARAY_PHILIPPINES", + "NUM_LANGUAGES" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\"Norwegian\" = \"no\" normally implies Bokmål (\"nb\"). See also NORWEGIAN_N. Consider using IsNorwegianLanguage().", + "", + "WARNING: \"Portuguese\" in the enum Language implies the Iberian variant, while Google and industry standard practice is for \"pt\" to imply Brazilian, for the much larger population. The old LanguageCode() function returns \"pt\" for legacy reasons. The III LanguageEnumLanguageCodeConverter converts it to \"pt-PT\" to preserve the semantics. Converting between this legacy enum and industry-standard language tags cannot preserve the distinction between PORTUGUESE and PORTUGUESE_P. Relying on it is a bug. Consider using IsPortugueseLanguage().", + "", + "", + "", + "\"Chinese\" normally implies simplified Han characters (\"zh-Hans\"). See also CHINESE_T. Consider using IsChineseLanguage().", + "", + "", + "", + "", + "", + "Avoid making a distinction between ROMANIAN and MOLDAVIAN. Consider using IsRomanianLanguage().", + "", + "", + "", + "", + "", + "", + "Serbian is commonly written in two scripts. The default is Cyrillic (\"sr\" = \"sr-Cyrl\"). It is also often written with Latin letters (\"sr-Latn\"). This enum does not convey that distinction.", + "", + "", + "TAGALOG is used to mean both Tagalog (tl) and Filipino (fil). These are nearly the same; Filipino is the official language, and \"fil\" is normally used for UI settings etc. The old LanguageCode() function returns \"tl\".", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\"Bihari\" is not a language: There are several different languages spoken in and around the Indian state of Bihar. This is like saying \"Swiss\" to mean German+French+Italian+Romansh.", + "", + "", + "", + "", + "", + "", + "UI only.", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Chinese written in traditional Han characters (\"zh-Hant\"). See also CHINESE. Consider using IsChineseLanguage().", + "", + "", + "", + "", + "", + "", + "UI only.", + "", + "UI only. LangId language: CROATIAN (28)", + "", + "Norwegian Nynorsk (\"nn\"). See also NORWEGIAN. Consider using IsNorwegianLanguage(). UI only. LangId language: NORWEGIAN (10)", + "Portuguese in Portugal (\"pt-PT\"). See the WARNING at PORTUGUESE. Avoid a distinction between PORTUGUESE and PORTUGUESE_P. Relying on it is a bug. Consider using IsPortugueseLanguage(). UI only. LangId language: PORTUGUESE (12)", + "Portuguese in Brazil (\"pt-BR\"). Consider using IsPortugueseLanguage(). UI only. LangId language: PORTUGUESE (12)", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "", + "", + "UI only.", + "UI only.", + "UI only. LangId language: SERBIAN (29)", + "UI only.", + "", + "This has been documented as \"Kurmanji (kmr) + Sorani (ckb) + Kurdish (ku)\". There are several kinds of Kurdish languages. \"ku\" normally implies Northern Kurdish = Kurmanji (kmr) which is normally written in Latin letters. \"ckb\" is Central Kurdish (largely in Iraq) which is normally written in Arabic letters (thus right-to-left).", + "", + "", + "", + "", + "UI only.", + "", + "", + "", + "", + "", + "sometimes spelled Divehi; lang of Maldives", + "", + "", + "UI only.", + "", + "UI only.", + "", + "UI only.", + "", + "UI only.", + "\"Moldavian\" is the same language as Romanian. In language tags, \"ro-MD\" can be used but is not normally necessary. Avoid making a distinction between ROMANIAN and MOLDAVIAN. Consider using IsRomanianLanguage(). UI only. LangId language: ROMANIAN (22)", + "", + "", + "UI only.", + "", + "", + "", + "", + "This is a vague group of languages, not one language. UI only.", + "This is a vague group of languages, not one language. UI only.", + "This is a vague group of languages, not one language. UI only.", + "This is a vague group of languages, not one language. UI only.", + "", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "", + "UI only.", + "", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "UI only. More commonly called Luganda.", + "UI only.", + "UI only. LangId language: SERBIAN (29)", + "UI only.", + "UI only.", + "UI only.", + "UI only.", + "Translate only.", + "CLD only.", + "CLD only.", + "Translate only.", + "CLD only.", + "CLD only.", + "CLD only.", + "CLD only.", + "Translate only.", + "CLD only.", + "Translate only.", + "Translate only.", + "CLD only.", + "Translate only.", + "CLD only.", + "CLD only.", + "CLD only.", + "Translate only.", + "Always keep this at the end. It is not a" + ], + "type": "string" + } + }, + "type": "object" + }, "WatchpageLanguageWatchPageLanguageResult": { + "description": "Next ID: 3", "id": "WatchpageLanguageWatchPageLanguageResult", "properties": { + "predictions": { + "description": "Versioned WatchPageLanguageResults. This is to experiment and launch new models. The first prediction is the latest production version.", + "items": { + "$ref": "WatchpageLanguageWatchPageLanguageModelPredictions" + }, + "type": "array" + }, "watchpageLanguage": { - "description": "The language predicted by the WatchPage Language model.", + "description": "The language predicted by the V1 WatchPage Language model. For new and experimental versions use versioned_language_result.", "enum": [ "ENGLISH", "DANISH", diff --git a/contentwarehouse/v1/contentwarehouse-gen.go b/contentwarehouse/v1/contentwarehouse-gen.go index 7119cc42f4d..e3fe2b76ec1 100644 --- a/contentwarehouse/v1/contentwarehouse-gen.go +++ b/contentwarehouse/v1/contentwarehouse-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/document-warehouse // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // contentwarehouseService, err := contentwarehouse.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // contentwarehouseService, err := contentwarehouse.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // contentwarehouseService, err := contentwarehouse.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package contentwarehouse // import "google.golang.org/api/contentwarehouse/v1" import ( @@ -3230,6 +3243,8 @@ type AppsPeopleOzExternalMergedpeopleapiAffinity struct { // "TRUSTED_CONTACTS_FL_AFFINITY" // "CALENDAR_WEB_TEAM_MEMBERS_AFFINITY" // "CLOUDCONNECT_AFFINITY" + // "PERSONAL_AGENT_AFFINITY" + // "MOBILE_HARNESS_AFFINITY" AffinityType string `json:"affinityType,omitempty"` // ContainerId: The ID of the container @@ -7586,15 +7601,16 @@ type AppsPeopleOzExternalMergedpeopleapiPerson struct { PosixAccount []*AppsPeopleOzExternalMergedpeopleapiPosixAccount `json:"posixAccount,omitempty"` - // ProfileUrl: DEPRECATED. (go/people-api-concepts#repeated): Use - // person.profile_url_repeated instead. Access to this field is - // restricted to a set of legacy clients. This is a Google+-only field. - // See go/fbs-g+-deprecation. NOTE: `Person.profile_url` is only - // populated for profile-centric person. + // ProfileUrl: DEPRECATED. No data is returned for this field anymore. + // (go/people-api-concepts#repeated): Use person.profile_url_repeated + // instead. Access to this field is restricted to a set of legacy + // clients. This is a Google+-only field. See go/fbs-g+-deprecation. + // NOTE: `Person.profile_url` is only populated for profile-centric + // person. ProfileUrl string `json:"profileUrl,omitempty"` - // ProfileUrlRepeated: This is a Google+-only field. See - // go/fbs-g+-deprecation. + // ProfileUrlRepeated: DEPRECATED. No data is returned for this field + // anymore. This is a Google+-only field. See go/fbs-g+-deprecation. ProfileUrlRepeated []*AppsPeopleOzExternalMergedpeopleapiProfileUrl `json:"profileUrlRepeated,omitempty"` // Pronoun: Pronouns are not supported for consumer profiles. See @@ -11205,46 +11221,6 @@ func (s *AssistantApiCameraReceiverCapabilities) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AssistantApiCapabilitiesHomeAppCapabilities: Information about the -// readiness of Home app features on the device. As of January 2023, -// this is only populated by Assistant on Android. -type AssistantApiCapabilitiesHomeAppCapabilities struct { - // SetupState: The app's installation and setup state. This is most - // pertinent for Tangor, where lock screen Smart Home queries are - // fulfilled by a Home app activity that may be blocked if this value is - // not `SETUP_STATE_COMPLETE`. - // - // Possible values: - // "SETUP_STATE_UNKNOWN" - Setup state is not known, potentially - // because the installed version of the app does not have the app state - // service. - // "SETUP_STATE_INCOMPLETE" - First-time setup has not been completed. - // "SETUP_STATE_COMPLETE" - First-time setup is known to be complete. - SetupState string `json:"setupState,omitempty"` - - // ForceSendFields is a list of field names (e.g. "SetupState") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SetupState") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AssistantApiCapabilitiesHomeAppCapabilities) MarshalJSON() ([]byte, error) { - type NoMethod AssistantApiCapabilitiesHomeAppCapabilities - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // AssistantApiCarAssistantCapabilities: Capabilities that are // associated with Assistants on auto surfaces. This is different from // other capabilities such as CarSettingsCapabilities, @@ -19933,9 +19909,6 @@ type AssistantApiSoftwareCapabilities struct { GcmCapabilities *AssistantApiGcmCapabilities `json:"gcmCapabilities,omitempty"` - // HomeAppCapabilities: Google Home app features. - HomeAppCapabilities *AssistantApiCapabilitiesHomeAppCapabilities `json:"homeAppCapabilities,omitempty"` - // LiveTvChannelCapabilities: Capabilities related to live TV channels. LiveTvChannelCapabilities *AssistantApiLiveTvChannelCapabilities `json:"liveTvChannelCapabilities,omitempty"` @@ -23049,6 +23022,8 @@ type AssistantGroundingProviderProviderSignalResult struct { // surfaces. See go/0p-and-system-api-in-pc. // "ANDROID_SYSTEM_API_TYPE" - Provider fulfillment is through Android // System API. See go/0p-and-system-api-in-pc. + // "ANDROID_APP_TYPE" - Provider fulfillment is through Android app + // fulfillment (App Actions). ProviderTypeSignal string `json:"providerTypeSignal,omitempty"` // ForceSendFields is a list of field names (e.g. "IsDefaultProvider") @@ -23606,12 +23581,10 @@ func (s *AssistantGroundingRankerDeviceTargetingFeaturesProperties) MarshalJSON( // AssistantGroundingRankerDeviceTargetingFeaturesStates: The states of // the device. They are dynamic and may change based on the current -// context. Next ID: 5 +// context. Next ID: 6 type AssistantGroundingRankerDeviceTargetingFeaturesStates struct { // Distance: The distance of the device relative to others that hear the - // user's OKG. Timestamp of when the device was last used. Should - // correspond to when the AssistantRequestParams (in ASSISTANT_SNAPSHOT - // corpus) were last written for this device. + // user's OKG. // // Possible values: // "UNKNOWN_DISTANCE" @@ -23623,6 +23596,17 @@ type AssistantGroundingRankerDeviceTargetingFeaturesStates struct { // IsDocked: Indicate whether the device is docked on a base. IsDocked bool `json:"isDocked,omitempty"` + // IsLocal: Whether the device is a local device, i.e. the device that + // heard OKG from a user and is processed by an assistant pipeline. If + // multiple devices heard OKG (MDA case), each hearing device would be + // considered a local device in its own assistant pipeline. Example: A + // user says "OKG, play music on TV" to Google Home, and music is played + // on the TV. Google home is considered a local device, while TV is + // considered a remote device. Timestamp of when the device was last + // used. Should correspond to when the AssistantRequestParams (in + // ASSISTANT_SNAPSHOT corpus) were last written for this device. + IsLocal bool `json:"isLocal,omitempty"` + // IsLocked: Indicate whether the device is locked. IsLocked bool `json:"isLocked,omitempty"` @@ -23947,7 +23931,7 @@ func (s *AssistantGroundingRankerLaaFeaturesProvider) MarshalJSON() ([]byte, err } // AssistantGroundingRankerMediaGroundingProviderFeatures: Features to -// be passed from Media GP to HGR. Next ID: 17 +// be passed from Media GP to HGR. Next ID: 18 type AssistantGroundingRankerMediaGroundingProviderFeatures struct { // AlbumReleaseType: Release type for an album container. // @@ -23977,6 +23961,10 @@ type AssistantGroundingRankerMediaGroundingProviderFeatures struct { // manual rules. EntityMid string `json:"entityMid,omitempty"` + // HasCastVideoDeeplink: True if the candidate has a CAST_VIDEO deeplink + // regardless of which provider was chosen. + HasCastVideoDeeplink bool `json:"hasCastVideoDeeplink,omitempty"` + // HasTypeSemanticEdge: True if the argument's type was explicitly // mentioned in the query. HasTypeSemanticEdge bool `json:"hasTypeSemanticEdge,omitempty"` @@ -24141,6 +24129,9 @@ type AssistantGroundingRankerMediaGroundingProviderFeatures struct { // go/newsplayer-outro-gnews. Current use case is to ask users to // continue their news journey in the Google News app / web app. Future // cases could include asking users to adjust their news settings. + // "NEWS_OVERVIEW" - Represents a Narrative News Overview media item. + // This a multi-segment news media item with interactive elements. See + // go/gen-narrative-news-intro. // "AUDIO_STORY" - Representing a short audio story. go/tmas-design // "PODCAST_SERIES" - Represent different kinds of podcast content // "PODCAST_EPISODE" @@ -24193,7 +24184,7 @@ func (s *AssistantGroundingRankerMediaGroundingProviderFeatures) UnmarshalJSON(d } // AssistantGroundingRankerPodcastGroundingProviderFeatures: Features to -// be extracted from Podcast GP for ranking in HGR. Next ID: 6 +// be extracted from Podcast GP for ranking in HGR. Next ID: 7 type AssistantGroundingRankerPodcastGroundingProviderFeatures struct { // IsExclusive: Whether the podcast is exclusive to a provider a not. IsExclusive bool `json:"isExclusive,omitempty"` @@ -24213,6 +24204,12 @@ type AssistantGroundingRankerPodcastGroundingProviderFeatures struct { // of the entity. ScubedTstarScore float64 `json:"scubedTstarScore,omitempty"` + // YoutubeConfidenceScore: This score is in the range [0.0, 1.0] and is + // used for cross-backend (e.g., YT vs another Music/Podcast service + // provider) ranking and scoring. 0.0 means no confidence and 1.0 means + // full confidence. + YoutubeConfidenceScore float64 `json:"youtubeConfidenceScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsExclusive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -24239,9 +24236,10 @@ func (s *AssistantGroundingRankerPodcastGroundingProviderFeatures) MarshalJSON() func (s *AssistantGroundingRankerPodcastGroundingProviderFeatures) UnmarshalJSON(data []byte) error { type NoMethod AssistantGroundingRankerPodcastGroundingProviderFeatures var s1 struct { - PopularityScore gensupport.JSONFloat64 `json:"popularityScore"` - ScubedNg3ModelScore gensupport.JSONFloat64 `json:"scubedNg3ModelScore"` - ScubedTstarScore gensupport.JSONFloat64 `json:"scubedTstarScore"` + PopularityScore gensupport.JSONFloat64 `json:"popularityScore"` + ScubedNg3ModelScore gensupport.JSONFloat64 `json:"scubedNg3ModelScore"` + ScubedTstarScore gensupport.JSONFloat64 `json:"scubedTstarScore"` + YoutubeConfidenceScore gensupport.JSONFloat64 `json:"youtubeConfidenceScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) @@ -24251,6 +24249,7 @@ func (s *AssistantGroundingRankerPodcastGroundingProviderFeatures) UnmarshalJSON s.PopularityScore = float64(s1.PopularityScore) s.ScubedNg3ModelScore = float64(s1.ScubedNg3ModelScore) s.ScubedTstarScore = float64(s1.ScubedTstarScore) + s.YoutubeConfidenceScore = float64(s1.YoutubeConfidenceScore) return nil } @@ -25326,6 +25325,9 @@ type AssistantLogsDeviceMediaSessionLog struct { // go/newsplayer-outro-gnews. Current use case is to ask users to // continue their news journey in the Google News app / web app. Future // cases could include asking users to adjust their news settings. + // "NEWS_OVERVIEW" - Represents a Narrative News Overview media item. + // This a multi-segment news media item with interactive elements. See + // go/gen-narrative-news-intro. // "AUDIO_STORY" - Representing a short audio story. go/tmas-design // "PODCAST_SERIES" - Represent different kinds of podcast content // "PODCAST_EPISODE" @@ -26653,10 +26655,40 @@ func (s *AssistantPfrSmartHomeIntentMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AssistantPfrTiebreakingMetadata: Features used by the +// PrefulfillmentRanker's scorer exclusively to break ties. +type AssistantPfrTiebreakingMetadata struct { + Fingerprint uint64 `json:"fingerprint,omitempty,string"` + + SortedNameString string `json:"sortedNameString,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Fingerprint") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AssistantPfrTiebreakingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod AssistantPfrTiebreakingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AssistantPrefulfillmentRankerPrefulfillmentSignals: Signals to be // used by the Prefulfillment Ranker. Derived from the ParsingSignals // and GroundingSignals carried by the FunctionCall. LINT.IfChange Next -// ID: 62 +// ID: 65 type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // BindingSetAuis: Assistant User Interaction Score for binding set. BindingSetAuis float64 `json:"bindingSetAuis,omitempty"` @@ -26802,6 +26834,11 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // by the Sage IG. IsSageDisabledIntent bool `json:"isSageDisabledIntent,omitempty"` + // IsSageInNageIntent: Whether the intent is produced by the Sage + // IntentGenerator invoked by the NSP intent-generator (thus, + // Sage-in-NSP-invoking_Sage, or Sage-in-Nage). + IsSageInNageIntent bool `json:"isSageInNageIntent,omitempty"` + // IsSageIntent: Whether this intent was generated by Sage. IsSageIntent bool `json:"isSageIntent,omitempty"` @@ -26912,6 +26949,11 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // "QU_PHASE_NAGE" - Phase in which QUS runs NSP in the QUS. Phase string `json:"phase,omitempty"` + // PlatinumSource: Whether the intent comes from the Sage + // IntentGenerator's "platinum" source, signifying high-confidence in + // quality. + PlatinumSource bool `json:"platinumSource,omitempty"` + // Pq2tVsAssistantIbstCosine: Cosine similarity between predicted // query-to-term model and assistant intent-type-based salient terms. // This is intended to be only used for ACE ranking and only populated @@ -26990,8 +27032,13 @@ type AssistantPrefulfillmentRankerPrefulfillmentSignals struct { // "SUB_INTENT_TYPE_MUSIC_INITIATION_INTENT" - Play_media // "SUB_INTENT_TYPE_PLAY_RADIO_INTENT" - Play_media // "SUB_INTENT_TYPE_PLAY_TVM_INTENT" - Play_media + // "SUB_INTENT_TYPE_PLAY_VIDEO_INTENT" - Play media + // "SUB_INTENT_TYPE_BROWSE_VIDEO_INTENT" - Find_media, + // Media_entity_bare SubIntentType string `json:"subIntentType,omitempty"` + TiebreakingMetadata *AssistantPfrTiebreakingMetadata `json:"tiebreakingMetadata,omitempty"` + // TopHypothesisConfidence: Average of per-word confidence for top // speech recognition hypothesis. The value is from // RecognizerHypothesisLog: @@ -30646,7 +30693,7 @@ func (s *CommerceDatastoreImageDeepTagsModelOutput) MarshalJSON() ([]byte, error // add a new field into CompositeDoc, or change existing field's size // significantly, please file a ticket at go/dj-new-field, fill in // necessary information and get approved by docjoin-access@ team. Next -// id: 191 +// id: 193 type CompositeDoc struct { // ContentChecksum96: Visible content checksum as computed by // repository::parsehandler::checksum::Checksum96bitsParseHandler. The @@ -30661,8 +30708,15 @@ type CompositeDoc struct { Alternatename []*CompositeDocAlternateName `json:"alternatename,omitempty"` + // AnchorStats: Mark as non-personal since it's an aggregation of + // anchors. For more details of Search personal data, see + // go/dma52-search-cdoc-fields. AnchorStats *IndexingDocjoinerAnchorStatistics `json:"anchorStats,omitempty"` + // Anchors: Mark as non-personal since no personal fields will be + // populated in `anchors.link_additional_info` and + // `anchors.additional_info`. For more details of Search personal data, + // see go/dma52-search-cdoc-fields. Anchors *Anchors `json:"anchors,omitempty"` // BadSslCertificate: This field is present iff the page has a bad SSL @@ -31211,6 +31265,16 @@ type CompositeDocIndexingInfo struct { // document. NormalizedClickScore float64 `json:"normalizedClickScore,omitempty"` + // PrimaryVertical: Vertical membership of the document. - + // `primary_vertical` is the vertical that initiated indexing of this + // document (or empty if the vertical was websearch). - `verticals` is + // the full list of verticals that contained this document (excluding + // websearch) at indexing time. `primary_vertical` may or may not be an + // element of `verticals` because of vertical membership skew between + // the ingestion time and indexing time. See go/one-indexing-for-web for + // more background. + PrimaryVertical string `json:"primaryVertical,omitempty"` + // RawNavboost: The raw navboost count for the canonical url without // aggregating the navboost from dup urls. This field is used when // building forwarding map. @@ -31255,6 +31319,8 @@ type CompositeDocIndexingInfo struct { // details). UrlPatternSignals *IndexingSignalAggregatorUrlPatternSignals `json:"urlPatternSignals,omitempty"` + Verticals []string `json:"verticals,omitempty"` + // VideoIndexingInfo: Indexing info about videos. VideoIndexingInfo *ImageRepositoryVideoIndexingInfo `json:"videoIndexingInfo,omitempty"` @@ -31462,6 +31528,7 @@ type CompositeDocPartialUpdateInfoLastFullIndexingInfo struct { // "RAFFIA_WEBSEARCH" - Base Raffia corpora // "RAFFIA_FASTPATH_DAILY" - Fastpath Raffia corpora // "RAFFIA_FASTPATH_INSTANT" + // "DOCJOINS" - Docjoins repository Corpus string `json:"corpus,omitempty"` // LastFullIndexingTsMicros: Last full update indexing timestamp in @@ -42418,7 +42485,7 @@ func (s *GeostoreFeatureHistoryMetadataProto) MarshalJSON() ([]byte, error) { type GeostoreFeatureIdForwardingsProto struct { // DuplicateOf: If the feature has been marked as a DUPLICATE of another // feature, this is the feature ID of that other feature. Note that the - // other feature may itself be removed. This field is NOT set in (1). + // other feature may itself be removed. This field is always set. DuplicateOf *GeostoreFeatureIdProto `json:"duplicateOf,omitempty"` // ForwardedId: The feature ID of the forwarded feature. This field is @@ -42775,6 +42842,7 @@ type GeostoreFeaturePropertyIdProto struct { // "SEGMENT_PEDESTRIAN_FACILITY" // "SEGMENT_PEDESTRIAN_GRADE" // "SEGMENT_PRIORITY" + // "SEGMENT_RAMP_MAX_CONNECTED_PRIORITY" // "SEGMENT_RESTRICTION" // "SEGMENT_ROAD_CAMERA" // "SEGMENT_ROAD_SIGN" @@ -42798,6 +42866,7 @@ type GeostoreFeaturePropertyIdProto struct { // "STATUS_REMOVED_REASON" // "STATUS_START_DATE" // "STOREFRONT_GEOMETRY" + // "STOREFRONT_GEOMETRY_MODEL" // "SYNTHETIC_GEOMETRY" // "THREE_DIMENSIONAL_MODEL" // "TOLL_CLUSTER_INTERSECTION" @@ -43176,8 +43245,6 @@ type GeostoreFeatureProto struct { // is an optional field). Point []*GeostorePointProto `json:"point,omitempty"` - // Political: ** DEPRECATED ** Detail discussion could be found at - // b/18611003. Political *GeostorePoliticalProto `json:"political,omitempty"` Polygon []*GeostorePolygonProto `json:"polygon,omitempty"` @@ -43326,6 +43393,10 @@ type GeostoreFeatureProto struct { // geometry. Only TYPE_ESTABLISHMENT_POI should have this field set. StorefrontGeometry []*GeostoreAnchoredGeometryProto `json:"storefrontGeometry,omitempty"` + // StorefrontGeometryModel: Geometry Store ID and materialized geometry + // for a POI feature's storefront(s). + StorefrontGeometryModel *GeostoreGeometryStoreReferenceProto `json:"storefrontGeometryModel,omitempty"` + // SyntheticGeometry: We prefer features that have geometry over those // that do not. In some cases we synthesize geometry (e.g., polygons for // postal codes). This flag is set to indicate features that have such @@ -44105,24 +44176,25 @@ func (s *GeostoreFieldMetadataProto) MarshalJSON() ([]byte, error) { } // GeostoreFieldWithRightsProto: Proto used to represent rights for a -// field type. See go/geo-rights for more details. NOTE: Use +// feature property id. See go/geo-rights for more details. NOTE: Use // google3/geostore/provenance/public/rights.h or // google3/java/com/google/geostore/provenance/rights/Rights.java // instead of accessing this proto directly. type GeostoreFieldWithRightsProto struct { - // AttributeId: ** DEPRECATED ** If field_type is set to - // FEATURE_ATTRIBUTE or KNOWLEDGE_GRAPH_PROPERTY, the attribute ID / KG - // property ID that makes this field with rights complete. + // AttributeId: **DEPRECATED** Never set. AttributeId string `json:"attributeId,omitempty"` + // FeaturePropertyId: The feature property id for which this entry + // tracks rights. FeaturePropertyId *GeostoreFeaturePropertyIdProto `json:"featurePropertyId,omitempty"` - // FieldType: The field type for which the rights level are tracked on. - // The default value here has to match the value of fieldtype::NONE. + // FieldType: **DEPRECATED** The field type for which this entry tracks + // rights. There may be multiple entries for the same field type - + // prefer feature_property_id to uniquely identify a particular entry. FieldType int64 `json:"fieldType,omitempty"` - // MinRightsLevel: The minimum rights level for all the current values - // on the field type. + // MinRightsLevel: The minimum rights level among all current values for + // this feature property id. // // Possible values: // "UNKNOWN_RIGHTS" - Indicates that the rights level is unknown. This @@ -52331,6 +52403,9 @@ type GeostoreSegmentProto struct { // PriorityMetadata: Field-level metadata for the priority. PriorityMetadata *GeostoreFieldMetadataProto `json:"priorityMetadata,omitempty"` + // Ramp: RESERVED + Ramp *GeostoreSegmentProtoRampProto `json:"ramp,omitempty"` + // Restriction: The set of restrictions that apply to this segment. // Restrictions may make a single segment, turn, or more complex // maneuver along a set of segments unroutable for the specified travel @@ -52597,6 +52672,82 @@ func (s *GeostoreSegmentProto) UnmarshalJSON(data []byte) error { return nil } +// GeostoreSegmentProtoRampProto: Encapsulates ramp-specific properties. +type GeostoreSegmentProtoRampProto struct { + // MaxConnectedPriority: The highest priority of any TYPE_ROAD endpoint + // segment which is transitively connected to this ramp via other ramp + // segments. For instance, if we have two roads connected through a + // series of ramps (omitting intersections): Road(P=96)-> Ramp 1 -> Ramp + // 2 -> Ramp 3 -> Road(P=122) -> Road(P=144) The + // `max_connected_priority` of all three intermediary ramps is 122. It's + // not 144, since Road(P=144) is connected through another road, not a + // ramp. This differs from the usual `SegmentProto.priority` field, + // which contains the lowest priority across any connected road segment. + // + // Possible values: + // "PRIORITY_UNKNOWN" - The priority of the segment is unknown. This + // is not actually allowed to be set in MapFacts, but best-practice is + // to have a default 0 value for enums. + // "PRIORITY_NON_TRAFFIC" - A non-traffic segment is not intended for + // normal vehicles, e.g. a pedestrian mall. 0x10 + // "PRIORITY_TERMINAL" - A terminal road is not intended to carry + // through traffic, e.g. a narrow residential street or an access road + // to a point of interest. 0x20 + // "PRIORITY_LOCAL" - A small city street, typically for travel in a + // residential neighborhood, or a small rural road. This is the lowest + // priority suitable for through traffic. 0x30 + // "PRIORITY_MINOR_ARTERIAL" - A moderate-capacity "collector" that + // funnels traffic from local roads towards arterial roads or business + // areas. 0x40 + // "PRIORITY_MAJOR_ARTERIAL" - A high-capacity road that carries large + // volumes of traffic between different neighborhoods or towns. 0x50 + // "PRIORITY_SECONDARY_ROAD" - Roads that act as conduits a) between + // primary highways (and above), or b) from major/minor arterial roads + // to primary highways (and above). They may be state highways, for + // example. 0x60 + // "PRIORITY_PRIMARY_HIGHWAY" - These highways are major preferred + // roads that connect between regions, but that do not have significant + // access restrictions. Most crossings are level grade (traffic light, + // stop sign) and there may be driveways and local roads that connect + // directly to the highway. NOTE: Where a dense network of + // limited/controlled access roads carries most of the traffic between + // regions, this priority may be infrequent. 0x70 + // "PRIORITY_LIMITED_ACCESS" - Limited access highways have some + // access restrictions, but are not fully access controlled. Typically + // driveways and local roads connect to a separate "frontage road" that + // is connected to the highway via spaced traffic lights, interchanges, + // or stop signs. Limited access roads are sometimes called expressways. + // 0x80 + // "PRIORITY_CONTROLLED_ACCESS" - Controlled access highways have + // grade-separated crossings and are accessed exclusively by ramps. They + // are usually called "freeways" or "motorways". 0x90 + MaxConnectedPriority string `json:"maxConnectedPriority,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "MaxConnectedPriority") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MaxConnectedPriority") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GeostoreSegmentProtoRampProto) MarshalJSON() ([]byte, error) { + type NoMethod GeostoreSegmentProtoRampProto + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GeostoreServiceAreaProto: This proto represents the geographic area // served by an establishment. WARNING: This proto is not meant to be // used directly. Please use the provided libraries. @@ -69341,7 +69492,7 @@ func (s *ImageContentStarburstVersionGroup) UnmarshalJSON(data []byte) error { // ImageData: This defines the per-doc data which is extracted from // thumbnails and propagated over to indexing. It contains all -// information that can be used for restricts. Next tag id: 129 +// information that can be used for restricts. Next tag id: 130 type ImageData struct { // AdaboostImageFeaturePorn: Warning: adaboost_image_feature_porn* and // imageFeaturePorn fields are DEPRECATED in favor of brain_porn_scores. @@ -69506,7 +69657,9 @@ type ImageData struct { H2c float64 `json:"h2c,omitempty"` // H2i: 'Hovers to Impressions' and 'Hovers to Clicks' ratios for an - // image. + // image. These are considered Search CPS Personal Data due to concerns + // that they may be used to reidentify or confirm the presence of + // specific singleton (unique) queries. H2i float64 `json:"h2i,omitempty"` // HateLogoDetection: Hate logo detections from the VSS logo_recognition @@ -69598,6 +69751,10 @@ type ImageData struct { LineartDetectorVersion int64 `json:"lineartDetectorVersion,omitempty"` + // LinkinfoType: Bitmask of LinkInfo enum in + // google3/indexing/converter/outlinks/linkinfo.h. + LinkinfoType uint64 `json:"linkinfoType,omitempty,string"` + MultibangKgEntities *ImageDataMultibangEntities `json:"multibangKgEntities,omitempty"` NearDupFeatures string `json:"nearDupFeatures,omitempty"` @@ -71165,7 +71322,7 @@ func (s *ImageRegionsImageRegions) UnmarshalJSON(data []byte) error { return nil } -// ImageRepositoryAmarnaCloudSpeechSignals: Next Tag: 8 +// ImageRepositoryAmarnaCloudSpeechSignals: Next Tag: 9 type ImageRepositoryAmarnaCloudSpeechSignals struct { // DuplicateOfYtS3Asr: If this field is set to true, it means that // Youtube already processed the ASR from S3 for the langID. Please find @@ -71179,12 +71336,15 @@ type ImageRepositoryAmarnaCloudSpeechSignals struct { // Amarna, but it is cleared before stored in Amarna's metadata table. LangWithoutLocale string `json:"langWithoutLocale,omitempty"` - // ModelIdentifier: Identifying which ASR models are used for the result ModelIdentifier string `json:"modelIdentifier,omitempty"` // Results: Raw results from Cloud Speech API Results []*ImageRepositorySpeechRecognitionResult `json:"results,omitempty"` + // S3RecognizerMetadataResponse: The metadata about the S3 recognizer + // used. + S3RecognizerMetadataResponse *ImageRepositoryS3RecognizerMetadataResponse `json:"s3RecognizerMetadataResponse,omitempty"` + // TranscriptAsr: This field contains full (stitched) transcription, // word-level time offset , and word-level byte offset. The value of // this field is derived from the SpeechRecognitionResult field above. @@ -72261,6 +72421,39 @@ func (s *ImageRepositoryS3LangIdSignals) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ImageRepositoryS3RecognizerMetadataResponse: This proto is trimmed +// down from RecognizerMetadataResponse in +// google3/speech/service/s3/services/recognizer/recognizer.proto +type ImageRepositoryS3RecognizerMetadataResponse struct { + Mode string `json:"mode,omitempty"` + + ModelInfoLabel string `json:"modelInfoLabel,omitempty"` + + ServiceName string `json:"serviceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Mode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ImageRepositoryS3RecognizerMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod ImageRepositoryS3RecognizerMetadataResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ImageRepositoryShoppingProductInformation: A message containing // embedding information and localization scores using the VSS product // recognition module. @@ -80340,25 +80533,32 @@ func (s *KeGovernanceTypedRegions) MarshalJSON() ([]byte, error) { // in a slot. If you are thinking of using this, please contact // mrf-team@. type KnowledgeAnswersAnyType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -80376,6 +80576,11 @@ type KnowledgeAnswersAttributeType struct { // with any attribute. Attribute []string `json:"attribute,omitempty"` + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // PivotEntitySlot: If exist, the attribute will be applied on the given // pivot slot. This helps type checking when qrewrite constructs // function calls with an attribute-typed slot. @@ -80411,25 +80616,32 @@ func (s *KnowledgeAnswersAttributeType) MarshalJSON() ([]byte, error) { // KnowledgeAnswersBooleanType: A BooleanType configures a yes/no value. type KnowledgeAnswersBooleanType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -80447,6 +80659,11 @@ type KnowledgeAnswersCollectionType struct { // are specified, this value can be filled with any collection. Collection []string `json:"collection,omitempty"` + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. @@ -80478,25 +80695,32 @@ func (s *KnowledgeAnswersCollectionType) MarshalJSON() ([]byte, error) { // KnowledgeAnswersCompoundType: A CompoundType configures a value // composed of multiple answer values. type KnowledgeAnswersCompoundType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -80533,7 +80757,7 @@ func (s *KnowledgeAnswersContainerType) MarshalJSON() ([]byte, error) { } // KnowledgeAnswersDateType: A DateType configures a value whose type is -// intended to be a date. LINT.IfChange Next id: 16 +// intended to be a date. LINT.IfChange Next id: 17 type KnowledgeAnswersDateType struct { // AllowAllRangeResolutions: If true, will allow all resolutions that // are ranges. @@ -80594,6 +80818,11 @@ type KnowledgeAnswersDateType struct { // "2010"; AllowYearResolution bool `json:"allowYearResolution,omitempty"` + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. @@ -80640,6 +80869,11 @@ func (s *KnowledgeAnswersDateType) MarshalJSON() ([]byte, error) { } type KnowledgeAnswersDependencyType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + ContainerType *KnowledgeAnswersContainerType `json:"containerType,omitempty"` IntersectType *KnowledgeAnswersIntersectType `json:"intersectType,omitempty"` @@ -80653,20 +80887,22 @@ type KnowledgeAnswersDependencyType struct { UnionType *KnowledgeAnswersUnionType `json:"unionType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerType") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -80728,6 +80964,11 @@ func (s *KnowledgeAnswersDialogReferentialResolution) MarshalJSON() ([]byte, err // KnowledgeAnswersDurationType: A DurationType configures a value whose // type is a duration. type KnowledgeAnswersDurationType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // RangeConstraint: Range constraint limits the set of durations // accepted. The values of the range are in milliseconds. Currently, // this constraint is only enforced in Loose Parser. @@ -80738,21 +80979,22 @@ type KnowledgeAnswersDurationType struct { // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "RangeConstraint") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RangeConstraint") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -80767,7 +81009,7 @@ func (s *KnowledgeAnswersDurationType) MarshalJSON() ([]byte, error) { // either the collection(s) to which they belong, or explicitly via a // list of KG-ids. Both collections and ids can be specified, in which // case the type will be the union of the id(s) and all mids within the -// collection(s). Next available tag: 9 +// collection(s). Next available tag: 10 type KnowledgeAnswersEntityType struct { // Collection: This field specifies that containing entity must be: - in // *any* 'collection' if 'in_all_collections' is false (default) - in @@ -80778,6 +81020,11 @@ type KnowledgeAnswersEntityType struct { // induction, which is that the type includes all entities. Collection []string `json:"collection,omitempty"` + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // ExcludedCollection: The entity that this value is filled with must // not be any of these collections (denoted by a /collection/* id). This // restriction does not affect parsing; it is used only to filter @@ -81522,7 +81769,7 @@ func (s *KnowledgeAnswersIntentQueryArgumentProvenanceSearchAnswerValue) Marshal } // KnowledgeAnswersIntentQueryArgumentSignals: A message representing -// the signals associated with an argument. NEXT ID TO USE: 58 For +// the signals associated with an argument. NEXT ID TO USE: 59 For // //depot/google3/logs/proto/knowledge/interpretation/intent_query.proto // // in the "ThenChange", fields under Argument.signals in the serving @@ -81661,6 +81908,626 @@ type KnowledgeAnswersIntentQueryArgumentSignals struct { // signal from lightweight tokens attached to this argument span. LocationMarkersSignals *KnowledgeAnswersIntentQueryLocationMarkersSignals `json:"locationMarkersSignals,omitempty"` + // LocationType: The type category for the location stored in this + // Argument, if it exists. + // + // Possible values: + // "TYPE_ANY" - ABSTRACT + // "TYPE_TRANSPORTATION" - ABSTRACT + // "TYPE_ROUTE" - A route is any section of road (or rails, etc.) that + // has a name. This includes city streets as well as highways. Road + // segments can belong to multiple routes (e.g. El Camino, CA-82). + // "TYPE_DEPRECATED_HIGHWAY_DO_NOT_USE" - DEPRECATED + // "TYPE_HIGHWAY" - ABSTRACT + // "TYPE_HIGHWAY_1" + // "TYPE_HIGHWAY_2" + // "TYPE_HIGHWAY_3" + // "TYPE_HIGHWAY_4" + // "TYPE_HIGHWAY_5" + // "TYPE_HIGHWAY_6" + // "TYPE_HIGHWAY_7" + // "TYPE_HIGHWAY_8" + // "TYPE_HIGHWAY_9" + // "TYPE_BICYCLE_ROUTE" - A designated bicycle route, whose segments + // may consist of any combination of bicycle paths, bicycle lanes, or + // city streets. + // "TYPE_TRAIL" - A designated trail, which may consist of paved + // walkways, dirt paths, fire road, streets or highways, etc. + // "TYPE_SEGMENT" - ABSTRACT + // "TYPE_ROAD" + // "TYPE_RAILWAY" - Railroads use several different incompatible track + // types. + // "TYPE_STANDARD_TRACK" + // "TYPE_JR_TRACK" + // "TYPE_NARROW_TRACK" + // "TYPE_MONORAIL_TRACK" + // "TYPE_SUBWAY_TRACK" + // "TYPE_LIGHT_RAIL_TRACK" + // "TYPE_BROAD_TRACK" + // "TYPE_HIGH_SPEED_RAIL" + // "TYPE_TROLLEY_TRACK" - Tracks for streetcars, cable-cars, etc. + // Ferries are services that are part of the road network but are not + // roads. They typically involve fares and scheduled departure times. + // "TYPE_FERRY" - ABSTRACT + // "TYPE_FERRY_BOAT" - The vast majority of ferries are ferry boats. + // "TYPE_FERRY_TRAIN" - Also called a "car transport", a ferry train + // is a rail service that carries passengers and their vehicles across + // undrivable terrain. The Channel Tunnel ("Chunnel") is the most famous + // example, but they are also common in the Alps where they connect + // neighboring valleys otherwise separated by impassable mountains. + // "TYPE_VIRTUAL_SEGMENT" - Any plausible 1-dimensional path through a + // 2+ dimensional space, for the purposes of making graph-search-based + // routing possible. Such segments can be used to model paths through + // parking lots, squares, floors of buildings and other areas. + // "TYPE_INTERSECTION" - An intersection consists of a collection of + // segments that terminate at the same location. This is topological + // definition: it may not match what a typical user would think of as an + // "intersection". See TYPE_INTERSECTION_GROUP, below, for more + // information. Each segment terminating at an intersection has an + // "endpoint type" that specifies how that segment is terminated: stop + // sign, yield sign, three-way light, etc. + // "TYPE_TRANSIT" - ABSTRACT + // "TYPE_TRANSIT_STATION" - DEPRECATED + // "TYPE_BUS_STATION" - DEPRECATED + // "TYPE_TRAMWAY_STATION" - DEPRECATED + // "TYPE_TRAIN_STATION" - DEPRECATED + // "TYPE_SUBWAY_STATION" - DEPRECATED + // "TYPE_FERRY_TERMINAL" - DEPRECATED + // "TYPE_AIRPORT" - DEPRECATED + // "TYPE_AIRPORT_CIVIL" - DEPRECATED + // "TYPE_AIRPORT_MILITARY" - DEPRECATED + // "TYPE_AIRPORT_MIXED" - DEPRECATED + // "TYPE_HELIPORT" - DEPRECATED + // "TYPE_SEAPLANE_BASE" - DEPRECATED + // "TYPE_AIRSTRIP" - DEPRECATED + // "TYPE_CABLE_CAR_STATION" - DEPRECATED + // "TYPE_GONDOLA_LIFT_STATION" - DEPRECATED + // "TYPE_FUNICULAR_STATION" - DEPRECATED + // "TYPE_SPECIAL_STATION" - DEPRECATED + // "TYPE_HORSE_CARRIAGE_STATION" - DEPRECATED + // "TYPE_MONORAIL_STATION" - DEPRECATED + // "TYPE_SEAPORT" - DEPRECATED + // "TYPE_TRANSIT_STOP" - DEPRECATED + // "TYPE_TRANSIT_TRIP" - DEPRECATED + // "TYPE_TRANSIT_DEPARTURE" - DEPRECATED + // "TYPE_TRANSIT_LEG" - DEPRECATED + // "TYPE_TRANSIT_LINE" - A transit line is a collection of transit + // legs, associated with some invariant properties of the trips that run + // over the legs. See also transitline.proto + // "TYPE_TRANSIT_AGENCY_DEPRECATED_VALUE" - TYPE_TRANSIT_AGENCY was + // moved to 0xC91. This deprecated enum value still exists for debugging + // purposes only. + // "TYPE_TRANSIT_TRANSFER" - DEPRECATED + // "TYPE_SEGMENT_PATH" - ABSTRACT + // "TYPE_ROAD_SIGN" - Road sign features have names, point geometry, + // etc. They also have segment_path data (see below) which lists the + // segments that refer to the sign. See segment.proto for the reference + // from the segment to the road sign. + // "TYPE_INTERSECTION_GROUP" - Our TYPE_INTERSECTION feature, above, + // models the point where one or more segments terminate. This is + // topological definition: it may not match what a typical user would + // think of as an "intersection". Consider the intersections where + // Hayes, Market, Larkin, and 9th Street meet near (37.77765, + // -122.41638) in San Francisco. Most people would probably consider + // this a single feature, even though we model it as four separate + // TYPE_INTERSECTION features. This TYPE_INTERSECTION_GROUP is used to + // model the user's concept of a complex intersection. + // "TYPE_PATHWAY" - RESERVED + // "TYPE_RESTRICTION_GROUP" - A restriction group describes a set of + // segment restrictions that belong together and have a name or an + // associated event. See also restriction_group.proto + // "TYPE_TOLL_CLUSTER" - A toll cluster is either a single point on a + // segment (represented as a point at the end of the segment that has + // ENDPOINT_TOLL_BOOTH set) or a group of points on various road + // segments in MapFacts that represents one or more lanes passing + // through a toll fixture that all go to the same routing destination. + // Each toll cluster should have at most a single price per payment + // method. E.g. {CASH = $5, PASS = $1}. Note: If a toll fixture has + // different prices for multiple routing destinations, drivers need to + // be in the correct lane before passing through the toll fixture and + // hence such a fixture is represented by multiple toll clusters. A toll + // cluster does not necessarily represent a real-world entity, e.g. a + // particular plaza/structure as perceived by humans. This is because a + // plaza can be represented by more than one toll cluster. We require + // toll clusters to have names, but they might be non-unique. For + // example, a plaza might be represented by multiple toll clusters that + // may have the same plaza name. For further details, please see + // go/toll-cluster-schema. + // "TYPE_POLITICAL" - ABSTRACT + // "TYPE_COUNTRY" + // "TYPE_ADMINISTRATIVE_AREA" - ABSTRACT + // "TYPE_ADMINISTRATIVE_AREA1" + // "TYPE_US_STATE" - DEPRECATED + // "TYPE_GB_COUNTRY" - DEPRECATED + // "TYPE_JP_TODOUFUKEN" - DEPRECATED + // "TYPE_ADMINISTRATIVE_AREA2" + // "TYPE_GB_FORMER_POSTAL_COUNTY" - DEPRECATED + // "TYPE_GB_TRADITIONAL_COUNTY" - DEPRECATED + // "TYPE_ADMINISTRATIVE_AREA3" + // "TYPE_ADMINISTRATIVE_AREA4" + // "TYPE_ADMINISTRATIVE_AREA5" + // "TYPE_ADMINISTRATIVE_AREA6" + // "TYPE_ADMINISTRATIVE_AREA7" + // "TYPE_ADMINISTRATIVE_AREA8" + // "TYPE_ADMINISTRATIVE_AREA9" + // "TYPE_COLLOQUIAL_AREA" - e.g. Silicon Valley + // "TYPE_RESERVATION" - A reservation is a region collectively held or + // governed by indigenous people and officially recognized by the + // country’s government at the federal or state level. A reservation + // may be fully contained within an administrative feature or partially + // contained within two or more. These regions are referred to by + // different categorical names depending on country and even by state, + // including but not limited to: “Indian Reservations”, “Indian + // Reserves”, “Land Claim Settlement Lands”, “Indian Lands”, + // “Treaty Lands”, “Indigenous Territories”, etc. A reservation + // is not a historic indigenous territory boundary or a region which has + // applied for land rights but has not yet received official + // recognition. + // "TYPE_LOCALITY" + // "TYPE_GB_POST_TOWN" - DEPRECATED + // "TYPE_JP_GUN" - DEPRECATED + // "TYPE_JP_SHIKUCHOUSON" - DEPRECATED + // "TYPE_JP_SUB_SHIKUCHOUSON" - DEPRECATED + // "TYPE_COLLOQUIAL_CITY" - An entity widely considered to be a city, + // that may itself be made up of smaller political entities, some of + // which are cities/towns/villages themselves. For example, the + // colloquial view of Sydney, Australia actually comprises many smaller + // cities, but is regarded as a city itself. This type is not suitable + // for modeling official metro-/micropolitan or other statistical areas. + // "TYPE_SUBLOCALITY" - ABSTRACT + // "TYPE_US_BOROUGH" - DEPRECATED + // "TYPE_GB_DEPENDENT_LOCALITY" - DEPRECATED + // "TYPE_JP_OOAZA" - DEPRECATED + // "TYPE_JP_KOAZA" - DEPRECATED + // "TYPE_JP_GAIKU" - DEPRECATED + // "TYPE_GB_DOUBLE_DEPENDENT_LOCALITY" - DEPRECATED + // "TYPE_JP_CHIBAN" - DEPRECATED + // "TYPE_JP_EDABAN" - DEPRECATED + // "TYPE_SUBLOCALITY1" + // "TYPE_SUBLOCALITY2" + // "TYPE_SUBLOCALITY3" + // "TYPE_SUBLOCALITY4" + // "TYPE_SUBLOCALITY5" + // "TYPE_NEIGHBORHOOD" + // "TYPE_CONSTITUENCY" + // "TYPE_DESIGNATED_MARKET_AREA" - Designated Market Areas (or DMAs) + // are used by marketing and ratings companies (such as the Nielsen + // Media Research company) to describe geographical regions (such as the + // greater New York metropolitan area) that are covered by a set of + // television stations. (See http://www.schooldata.com/pdfs/DMA.pdf) In + // the United States, DMAs should have a DMA numeric ID name, tagged + // with the FLAG_DESIGNATED_MARKET_AREA_ID flag. + // "TYPE_SCHOOL_DISTRICT" + // "TYPE_LAND_PARCEL" + // "TYPE_DISPUTED_AREA" - Eventually we'll have more data for disputed + // areas (e.g., who makes claims on the area, who has de facto control, + // etc.). For the moment, we just define a type so we can simply mark + // areas as disputed. + // "TYPE_POLICE_JURISDICTION" - Boundaries representing the + // jurisdiction of a particular police station. + // "TYPE_STATISTICAL_AREA" - An area used for aggregating statistical + // data, eg, a census region. Note that TYPE_STATISTICAL_AREA has a + // third nibble so we can add an abstract parent above it later if need + // be at 0x2E1 (and rename TYPE_STATISTICAL_AREA as + // TYPE_STATISTICAL_AREA1). + // "TYPE_CONSTITUENCY_FUTURE" - DEPRECATED + // "TYPE_PARK" - DEPRECATED + // "TYPE_GOLF_COURSE" - DEPRECATED + // "TYPE_LOCAL_PARK" - DEPRECATED + // "TYPE_NATIONAL_PARK" - DEPRECATED + // "TYPE_US_NATIONAL_PARK" - DEPRECATED + // "TYPE_US_NATIONAL_MONUMENT" - DEPRECATED + // "TYPE_NATIONAL_FOREST" - DEPRECATED + // "TYPE_PROVINCIAL_PARK" - DEPRECATED + // "TYPE_PROVINCIAL_FOREST" - DEPRECATED + // "TYPE_CAMPGROUNDS" - DEPRECATED + // "TYPE_HIKING_AREA" - DEPRECATED + // "TYPE_BUSINESS" - DEPRECATED + // "TYPE_GOVERNMENT" - DEPRECATED + // "TYPE_BORDER_CROSSING" - DEPRECATED + // "TYPE_CITY_HALL" - DEPRECATED + // "TYPE_COURTHOUSE" - DEPRECATED + // "TYPE_EMBASSY" - DEPRECATED + // "TYPE_LIBRARY" - DEPRECATED + // "TYPE_SCHOOL" - DEPRECATED + // "TYPE_UNIVERSITY" - DEPRECATED + // "TYPE_EMERGENCY" - DEPRECATED + // "TYPE_HOSPITAL" - DEPRECATED + // "TYPE_PHARMACY" - DEPRECATED + // "TYPE_POLICE" - DEPRECATED + // "TYPE_FIRE" - DEPRECATED + // "TYPE_DOCTOR" - DEPRECATED + // "TYPE_DENTIST" - DEPRECATED + // "TYPE_VETERINARIAN" - DEPRECATED + // "TYPE_TRAVEL_SERVICE" - DEPRECATED + // "TYPE_LODGING" - DEPRECATED + // "TYPE_RESTAURANT" - DEPRECATED + // "TYPE_GAS_STATION" - DEPRECATED + // "TYPE_PARKING" - DEPRECATED + // "TYPE_POST_OFFICE" - DEPRECATED + // "TYPE_REST_AREA" - DEPRECATED + // "TYPE_CASH_MACHINE" - DEPRECATED + // "TYPE_CAR_RENTAL" - DEPRECATED + // "TYPE_CAR_REPAIR" - DEPRECATED + // "TYPE_SHOPPING" - DEPRECATED + // "TYPE_GROCERY" - DEPRECATED + // "TYPE_TOURIST_DESTINATION" - DEPRECATED + // "TYPE_ECO_TOURIST_DESTINATION" - DEPRECATED + // "TYPE_BIRD_WATCHING" - DEPRECATED + // "TYPE_FISHING" - DEPRECATED + // "TYPE_HUNTING" - DEPRECATED + // "TYPE_NATURE_RESERVE" - DEPRECATED + // "TYPE_TEMPLE" - DEPRECATED + // "TYPE_CHURCH" - DEPRECATED + // "TYPE_GURUDWARA" - DEPRECATED + // "TYPE_HINDU_TEMPLE" - DEPRECATED + // "TYPE_MOSQUE" - DEPRECATED + // "TYPE_SYNAGOGUE" - DEPRECATED + // "TYPE_STADIUM" - DEPRECATED + // "TYPE_BAR" - DEPRECATED + // "TYPE_MOVIE_RENTAL" - DEPRECATED + // "TYPE_COFFEE" - DEPRECATED + // "TYPE_GOLF" - DEPRECATED + // "TYPE_BANK" - DEPRECATED + // "TYPE_DOODLE" - DEPRECATED + // "TYPE_GROUNDS" - DEPRECATED + // "TYPE_AIRPORT_GROUNDS" - DEPRECATED + // "TYPE_BUILDING_GROUNDS" - DEPRECATED + // "TYPE_CEMETERY" - DEPRECATED + // "TYPE_HOSPITAL_GROUNDS" - DEPRECATED + // "TYPE_INDUSTRIAL" - DEPRECATED + // "TYPE_MILITARY" - DEPRECATED + // "TYPE_SHOPPING_CENTER" - DEPRECATED + // "TYPE_SPORTS_COMPLEX" - DEPRECATED + // "TYPE_UNIVERSITY_GROUNDS" - DEPRECATED + // "TYPE_DEPRECATED_TARMAC" - DEPRECATED + // "TYPE_ENCLOSED_TRAFFIC_AREA" - DEPRECATED + // "TYPE_PARKING_LOT" - DEPRECATED + // "TYPE_PARKING_GARAGE" - DEPRECATED + // "TYPE_OFF_ROAD_AREA" - DEPRECATED + // "TYPE_BORDER" - A line representing the boundary between two + // features. See border.proto for details. + // "TYPE_BUILDING" - DEPRECATED + // "TYPE_GEOCODED_ADDRESS" - An association of a point with an + // address, with no other information. + // "TYPE_NATURAL_FEATURE" - ABSTRACT + // "TYPE_TERRAIN" - Expanses of land that share common surface + // attributes. These areas would look more or less uniform from a high + // altitude. + // "TYPE_SAND" + // "TYPE_BEACH" + // "TYPE_DUNE" + // "TYPE_ROCKY" + // "TYPE_ICE" + // "TYPE_GLACIER" + // "TYPE_BUILT_UP_AREA" - Terrain that looks populated. + // "TYPE_VEGETATION" - Terrain that is covered in vegetation. + // "TYPE_SHRUBBERY" + // "TYPE_WOODS" + // "TYPE_AGRICULTURAL" + // "TYPE_GRASSLAND" + // "TYPE_TUNDRA" + // "TYPE_DESERT" + // "TYPE_SALT_FLAT" - A flat expanse of salt left by the evaporation + // of a body of salt water. + // "TYPE_WATER" - Features can be TYPE_WATER if we don't have enough + // information to properly type the body of water. TYPE_WATER is also + // used as the type for child features that compose a TYPE_RIVER + // feature. + // "TYPE_OCEAN" - One of the large salt-water bodies that covers most + // of the globe. + // "TYPE_BAY" - An ocean subdivision formed by a coastal indentation. + // Includes coves and gulfs. + // "TYPE_BIGHT" - An open body of water formed by a slight coastal + // indentation. + // "TYPE_LAGOON" + // "TYPE_SEA" - An ocean subdivision more or less confined by land and + // islands. + // "TYPE_STRAIT" - A long narrow ocean subdivision. Includes sounds. + // "TYPE_INLET" + // "TYPE_FJORD" + // "TYPE_LAKE" - An inland body of standing water. + // "TYPE_SEASONAL_LAKE" - A lake that dries up part of the year. + // "TYPE_RESERVOIR" - An artificial body of water, possibly created by + // a dam, often used for irrigation or house use. + // "TYPE_POND" + // "TYPE_RIVER" - An inland body of moving water, or parts associated + // with it in which there is little or no current (backwater). + // "TYPE_RAPIDS" + // "TYPE_DISTRIBUTARY" - A branch which flows away from the main + // river. Includes deltas. + // "TYPE_CONFLUENCE" - A place where two or more rivers join. + // "TYPE_WATERFALL" + // "TYPE_SPRING" - A place where ground water flows naturally out of + // the ground. + // "TYPE_GEYSER" + // "TYPE_HOT_SPRING" + // "TYPE_SEASONAL_RIVER" - A river that dries up part of the year. + // "TYPE_WADI" - A dry riverbed that occasionally receives + // flashfloods. + // "TYPE_ESTUARY" - A place at the end of a river where fresh and salt + // water mix. Includes tidal creeks and limans. + // "TYPE_WETLAND" - Land that is usually flooded. Includes bogs, + // marshes, flats, moors, and swamps. + // "TYPE_WATER_NAVIGATION" + // "TYPE_FORD" - A shallow place where water may be waded through. + // "TYPE_CANAL" - A narrow passage used by boats. Normally artificial. + // "TYPE_HARBOR" - A deep place near a shore where ships commonly drop + // anchor. + // "TYPE_CHANNEL" - A deep part in a body of water that is suitable + // for navigation. Includes narrows. + // "TYPE_REEF" - Rocks, coral, sandbars, or other features beneath the + // surface of the water that pose a hazard to passing ships. Includes + // shoals. + // "TYPE_REEF_FLAT" - A relatively shallow zone of the back reef + // located closest to the shore, that may be exposed at low tide. + // "TYPE_REEF_GROWTH" - A small section of rocks, coral, sandbars, or + // other features beneath the surface of the water that forms part of a + // reef. + // "TYPE_REEF_EXTENT" - The full extent of the reef complex. + // "TYPE_REEF_ROCK_SUBMERGED" - A submerged rock in the water. + // "TYPE_IRRIGATION" - Man-made (and sometimes natural) channels used + // to move water. This type was used for both dam structures and water + // that is hold back by dams. We should use TYPE_COMPOUND_BUILDING for + // dam structures and TYPE_RESERVOIR for water. + // "TYPE_DAM" - DEPRECATED + // "TYPE_DRINKING_WATER" + // "TYPE_CURRENT" - Includes overfalls. + // "TYPE_WATERING_HOLE" - A natural depression filled with water where + // animals come to drink. + // "TYPE_TECTONIC" - ABSTRACT This type is incorrectly under + // TYPE_TECTONIC instead of TYPE_WATER. This was a mistake and is now + // fixed. See TYPE_WATERING_HOLE for the replacement. + // "TYPE_WATERING_HOLE_DEPRECATED" - DEPRECATED + // "TYPE_VOLCANO" + // "TYPE_LAVA_FIELD" + // "TYPE_FISSURE" + // "TYPE_FAULT" + // "TYPE_LAND_MASS" + // "TYPE_CONTINENT" + // "TYPE_ISLAND" + // "TYPE_ATOLL" + // "TYPE_OCEAN_ROCK_EXPOSED" - An exposed rock in the water. + // "TYPE_CAY" - A small, low-elevation, sandy island formed on the + // surface of coral reefs + // "TYPE_PENINSULA" - A stretch of land projecting into water. + // Includes capes and spits. + // "TYPE_ISTHMUS" - A strip of land connecting two larger land masses, + // such as continents. + // "TYPE_ELEVATED" - Features that are notable for being high (or + // low), or for having sudden changes in elevation. These features might + // have an "elevation" extension to specify the actual elevation. See + // ElevationProto for more information. + // "TYPE_PEAK" - Elevations that have a distinctive peak. + // "TYPE_NUNATAK" - A peak or ridge of a mountain that extends through + // a glacier. + // "TYPE_SPUR" - A subsidiary peak of a mountain. + // "TYPE_PASS" - A route over an otherwise difficult to traverse + // feature. Includes saddle. + // "TYPE_PLATEAU" - Elevations that are flat on top. Includes mesas + // and buttes. + // "TYPE_RIDGE" - A ridge is a geographical feature consisting of a + // chain of mountains or hills that form a continuous elevated crest + // with a single ridgeline for some distance. + // "TYPE_RAVINE" - Steep declines usually carved by erosion. Includes + // valleys, canyons, ditches, and gorges. + // "TYPE_CRATER" - Depressions causes by impact, explosion, and + // sometimes sink-holes. + // "TYPE_KARST" - Topography formed on limestone and gypsum by + // dissolution with sinkholes, caves, etc. + // "TYPE_CLIFF" - A vertical or nearly vertical slope. Includes + // escarpments. + // "TYPE_VISTA" - An elevated place that is notable for having a good + // view. Raster digital elevation data. This is not a type to be used by + // providers or consumed by clients. + // "TYPE_DIGITAL_ELEVATION_MODEL" - RESERVED + // "TYPE_UPLAND" - Land along streams higher than the alluvial plain + // or stream terrace. + // "TYPE_TERRACE" + // "TYPE_SLOPE" - Land not so steep as a cliff, but changing + // elevation. Includes slides. + // "TYPE_CONTOUR_LINE" - All the points on the polygon are at the same + // elevation. + // "TYPE_PAN" - A near-level shallow, natural depression or basin, + // usually containing an intermittent lake, pond, or pool. + // "TYPE_UNSTABLE_HILLSIDE" + // "TYPE_MOUNTAIN_RANGE" - A series of mountains or hills ranged in a + // line and connected by high ground. Mountain ranges usually consist of + // many smaller ridges. For example, the Himalayas, the Andes. the Alps, + // etc. + // "TYPE_UNDERSEA" - Features that are notable for being high (or + // low), or for having sudden changes in elevation. These features might + // have an "elevation" extension to specify the actual elevation. See + // ElevationProto for more information. + // "TYPE_SUBMARINE_SEAMOUNT" - includes peaks, ranges, and spurs + // "TYPE_SUBMARINE_RIDGE" + // "TYPE_SUBMARINE_GAP" - includes saddles + // "TYPE_SUBMARINE_PLATEAU" + // "TYPE_SUBMARINE_DEEP" + // "TYPE_SUBMARINE_VALLEY" - includes trenches and troughs + // "TYPE_SUBMARINE_BASIN" + // "TYPE_SUBMARINE_SLOPE" + // "TYPE_SUBMARINE_CLIFF" + // "TYPE_SUBMARINE_PLAIN" + // "TYPE_SUBMARINE_FRACTURE_ZONE" + // "TYPE_CAVE" - Don't use 0xA7. Use 8 bits for additional types under + // TYPE_NATURAL_FEATURE, so we don't run out of space. The following are + // miscellaneous natural features that don't fit any of the categories + // above. + // "TYPE_ROCK" + // "TYPE_ARCHIPELAGO" - A feature representing a group or chain of + // islands. + // "TYPE_POSTAL" - ABSTRACT + // "TYPE_POSTAL_CODE" - This is the type for postal codes which are + // complete and independent enough that there should be a feature for + // them (e.g. US 5-digit ZIP codes). For even more detailed suffixes + // that further subdivide a postal code (such as the +4 component in US + // ZIP codes), store the information in a TYPE_POSTAL_CODE_SUFFIX + // address component. When a range or set of postal codes share the same + // geographical area, e.g. because a precise subdivision does not exist + // or this subdivision is unknown, this type is used for each individual + // postal code. + // "TYPE_POSTAL_CODE_PREFIX" - A prefix portion of a postal code which + // does not meet the requirements for TYPE_POSTAL_CODE, but which is + // useful to search for, for example UK outcodes. + // "TYPE_PREMISE" - DEPRECATED + // "TYPE_SUB_PREMISE" - DEPRECATED This is deprecated and we want to + // use TYPE_COMPOUND_SECTION instead. + // "TYPE_SUITE" - DEPRECATED + // "TYPE_POST_TOWN" - The term "post town" is used for a + // locality-like-entity that is only used for postal addresses. + // "TYPE_POSTAL_ROUND" - DEPRECATED + // "TYPE_META_FEATURE" - ABSTRACT + // "TYPE_DATA_SOURCE" - Every data source used in constructing a data + // repository has a corresponding feature that provides more information + // about that data source. The extra information is stored in the + // optional data_source field below. + // "TYPE_LOCALE" - A locale feature provides region specific + // conventions such as preferred language and formatting details for + // time, date, and currency values. Locales aren't necessary defined by + // physical geographic features, so they are classified as + // meta-features. + // "TYPE_TIMEZONE" - A timezone feature is used to specify the region + // covering an international timezone. When a point is covered by + // multiple timezone features, the most specific one can be used to + // compute the local time at this point. Most specific implies a much + // smaller region or the one that is closer to the center. A feature's + // timezone can be specified in the repeated related_timezone field. + // "TYPE_BUSINESS_CHAIN" - A business chain feature is used to + // represent a chain, e.g. Starbucks, McDonald's, etc. Other features + // representing specific stores/franchises of this chain may refer to + // one such feature via RELATION_MEMBER_OF_CHAIN. This is not strictly + // reserved to commercial chains but can also be used to model + // organizations such as the Red Cross or the United Nations. + // "TYPE_PHONE_NUMBER_PREFIX" - A phone number prefix feature is used + // to specify the region where phone numbers (typically fixed-line + // numbers) must begin with a certain prefix. Any phone number prefix + // down to any level of granularity could be represented by this type. + // "TYPE_PHONE_NUMBER_AREA_CODE" - A phone number area code is a + // prefix which also coincides with the area code, or national + // destination code, of a particular region. + // "TYPE_BUSINESS_CORRIDOR" - A Business Corridor is a dense cluster + // of semantically similar establishments. TYPE_BUSINESS_CORRIDOR + // features are distinguished from TYPE_COLLOQUIAL_AREA features because + // the corridors are not under the political hierarchy, are allowed to + // be nameless, and may not correspond to well-known real world + // locations. For more details, see go/geo-corridors-schema. + // "TYPE_ADDRESS_TEMPLATE" - An address template feature provides + // region-specific conventions for structuring addresses. These features + // aren't necessarily defined by physical geographic features, so they + // are classified as meta-features. + // "TYPE_TRANSIT_AGENCY" - A transit agency operates a number of + // lines, typically all in the same city, region or country. See also + // transitagency.proto + // "TYPE_FUTURE_GEOMETRY" - A feature whose geometry is planned to + // replace the geometry on another feature. + // "TYPE_EVENT" - DEPRECATED + // "TYPE_EARTHQUAKE" - DEPRECATED + // "TYPE_HURRICANE" - DEPRECATED + // "TYPE_WEATHER_CONDITION" - DEPRECATED + // "TYPE_TRANSIENT" - RESERVED + // "TYPE_ENTRANCE" - A portal of entry or exit to another feature. + // Examples: - Subway station entrance. - Parking lot entrance. + // "TYPE_CARTOGRAPHIC" - Cartographic features are used to capture + // real-world objects for which there is no current desire to model any + // specific attributes. These are only useful to make the map tiles look + // pretty. + // "TYPE_HIGH_TENSION" - DEPRECATED + // "TYPE_SKI_TRAIL" - Also see skitrail.proto + // "TYPE_SKI_LIFT" - Also see skilift.proto + // "TYPE_SKI_BOUNDARY" - Also see skiboundary.proto + // "TYPE_WATERSHED_BOUNDARY" + // "TYPE_TARMAC" - Starting with TYPE_TARMAC, we use longer IDs, so + // that we can expand the number of feature types under + // TYPE_CARTOGRAPHIC. + // "TYPE_WALL" - Use TYPE_COMPOUND_GROUND and appropriate gcids for + // the next two. + // "TYPE_PICNIC_AREA" - DEPRECATED + // "TYPE_PLAY_GROUND" - DEPRECATED + // "TYPE_TRAIL_HEAD" + // "TYPE_GOLF_TEEING_GROUND" - Sub-types within a golf course. + // "TYPE_GOLF_PUTTING_GREEN" + // "TYPE_GOLF_ROUGH" + // "TYPE_GOLF_SAND_BUNKER" + // "TYPE_GOLF_FAIRWAY" + // "TYPE_GOLF_HOLE" - Use TYPE_ESTABLISHMENT_POI and gcid:golf_shop + // for golf shops instead. + // "TYPE_DEPRECATED_GOLF_SHOP" - DEPRECATED + // "TYPE_CAMPING_SITE" - DEPRECATED + // "TYPE_DESIGNATED_BARBECUE_PIT" + // "TYPE_DESIGNATED_COOKING_AREA" + // "TYPE_CAMPFIRE_PIT" + // "TYPE_WATER_FOUNTAIN" + // "TYPE_LITTER_RECEPTACLE" + // "TYPE_LOCKER_AREA" + // "TYPE_ANIMAL_ENCLOSURE" - Subtype within a zoo - a cage or + // fenced-off or otherwise delineated area containing animals. + // "TYPE_CARTOGRAPHIC_LINE" - A line for a cartographic detail. For + // example the international date line. Such features should have + // polyline geometry. + // "TYPE_ESTABLISHMENT" - ABSTRACT This type is being replaced by + // TYPE_COMPOUND_GROUNDS. For further details, see go/compounds-v2 + // "TYPE_ESTABLISHMENT_GROUNDS" - DEPRECATED This type has been + // replaced by TYPE_COMPOUND_BUILDING. For further details, see + // go/oyster-compounds + // "TYPE_ESTABLISHMENT_BUILDING" - DEPRECATED + // "TYPE_ESTABLISHMENT_POI" - An establishment which has a address + // (a.k.a. location or storefront). Note that it *may* also have a + // service area (e.g. a restaurant that offers both dine-in and + // delivery). This type of business is also known as a "hybrid" Service + // Area Business. Establishment POIs can be referenced by TYPE_COMPOUND + // features using the RELATION_PRIMARILY_OCCUPIED_BY. This is the + // reciprocal relation of the RELATION_OCCUPIES. + // "TYPE_ESTABLISHMENT_SERVICE" - A business without a storefront, + // e.g. a plumber. It would normally not have a place that a customer + // could visit to receive service, but it would have an area served by + // the business. Also known as a "pure" Service Area Business. + // NOTE(tcain): Using value 0xD441, since we could find ourselves with a + // need to differentiate service areas from online-only at this level in + // the future, but still benefit from being able to group those under a + // common parent, disjoint from TYPE_ESTABLISHMENT_POI. + // "TYPE_CELESTIAL" - The root of types of features that are in the + // sky, rather than on the earth. There will eventually be a hierarchy + // of types here. + // "TYPE_ROAD_MONITOR" - Features responsible for monitoring traffic + // on roads (usually for speed). Includes cameras at particular points + // as well as monitors that cover larger spans. Features of this type + // should have a corresponding gcid that specifies the correct subtype + // (e.g. gcid:road_camera or gcid:speed_camera_zone). This type was + // originally named as TYPE_ROAD_CAMERA. + // "TYPE_PUBLIC_SPACES_AND_MONUMENTS" - ABSTRACT + // "TYPE_STATUE" - Note that this type does not distinguish the nature + // of the statue (religious, historical, memorial, tourist, ...). + // "TYPE_TOWN_SQUARE" - Open space used for events, gathering, or as + // market-place. + // "TYPE_LEVEL" - A feature used to represent a logical level, e.g. + // floor. + // "TYPE_COMPOUND" - ABSTRACT + // "TYPE_COMPOUND_GROUNDS" - e.g. campus, compound, parcel. + // "TYPE_COMPOUND_BUILDING" - e.g. single family dwelling, office + // building. + // "TYPE_COMPOUND_SECTION" - e.g. suite, room, hallway, cubicle. + // "TYPE_TERMINAL_POINT" - A terminal point represents a good location + // for a user to meet a taxi, ridesharing vehicle, or general driver. + // "TYPE_REGULATED_AREA" - An area controlled in some way by an + // authoritative source, such as a government-designated COVID + // containment zone or an area under government sanctions. Features of + // this type should have one or more gcids corresponding to their + // specific regulation, and client handling of these features may vary + // based on the type of regulation. + // "TYPE_LOGICAL_BORDER" - A grouping of TYPE_BORDER features ("border + // segments"), which together represent a border between two features of + // the same type. + // "TYPE_DO_NOT_USE_RESERVED_TO_CATCH_GENERATED_FILES" - DEPRECATED + // "TYPE_UNKNOWN" - A feature of completely unknown type. This should + // only be used when absolutely necessary. One example in which this + // type is useful is in the Chinese importer, which must heuristically + // segment addresses into components - it often does not know what types + // to make those components. Please note that the Oyster address + // formatter does not currently support address components of + // TYPE_UNKNOWN well. + LocationType string `json:"locationType,omitempty"` + // MediaEntitySignals: Signals about the media entity for this argument. MediaEntitySignals *KnowledgeAnswersIntentQueryMediaEntitySignals `json:"mediaEntitySignals,omitempty"` @@ -82333,7 +83200,7 @@ func (s *KnowledgeAnswersIntentQueryFunctionCall) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// KnowledgeAnswersIntentQueryFunctionCallSignals: Next ID: 37 +// KnowledgeAnswersIntentQueryFunctionCallSignals: Next ID: 38 type KnowledgeAnswersIntentQueryFunctionCallSignals struct { // ArgumentComposingMid: The argument mid that was used to compose the // entity for a concept interpretation, along with the @@ -82423,6 +83290,11 @@ type KnowledgeAnswersIntentQueryFunctionCallSignals struct { // generated from the neural categorical parser. IsNeuralCategoricalInterpretation bool `json:"isNeuralCategoricalInterpretation,omitempty"` + // IsRefinedMeaning: Whether the FunctionCall is created as a + // refined_meaning in resolution. Downstream code will look at this + // field to see if it needs to create a new refined QueryInterpretation. + IsRefinedMeaning bool `json:"isRefinedMeaning,omitempty"` + // IsUiCompositionIntent: Denotes this is a sub-intent used for // composing an Assistant UI response. The assistant dialog should // output ui_composition_shelf in the SystemResponse if it can fulfill @@ -84356,25 +85228,32 @@ func (s *KnowledgeAnswersMeaningSchemaSlotKey) MarshalJSON() ([]byte, error) { // measurement is yet to be supported (or instead we should universally // use SemanticType). type KnowledgeAnswersMeasurementType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -84395,6 +85274,11 @@ func (s *KnowledgeAnswersMeasurementType) MarshalJSON() ([]byte, error) { // question semantics, you should remove the slot. Use additional // query_examples instead. type KnowledgeAnswersNormalizedStringType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + NormalizedValue []string `json:"normalizedValue,omitempty"` // Remodelings: Contains data about current schema remodelings at this @@ -84402,21 +85286,22 @@ type KnowledgeAnswersNormalizedStringType struct { // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "NormalizedValue") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NormalizedValue") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -84429,6 +85314,11 @@ func (s *KnowledgeAnswersNormalizedStringType) MarshalJSON() ([]byte, error) { // KnowledgeAnswersNumberType: A NumberType configures a value whose // type is intended to be numeric. type KnowledgeAnswersNumberType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // KeepAsString: If true, the semantics of the NumberType argument are // retained as a string, rather than being converted to a float-type // object. This option is particularly useful in cases where leading 0s @@ -84461,20 +85351,22 @@ type KnowledgeAnswersNumberType struct { // "FLOAT" - This matches ONLY floating-point numbers. SubType []string `json:"subType,omitempty"` - // ForceSendFields is a list of field names (e.g. "KeepAsString") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KeepAsString") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -84526,21 +85418,6 @@ type KnowledgeAnswersOpaqueDeviceUserIdentityType struct { type KnowledgeAnswersOpaqueHomeAutomationDeviceType struct { } -// KnowledgeAnswersOpaqueLocationType: A LocationType configures a value -// whose type is a Location message, for example, the output of the -// Location subgrammar. Note that this location type is not the same as -// a "location entity" (an entity with a location indicating -// type/collection, which is annotated by QRef). The scope of a -// LocationType is usually broader than a location entity, it may -// represent - businesses, places, and POIs (location entities from -// QRef) - addresses ("123 Main St., New York, NY") or even just -// coordinates (latitude, longitude) - business categories (e.g., -// "pharmacies" or "gas stations") - SAFT locations - aliases (including -// "home" and "work") - contacts - combinations of a location with -// modifiers and constraints (e.g., "chinese restaurant near me" or -// "cheap kid-friendly hotels") - ungrounded locations produced by -// ungrounded_location model See go/location-type for the details of the -// location proto output by location subgrammar. type KnowledgeAnswersOpaqueLocationType struct { } @@ -84610,7 +85487,7 @@ type KnowledgeAnswersOpaqueTimerType struct { // any fields to these messages, make them non-opaque and implement all // of the code to treat them as first class types. It is allowable for a // value to have more than one of the opaque types. See -// http://go/opaque-type-for-value-type. LINT.IfChange Next Id: 31 +// http://go/opaque-type-for-value-type. LINT.IfChange Next Id: 32 type KnowledgeAnswersOpaqueType struct { AogType *KnowledgeAnswersOpaqueAogType `json:"aogType,omitempty"` @@ -84628,6 +85505,11 @@ type KnowledgeAnswersOpaqueType struct { ComponentReferenceType *KnowledgeAnswersOpaqueComponentReferenceIndexType `json:"componentReferenceType,omitempty"` + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + DeviceIdType *KnowledgeAnswersOpaqueDeviceIdType `json:"deviceIdType,omitempty"` DeviceType *KnowledgeAnswersOpaqueDeviceType `json:"deviceType,omitempty"` @@ -84708,6 +85590,11 @@ func (s *KnowledgeAnswersOpaqueType) MarshalJSON() ([]byte, error) { // plexity specification to a different place in the intent protos in // future. type KnowledgeAnswersPlexityRequirement struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. @@ -84730,20 +85617,22 @@ type KnowledgeAnswersPlexityRequirement struct { // magazine], [buy everything grimm wrote]. SimplePlexity string `json:"simplePlexity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -84756,25 +85645,32 @@ func (s *KnowledgeAnswersPlexityRequirement) MarshalJSON() ([]byte, error) { // KnowledgeAnswersPolarQuestionType: A special type representing a // polar question. type KnowledgeAnswersPolarQuestionType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -84899,6 +85795,11 @@ type KnowledgeAnswersSemanticType struct { // explicit answer_type, the 'self' semantic_type is not considered. AllowAll bool `json:"allowAll,omitempty"` + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // IncludesContainingIntent: Determines whether or not the meaning // schema that contains this semantic_type conforms to a function call // with the name and arguments taken from the meaning schema. As it @@ -84926,6 +85827,10 @@ type KnowledgeAnswersSemanticType struct { // or an intent). Name []string `json:"name,omitempty"` + // NameContracts: Like `name_remodelings`, but for + // ComponentSpecificContracts instead of remodelings. + NameContracts []*NlpMeaningSemanticTypeNameComponentSpecificContracts `json:"nameContracts,omitempty"` + // NameRemodelings: Contains data about current schema remodelings at // the SemanticType name level. The "name" field contains all possible // semantic type names and "semantic_type_name_remodelings" acts as an @@ -84935,7 +85840,7 @@ type KnowledgeAnswersSemanticType struct { NameRemodelings []*NlpMeaningSemanticTypeNameMeaningRemodelings `json:"nameRemodelings,omitempty"` // Remodelings: Contains data about current schema remodelings at this - // ValueType level. For more information see + // ValueType lev©el. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` @@ -85541,25 +86446,32 @@ func (s *KnowledgeAnswersSensitivityStoragePolicy) MarshalJSON() ([]byte, error) // semantic_type { name: "StateOfAffairs" } but we (mrf-team) will // encourage clients to migrate to this new type. type KnowledgeAnswersStateOfAffairsType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -85572,6 +86484,11 @@ func (s *KnowledgeAnswersStateOfAffairsType) MarshalJSON() ([]byte, error) { // KnowledgeAnswersStringType: A StringType configures a value whose // type is intended to be arbitrary text. type KnowledgeAnswersStringType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. @@ -85581,20 +86498,22 @@ type KnowledgeAnswersStringType struct { // this value will match any nonzero number of tokens. SingleToken bool `json:"singleToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -85607,25 +86526,32 @@ func (s *KnowledgeAnswersStringType) MarshalJSON() ([]byte, error) { // KnowledgeAnswersTimeZoneType: A TimeZoneType configures a value whose // type is a timezone. type KnowledgeAnswersTimeZoneType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -85638,25 +86564,32 @@ func (s *KnowledgeAnswersTimeZoneType) MarshalJSON() ([]byte, error) { // KnowledgeAnswersTrackingNumberType: A TrackingNumberType configures a // value whose type is a TrackingNumber. type KnowledgeAnswersTrackingNumberType struct { + // ComponentSpecificContracts: Contains data about the contracts that + // this ValueType level is available for. For more information see + // go/contract-based-conformance. + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + // Remodelings: Contains data about current schema remodelings at this // ValueType level. For more information see // go/meaning-remodeling-framework. Remodelings *NlpMeaningMeaningRemodelings `json:"remodelings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Remodelings") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Remodelings") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -89805,6 +90738,42 @@ func (s *NetFabricRpcVirtualNetworkId) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NlpMeaningComponentSpecificContracts: A Component-Specific Contract +// is a proto message that can be placed on various elements of the +// MeaningCatalog (intent schemas, slots, types) that signals whether +// that element is part of the contract for a given component. +// go/contract-based-conformance +type NlpMeaningComponentSpecificContracts struct { + // Possible values: + // "UNSPECIFIED" - The unspecified contract is synonymous with LWA. + // "P2_LWA" + ComponentSpecificContracts []string `json:"componentSpecificContracts,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NlpMeaningComponentSpecificContracts) MarshalJSON() ([]byte, error) { + type NoMethod NlpMeaningComponentSpecificContracts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type NlpMeaningMeaningRemodeling struct { // Deletion: This field can be set to true to indicate that the // associated part of the schema is being deleted as part of the @@ -89896,6 +90865,41 @@ func (s *NlpMeaningMeaningRemodelings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NlpMeaningSemanticTypeNameComponentSpecificContracts: +// Component-Specific Contract for SemanticTypes, which are atomic +// string values (and thus can't have a ComponentSpecificContracts +// message attached to them). go/contract-based-conformance +type NlpMeaningSemanticTypeNameComponentSpecificContracts struct { + ComponentSpecificContracts *NlpMeaningComponentSpecificContracts `json:"componentSpecificContracts,omitempty"` + + // Name: Semantic type name. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ComponentSpecificContracts") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ComponentSpecificContracts") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NlpMeaningSemanticTypeNameComponentSpecificContracts) MarshalJSON() ([]byte, error) { + type NoMethod NlpMeaningSemanticTypeNameComponentSpecificContracts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NlpMeaningSemanticTypeNameMeaningRemodelings: Associates remodeling // data with a semantic type name. type NlpMeaningSemanticTypeNameMeaningRemodelings struct { @@ -105068,6 +106072,10 @@ type PeoplestackFlexorgsProtoInternalExternal struct { // engagements-eng@google.com // "CLOUDCONNECT" - Cloudconnect Team contact: // rev-platforms@google.com + // "PERSONAL_AGENT" - Personal Agent Team contact: + // page-1-eng@google.com + // "MOBILE_HARNESS" - Mobile Harness Team contact: + // omnilab-lmp@google.com // "DEPRECATED_QUICKSTART_FLUME" // "DUO_CLIENT" - Duo Client Team contact: duo-eng@google.com // "ALBERT" - Project albert (go/albert-frontend) Team contact: @@ -105436,7 +106444,7 @@ type PeoplestackFlexorgsProtoInternalExternal struct { // "GLOSSARY_MANAGER" - Glossary Manager Team contact: // tm-team-core@google.com // "UPGRADEPARTY" - Google Growth - UpgradeParty go/upgradeparty Team - // contact: google-growth-eng@google.com + // contact: google-growth-android-eng@google.com // "ONEDEV_WORKFLOW" - Onedev Workflow Team contact: // one-developer-workflow+people-stack@google.com // "AVALANCHE" - Avalanche Team contact: cpe-surveys-eng@google.com @@ -106936,6 +107944,14 @@ type PersonalizationMapsAliasIcon struct { // Point: lat/lng the icon is to be shown at. Point *GeostorePointProto `json:"point,omitempty"` + // Ptoken: Encapsulates the privacy policy relevant signals for this + // event. See go/kansas-embedded-ptokens for additional details. Keep + // the type fully qualified in case (when) we decide to make proto + // compiler enforce '.ptoken.PToken' as the only allowed type for the + // field number 9099. Hence, don't remove the leading '.'. See + // go/protobuf-ptoken-field for details around the 9099 field number. + Ptoken *PtokenPToken `json:"ptoken,omitempty"` + // StickerId: The id of the sticker asset chosen by the user to replace // the default asset for the alias. StickerId int64 `json:"stickerId,omitempty"` @@ -107258,6 +108274,11 @@ type PhotosHdrMetadataGainmap struct { // (FlexDR) image by reading the MPF segments. AdobeHdr bool `json:"adobeHdr,omitempty"` + // AppleHdr: Indicates that this image can be processed as an Apple HDR + // image by reading the MPF segments (if JPEG) or HEIF segments (if + // HEIC). + AppleHdr bool `json:"appleHdr,omitempty"` + // GoogleHdr: Indicates that this image can be processed as a go/ghdr // (UltraHDR) image by reading the GContainer in the primary XMP block. GoogleHdr bool `json:"googleHdr,omitempty"` @@ -110472,6 +111493,8 @@ type QualityActionsReminder struct { // go/proactive-assistant-india-mvp // "TRAIN_DELAY" // "TRAIN_PLATFORM" + // "NOTES_AND_LISTS_POST_MIGRATION" - Notifications for Notes and + // Lists // "UNIT_TESTING" - NOTE: This should always stay at the bottom of the // list. AsyncInteractionType string `json:"asyncInteractionType,omitempty"` @@ -113136,7 +114159,7 @@ func (s *QualityNsrNsrChunksWithSourceInfo) MarshalJSON() ([]byte, error) { } // QualityNsrNsrData: NOTE: When adding a new field to be propagated to -// Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 53 +// Raffia check if NsrPatternSignalSpec needs to be updated. Next ID: 54 type QualityNsrNsrData struct { // ArticleScore: Score from article classification of the site. ArticleScore float64 `json:"articleScore,omitempty"` @@ -113149,6 +114172,9 @@ type QualityNsrNsrData struct { ChardVariance float64 `json:"chardVariance,omitempty"` + // ChromeInTotal: Site-level Chrome views. + ChromeInTotal float64 `json:"chromeInTotal,omitempty"` + // ClusterId: An id for defining clusters of sites. Used in ecosystem // experiments (project Tundra). ClusterId int64 `json:"clusterId,omitempty"` @@ -113336,6 +114362,7 @@ func (s *QualityNsrNsrData) UnmarshalJSON(data []byte) error { ArticleScore gensupport.JSONFloat64 `json:"articleScore"` ArticleScoreV2 gensupport.JSONFloat64 `json:"articleScoreV2"` ChardVariance gensupport.JSONFloat64 `json:"chardVariance"` + ChromeInTotal gensupport.JSONFloat64 `json:"chromeInTotal"` ClutterScore gensupport.JSONFloat64 `json:"clutterScore"` DirectFrac gensupport.JSONFloat64 `json:"directFrac"` HealthScore gensupport.JSONFloat64 `json:"healthScore"` @@ -113369,6 +114396,7 @@ func (s *QualityNsrNsrData) UnmarshalJSON(data []byte) error { s.ArticleScore = float64(s1.ArticleScore) s.ArticleScoreV2 = float64(s1.ArticleScoreV2) s.ChardVariance = float64(s1.ChardVariance) + s.ChromeInTotal = float64(s1.ChromeInTotal) s.ClutterScore = float64(s1.ClutterScore) s.DirectFrac = float64(s1.DirectFrac) s.HealthScore = float64(s1.HealthScore) @@ -121380,10 +122408,6 @@ type RepositoryWebrefDetailedEntityScores struct { // different documents for an entity. DocScore float64 `json:"docScore,omitempty"` - // GeoTopicNormalizedScore: If the annotation corresponds to a geo - // topic, this is populated with GeoTopic::normalized_score. - GeoTopicNormalizedScore float64 `json:"geoTopicNormalizedScore,omitempty"` - // IsAuthor: True if the entity is the author of the document. This was // mainly developed and tuned for news articles (e.g. /m/02x27qn on // "www.vogue.com/article/flint-town-netflix") but is also popluated for @@ -121402,11 +122426,6 @@ type RepositoryWebrefDetailedEntityScores struct { // the entity. IsReferencePage bool `json:"isReferencePage,omitempty"` - // LocalEntityLocationConfidence: If the annotation corresponds to a - // local entity, this is populated with - // LocalEntityAnnotations::Instance::location_confidence. - LocalEntityLocationConfidence float64 `json:"localEntityLocationConfidence,omitempty"` - // NormalizedTopicality: Representation of the topicality score that is // normalized in [0, 1] and which sum over all entities in the document // is 1. It represents the "proportion" of the document that talks about @@ -121457,12 +122476,10 @@ func (s *RepositoryWebrefDetailedEntityScores) MarshalJSON() ([]byte, error) { func (s *RepositoryWebrefDetailedEntityScores) UnmarshalJSON(data []byte) error { type NoMethod RepositoryWebrefDetailedEntityScores var s1 struct { - Connectedness gensupport.JSONFloat64 `json:"connectedness"` - DocScore gensupport.JSONFloat64 `json:"docScore"` - GeoTopicNormalizedScore gensupport.JSONFloat64 `json:"geoTopicNormalizedScore"` - LocalEntityLocationConfidence gensupport.JSONFloat64 `json:"localEntityLocationConfidence"` - NormalizedTopicality gensupport.JSONFloat64 `json:"normalizedTopicality"` - RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + Connectedness gensupport.JSONFloat64 `json:"connectedness"` + DocScore gensupport.JSONFloat64 `json:"docScore"` + NormalizedTopicality gensupport.JSONFloat64 `json:"normalizedTopicality"` + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) @@ -121471,8 +122488,6 @@ func (s *RepositoryWebrefDetailedEntityScores) UnmarshalJSON(data []byte) error } s.Connectedness = float64(s1.Connectedness) s.DocScore = float64(s1.DocScore) - s.GeoTopicNormalizedScore = float64(s1.GeoTopicNormalizedScore) - s.LocalEntityLocationConfidence = float64(s1.LocalEntityLocationConfidence) s.NormalizedTopicality = float64(s1.NormalizedTopicality) s.RelevanceScore = float64(s1.RelevanceScore) return nil @@ -122985,7 +124000,8 @@ type RepositoryWebrefExtraMetadata struct { // This field is used by Juggernaut only. PrimaryRecording uint64 `json:"primaryRecording,omitempty,string"` - // ProductMetadata: Products-specific entity metadata. + // ProductMetadata: Products-specific entity metadata. Only available in + // QrefMetadata output. ProductMetadata *RepositoryWebrefProductMetadata `json:"productMetadata,omitempty"` // SpecialEntityType: # LINT.ThenChange( @@ -124073,6 +125089,9 @@ type RepositoryWebrefLightweightTokensMatchedLightweightToken struct { // of a noun (see go/wordgraph/definiteness). // "FEMININE_DETERMINER" - Determiners that mark *unambiguously* the // feminine gender of the expression (e.g.: "*une* artiste") + // "FEMININE_ADJECTIVE" - Adjective that mark *unambiguously* the + // feminine gender of the expression they modify. E.g.: "les + // *meilleures* artistes" // "ABLATIVE" - Linguistic markers that express the movement from a // place (like the English preposition *from* in a sentence like "I came // *from* my place"). @@ -126438,7 +127457,8 @@ func (s *RepositoryWebrefProcessorTiming) MarshalJSON() ([]byte, error) { } // RepositoryWebrefProductMetadata: Products-specific information about -// the entity. Next available tag: 16. +// the entity. Only available in QrefMetadata output. Next available +// tag: 16. type RepositoryWebrefProductMetadata struct { // ProductLineId: Shopping product line ids (typically moka product line // tag) of this entity. Represents shopping product lines, such as @@ -126453,20 +127473,6 @@ type RepositoryWebrefProductMetadata struct { // See go/iql-shopping-ids for details. ShoppingIds *KnowledgeAnswersIntentQueryShoppingIds `json:"shoppingIds,omitempty"` - // Possible values: - // "CATALOG_ENTRY" - It's an entity that maps to a single product - // catalog entry. - // "VARIANT_CLUSTER" - It's an entity that maps to a product variant - // cluster. - // "OTHER" - Higher level product entities. - // "PRODUCT_LINE" - A product line entity that includes more than one - // similar product from the same brand. - // "BRAND" - The entity is a product brand. - // "CATEGORY" - The entity is a category of products. - // "NOT_PRODUCT" - The entity does not have a known product type. This - // is equivalent to not having the type field set. - Type string `json:"type,omitempty"` - // VariantClusterId: All unique variant cluster ids (shopping's GPCs) of // this entity. VariantClusterId googleapi.Uint64s `json:"variantClusterId,omitempty"` @@ -126857,21 +127863,6 @@ type RepositoryWebrefReferencePageScores struct { // pages. If zero, it's not a good book reference page. BookScore float64 `json:"bookScore,omitempty"` - // FirstScore: The raw topicality score of the primary entity. - FirstScore float64 `json:"firstScore,omitempty"` - - // HasSpecialLinks: Whether the primary entity has any "special" links. - // Currently a link is considered special if it has a good implication - // probability and has no negative disambiguation probability. - HasSpecialLinks bool `json:"hasSpecialLinks,omitempty"` - - // MedianMentionScore: The median mentions core of the primary entity. - MedianMentionScore float64 `json:"medianMentionScore,omitempty"` - - // NavboostCoverage: The navboost token coverage ratio. All queries are - // taken into account. - NavboostCoverage float64 `json:"navboostCoverage,omitempty"` - // ReferencePageScore: Reference page score used to select the reference // page owner. ReferencePageScore float64 `json:"referencePageScore,omitempty"` @@ -126887,15 +127878,6 @@ type RepositoryWebrefReferencePageScores struct { // single_topicness, and should replace it in the long term. SingleTopicnessV2 float64 `json:"singleTopicnessV2,omitempty"` - // TitleCoverage: =================================== Signals for the - // single topicness. Only filled in for the primary (i.e., top ranked) - // entity. The title token coverage ratio. - TitleCoverage float64 `json:"titleCoverage,omitempty"` - - // TotalSum: The sum of raw topicality scores for all entities in this - // page. - TotalSum float64 `json:"totalSum,omitempty"` - // ForceSendFields is a list of field names (e.g. "BookScore") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -126923,14 +127905,9 @@ func (s *RepositoryWebrefReferencePageScores) UnmarshalJSON(data []byte) error { type NoMethod RepositoryWebrefReferencePageScores var s1 struct { BookScore gensupport.JSONFloat64 `json:"bookScore"` - FirstScore gensupport.JSONFloat64 `json:"firstScore"` - MedianMentionScore gensupport.JSONFloat64 `json:"medianMentionScore"` - NavboostCoverage gensupport.JSONFloat64 `json:"navboostCoverage"` ReferencePageScore gensupport.JSONFloat64 `json:"referencePageScore"` SingleTopicness gensupport.JSONFloat64 `json:"singleTopicness"` SingleTopicnessV2 gensupport.JSONFloat64 `json:"singleTopicnessV2"` - TitleCoverage gensupport.JSONFloat64 `json:"titleCoverage"` - TotalSum gensupport.JSONFloat64 `json:"totalSum"` *NoMethod } s1.NoMethod = (*NoMethod)(s) @@ -126938,14 +127915,9 @@ func (s *RepositoryWebrefReferencePageScores) UnmarshalJSON(data []byte) error { return err } s.BookScore = float64(s1.BookScore) - s.FirstScore = float64(s1.FirstScore) - s.MedianMentionScore = float64(s1.MedianMentionScore) - s.NavboostCoverage = float64(s1.NavboostCoverage) s.ReferencePageScore = float64(s1.ReferencePageScore) s.SingleTopicness = float64(s1.SingleTopicness) s.SingleTopicnessV2 = float64(s1.SingleTopicnessV2) - s.TitleCoverage = float64(s1.TitleCoverage) - s.TotalSum = float64(s1.TotalSum) return nil } @@ -136371,6 +137343,10 @@ type SnippetExtraInfo struct { // is disabled or not in Muppet scoring. DisableQueryFeatures bool `json:"disableQueryFeatures,omitempty"` + // ForceLeadingTextOrMeta: Indicates to not add any new candidates in + // SnippetFlow. + ForceLeadingTextOrMeta bool `json:"forceLeadingTextOrMeta,omitempty"` + // SnippetBrainSelectedCandidateIndex: Snippet candidate index selected // by snippet brain model. This field will get populated in SnippetFlow // in superroot. go/snippets-brain @@ -136963,7 +137939,8 @@ type SocialCommonLinkData struct { // "https://www.youtube.com/watch?v=leHVmSqd4_w&t=0m07s" points to the // same YouTube video where this segment appears. See // http://go/ignore-badwords-filtering-for-selflink for adding link_type - // design document. + // design document. ====== WARNING !!! WARNING !!! WARNING !!! WARNING + // !!! WARNING !!! ====== For YouTube use cases only: LinkType string `json:"linkType,omitempty"` // Title: Title is an optional field that provides a short string that @@ -145077,7 +146054,7 @@ func (s *TrawlerThrottleClientData) UnmarshalJSON(data []byte) error { // added *after* the reply is prepared). Use // FetchResponsePreparatorImpl::AddTrawlerPrivateDataToFetchReplyData to // add. See also the comment in fetch_response_preparator_impl.cc. Next -// Tag: 46 +// Tag: 47 type TrawlerTrawlerPrivateFetchReplyData struct { // BotGroupName: If we fetched using BotFetchAgent, what is the // BotGroupName? @@ -145326,6 +146303,10 @@ type TrawlerTrawlerPrivateFetchReplyData struct { // OriginalClientParams: Store the original client information. OriginalClientParams *TrawlerOriginalClientParams `json:"originalClientParams,omitempty"` + // ProdRegion: Log the prod region (only for regional harpoon requestor + // ids) + ProdRegion string `json:"prodRegion,omitempty"` + // ResourceBucket: If the requestor shares resource bucket with other // requestorids, we will store the resource bucket name in these fields. ResourceBucket string `json:"resourceBucket,omitempty"` @@ -146045,6 +147026,8 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "GEARHEAD_DUPLEX_COMPATIBLE_DIALER_ENABLED" - Test code for // sessions where a phone dialer that doesn't turn screen on during // phone calls is enabled. + // "CUSTOMER_UPDATE_CHALLENGE_EVENT_LEVEL" - Event-level test code for + // the presence of customer update challenge. // "EVENT_LEVEL_TEST_CODE_LIMIT" // "ENTERTAINMENT_CLUSTER_TRIGGERING_AT_SESSION_LEVEL" // "BEST_SELLER_CART_TAG_AT_SESSION_LEVEL" @@ -146240,6 +147223,11 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_APP_LAST_SURVIVOR_AT_SESSION_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_SUMMONERS_WAR_AT_SESSION_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_TOWER_OF_GOD_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_JACKPOT_WORLD_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_LOTSA_SLOTS_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_CASH_FRENZY_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL" // "IN_APP_OFFER_ELIGIBLE_AT_SESSION_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_1_AT_SESSION_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_2_AT_SESSION_LEVEL" @@ -146256,6 +147244,14 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_SUMMONERS_WAR_AT_SESSION_LEVEL" // // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_TOWER_OF_GOD_AT_SESSION_LEVEL" + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_JACKPOT_WORLD_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LOTSA_SLOTS_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_CASH_FRENZY_AT_SESSION_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_WAR_PLANET_AT_SESSION_LEVEL" + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_SESSION_LEVEL + // " // "IN_APP_OFFER_SAVED_AT_SESSION_LEVEL" // "IN_APP_OFFER_SAVED_APP_1_AT_SESSION_LEVEL" // "IN_APP_OFFER_SAVED_APP_2_AT_SESSION_LEVEL" @@ -146302,6 +147298,7 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // fetched. // "GEARHEAD_FRX_SENSITIVE_PERMISSION_SCREEN_SEEN" // "POST_PURCHASE_ITEM_UPSELL_SESSION_LEVEL" + // "POST_PURCHASE_ITEM_UPSELL_WAVE_2_SESSION_LEVEL" // "PLAY_PASS_SIGNUP_INTERSTITIAL_SHOWN_SESSION_LEVEL" - Test code // logged on client side for users who see the Play Pass signup // interstitial. @@ -147173,6 +148170,17 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "PLAY_PASS_SUPERHERO_CLUSTER_APP_WITH_PROMOTIONAL_DESCRIPTION" // "CART_ABANDONMENT_ITEM_RECOMMENDATION_SESSION_LEVEL" - // Session-level test code for SKU Recommendation in Cart Abandonment. + // "BATTLESTAR_GAME_CENTRIC_CUJ_EMAIL_SESSION_LEVEL" - Session-level + // test code for Battlestar signup email with game centric + // personalization. + // "PREREGISTRATION_START_PURCHASE_FLOW_ON_CLICK" - Session-level test + // code for preregistration release notification click triggering + // purchase flow. + // "CUSTOMER_UPDATE_CHALLENGE_SESSION_LEVEL" - Session-level test code + // for the presence of customer update challenge. + // "WEBSKY_DISPLAY_SUBSCRIPTION_ENTITLEMENT_BENEFITS_SESSION_LEVEL" - + // Session-level test code for displaying sub-entitlement benefits on + // websky. // "SESSION_LEVEL_TEST_CODE_LIMIT" // "CART_ABANDONMENT_USER_LEVEL" - Cart abandonment flow for purchase // flow. @@ -147268,6 +148276,11 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_APP_LAST_SURVIVOR_AT_USER_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_SUMMONERS_WAR_AT_USER_LEVEL" // "IN_APP_OFFER_BATTLESTAR_APP_TOWER_OF_GOD_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_JACKPOT_WORLD_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_LOTSA_SLOTS_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_CASH_FRENZY_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_WAR_PLANET_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL" // "IN_APP_OFFER_ELIGIBLE_AT_USER_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_1_AT_USER_LEVEL" // "IN_APP_OFFER_ELIGIBLE_APP_2_AT_USER_LEVEL" @@ -147280,6 +148293,12 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LAST_SURVIVOR_AT_USER_LEVEL" // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_SUMMONERS_WAR_AT_USER_LEVEL" // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_TOWER_OF_GOD_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_JACKPOT_WORLD_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_LOTSA_SLOTS_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_CASH_FRENZY_AT_USER_LEVEL" + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_WAR_PLANET_AT_USER_LEVEL" + // + // "IN_APP_OFFER_BATTLESTAR_ELIGIBLE_APP_ESKYFUN_LEGENDS_AT_USER_LEVEL" // "IN_APP_OFFER_SAVED_AT_USER_LEVEL" // "IN_APP_OFFER_SAVED_APP_1_AT_USER_LEVEL" // "IN_APP_OFFER_SAVED_APP_2_AT_USER_LEVEL" @@ -147304,6 +148323,7 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // user was eligible for visual preview while in motion. E.g. received a // notification and had visual preview setting enabled. // "POST_PURCHASE_ITEM_UPSELL_USER_LEVEL" + // "POST_PURCHASE_ITEM_UPSELL_WAVE_2_USER_LEVEL" // "PLAY_PASS_SIGNUP_INTERSTITIAL_SHOWN_USER_LEVEL" - Test code logged // on client side for users who see the Play Pass signup interstitial. // "DISABLE_TOPUP_EXPERIMENT_CONTROL_GROUP_USER_LEVEL" - Test codes @@ -147504,6 +148524,9 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // for link biometrics with impression cap and foped user setup. // "LINK_BIOMETRICS_NEW_SETUP_USER_LEVEL_V3" - User level test code // for link biometrics with impression cap and foped user setup. + // "LINK_BIOMETRICS_NEW_SETUP_USER_LEVEL_V3_1" - User level test code + // for link biometrics with impression cap and foped user setup after + // traffic rebalancing. // "POST_SUCCESS_ADD_BACKUP_FLOW_USER_LEVEL" - User level test code // for post success add backup flow. // "SKIP_CHECK_MARK_SCREEN_WITH_BACKUP_FLOW_USER_LEVEL" - User level @@ -147720,6 +148743,7 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // "IS_ELIGIBLE_FOR_APP_TARGETED_REWARD_SUPERCELL_USER_LEVEL" // "IS_ELIGIBLE_FOR_APP_TARGETED_REWARD_KING_USER_LEVEL" // "IS_ELIGIBLE_FOR_APP_TARGETED_REWARD_MINICLIP_USER_LEVEL" + // "IS_APP_TARGETED_REWARD_BANNER_VISIBLE_USER_LEVEL" // "GAME_HUB_DEVELOPER_VIDEO_AT_USER_LEVEL" - User-level test code for // Game Hub Developer Video cluster. // "CART_ABANDONMENT_SUBSCRIPTION_BENEFITS_USER_LEVEL" - User-level @@ -147749,6 +148773,14 @@ type VendingConsumerProtoTrustedGenomeAnnotation struct { // experiments. // "CART_ABANDONMENT_ITEM_RECOMMENDATION_USER_LEVEL" - User level test // code for SKU Recommendation in Cart Abandonment. + // "HAS_INSUFFICIENT_STORED_VALUE_BALANCE_BEFORE_RENEWAL_USER_LEVEL" - + // User level test code for stored value top-up email reminder. + // "IS_ELIGIBLE_FOR_ONE_CLICK_BAKCUP_FOP_IN_FIX_FLOW_USER_LEVEL" - + // User level test code for users who are eligible for one-click backup + // fop in fix flow + // "WEBSKY_DISPLAY_SUBSCRIPTION_ENTITLEMENT_BENEFITS_USER_LEVEL" - + // User level test code for displaying sub-entitlement benefits on + // websky. // "USER_LEVEL_TEST_CODE_LIMIT" TestCode []string `json:"testCode,omitempty"` @@ -147782,7 +148814,7 @@ func (s *VendingConsumerProtoTrustedGenomeAnnotation) MarshalJSON() ([]byte, err // VendingConsumerProtoTrustedGenomeEntity: Proto message containing the // id, localized title, score, and hierarchy level of a trusted genome -// entity. Next ID: 10 +// entity. Next ID: 12 type VendingConsumerProtoTrustedGenomeEntity struct { // CategoryId: The category id matching this trusted genome entity. e.g. // Action tag with id /m/025zzc matches category of id GAME_ACTION @@ -147791,6 +148823,10 @@ type VendingConsumerProtoTrustedGenomeEntity struct { // Id: The identifier of a play trusted genome entity. Required. Id string `json:"id,omitempty"` + // IsLocalized: Indicate whether the trusted genome entity has localized + // title. + IsLocalized bool `json:"isLocalized,omitempty"` + // Level: The level of the entity. E.g. in hierarchy like Action -> // Platformer > Endless Runner. Action is level 1, Platformer is level 2 // and Endless Runner is level 3. Currently, only APP_TAXONOMY and @@ -147806,6 +148842,10 @@ type VendingConsumerProtoTrustedGenomeEntity struct { // This query will be used when we want to bring users to SERP on click. QueryText string `json:"queryText,omitempty"` + // RecsTopicId: The corresponding recs topics created from the trusted + // genome entity if available. + RecsTopicId []string `json:"recsTopicId,omitempty"` + // Score: The confidence score of the entity to the app. Score float64 `json:"score,omitempty"` @@ -147902,10 +148942,12 @@ type VendingConsumerProtoTrustedGenomeHierarchy struct { // // Possible values: // "UNKNOWN_ENTITY_TYPE" - // "APP_TAXONOMY" - Apps taxonomy. e.g. Air travel. + // "APP_TAXONOMY" - ============================= Apps + // =======================// Apps taxonomy. e.g. Air travel. // "APP_ATTRIBUTE" - Apps attribute, it can be universal, e.g. VR, or // it can be category specific, e.g. Beauty type makeup. - // "GAME_TAXONOMY" - Game taxonomy. e.g. Action. + // "GAME_TAXONOMY" - ============================= Games + // =======================// Game taxonomy. e.g. Action. // "GAMEPLAY_ELEMENT" - Gameplay element. e.g. Arcade. // "GAMEPLAY_MODE" - Gameplay mode. e.g. Single player // "GAME_GRAPHIC_STYLE" - Game graphic stype. e.g. Anime @@ -147914,10 +148956,13 @@ type VendingConsumerProtoTrustedGenomeHierarchy struct { // "GAME_DIMENSIONAL_PLANES" - Game dimensional planes. e.g. 3D // "GAME_MONETIZATION" - Game monetization. e.g. subscription, try // before you buy. - // "ACCESSIBLITY" - Accessiblity. e.g. Blind-Friendly + // "ACCESSIBLITY" - ============================= General + // =======================// Accessiblity. e.g. Blind-Friendly // "ASSISTANT" - Assistant tags, e.g. Assistant-Enabled // "CHROMEBOOK_COMPATIBILITY" - Chrome OS compatibility tags. e.g. // Optimized for Chromebooks + // "GLOBAL_ATTRIBUTE" - Global attribute shared between both App and + // Game. e.g. Companion App TrustedGenomeType string `json:"trustedGenomeType,omitempty"` // ForceSendFields is a list of field names (e.g. "Entity") to @@ -162436,11 +163481,12 @@ type WWWSnippetResponse struct { // SentimentSnippets: DEPRECATED Sentiment snippets SentimentSnippets []*RepositoryAnnotationsMustangSentimentSnippetAnnotations `json:"sentimentSnippets,omitempty"` - // SiteDisplayName: The display name of the document's domain used as - // the first part of VisUrl, e.g, "Google > play > store" is the VisUrl - // of "https://play.google.com/store/". Wherein, "Google" is - // site_display_name of the domain "google.com". See - // go/site-display-name for more details. + // SiteDisplayName: The domain-level display name of the website, such + // as "Google" for google.com. See go/site-display-name for more + // details. As of Aug 2023, this field is being deprecated in favor of + // `info.[AlternativeTitlesResponse].site_display_name_response` field, + // which also contains host-level site display names with additional + // information. SiteDisplayName string `json:"siteDisplayName,omitempty"` // SnippetBylineDate: Byline date for time sensitive snippets. Most of @@ -162500,7 +163546,7 @@ type WWWSnippetResponse struct { // TitleRenderedToken: How tokens are rendered in generating title. // Note: In rendering a title, the page title part and the // site/host/domain title part can be flipped after initial rendering. - // The flip, if happend, may not be reflected in this field. That is, + // The flip, if happened, may not be reflected in this field. That is, // this field may contain the tokens in the original, pre-flip, order. TitleRenderedToken []*MustangSnippetsRenderedToken `json:"titleRenderedToken,omitempty"` @@ -162566,7 +163612,54 @@ func (s *WWWSnippetResponseBitmapPB) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type WatchpageLanguageWatchPageLanguageResult struct { +// WatchpageLanguageWatchPageLanguageModelPredictions: Next ID: 4 +type WatchpageLanguageWatchPageLanguageModelPredictions struct { + // LanguageScore: A list of watchpage languages predicted arranged + // according to their scores. + LanguageScore []*WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore `json:"languageScore,omitempty"` + + // UsesSpeechSignals: Does the prediction uses speech signals like audio + // language. + UsesSpeechSignals bool `json:"usesSpeechSignals,omitempty"` + + // Version: An identifier to recognize the model version used for this + // prediction. + // + // Possible values: + // "UNKNOWN_MODEL" + // "V2" + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LanguageScore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LanguageScore") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WatchpageLanguageWatchPageLanguageModelPredictions) MarshalJSON() ([]byte, error) { + type NoMethod WatchpageLanguageWatchPageLanguageModelPredictions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore: Next +// ID: 3 +type WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore struct { + // Score: Score for the predicted language by the WatchPage Language + // model. + Score float64 `json:"score,omitempty"` + // WatchpageLanguage: The language predicted by the WatchPage Language // model. // @@ -162794,21 +163887,292 @@ type WatchpageLanguageWatchPageLanguageResult struct { // "NUM_LANGUAGES" - Always keep this at the end. It is not a WatchpageLanguage string `json:"watchpageLanguage,omitempty"` - // ForceSendFields is a list of field names (e.g. "WatchpageLanguage") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Score") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WatchpageLanguage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore) MarshalJSON() ([]byte, error) { + type NoMethod WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore) UnmarshalJSON(data []byte) error { + type NoMethod WatchpageLanguageWatchPageLanguageModelPredictionsLanguageScore + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// WatchpageLanguageWatchPageLanguageResult: Next ID: 3 +type WatchpageLanguageWatchPageLanguageResult struct { + // Predictions: Versioned WatchPageLanguageResults. This is to + // experiment and launch new models. The first prediction is the latest + // production version. + Predictions []*WatchpageLanguageWatchPageLanguageModelPredictions `json:"predictions,omitempty"` + + // WatchpageLanguage: The language predicted by the V1 WatchPage + // Language model. For new and experimental versions use + // versioned_language_result. + // + // Possible values: + // "ENGLISH" + // "DANISH" + // "DUTCH" + // "FINNISH" + // "FRENCH" + // "GERMAN" + // "HEBREW" + // "ITALIAN" + // "JAPANESE" + // "KOREAN" + // "NORWEGIAN" - "Norwegian" = "no" normally implies Bokmål ("nb"). + // See also NORWEGIAN_N. Consider using IsNorwegianLanguage(). + // "POLISH" + // "PORTUGUESE" - WARNING: "Portuguese" in the enum Language implies + // the Iberian variant, while Google and industry standard practice is + // for "pt" to imply Brazilian, for the much larger population. The old + // LanguageCode() function returns "pt" for legacy reasons. The III + // LanguageEnumLanguageCodeConverter converts it to "pt-PT" to preserve + // the semantics. Converting between this legacy enum and + // industry-standard language tags cannot preserve the distinction + // between PORTUGUESE and PORTUGUESE_P. Relying on it is a bug. Consider + // using IsPortugueseLanguage(). + // "RUSSIAN" + // "SPANISH" + // "SWEDISH" + // "CHINESE" - "Chinese" normally implies simplified Han characters + // ("zh-Hans"). See also CHINESE_T. Consider using IsChineseLanguage(). + // "CZECH" + // "GREEK" + // "ICELANDIC" + // "LATVIAN" + // "LITHUANIAN" + // "ROMANIAN" - Avoid making a distinction between ROMANIAN and + // MOLDAVIAN. Consider using IsRomanianLanguage(). + // "HUNGARIAN" + // "ESTONIAN" + // "TG_UNKNOWN_LANGUAGE" + // "UNKNOWN_LANGUAGE" + // "BULGARIAN" + // "CROATIAN" + // "SERBIAN" - Serbian is commonly written in two scripts. The default + // is Cyrillic ("sr" = "sr-Cyrl"). It is also often written with Latin + // letters ("sr-Latn"). This enum does not convey that distinction. + // "IRISH" + // "GALICIAN" + // "TAGALOG" - TAGALOG is used to mean both Tagalog (tl) and Filipino + // (fil). These are nearly the same; Filipino is the official language, + // and "fil" is normally used for UI settings etc. The old + // LanguageCode() function returns "tl". + // "TURKISH" + // "UKRAINIAN" + // "HINDI" + // "MACEDONIAN" + // "BENGALI" + // "INDONESIAN" + // "LATIN" + // "MALAY" + // "MALAYALAM" + // "WELSH" + // "NEPALI" + // "TELUGU" + // "ALBANIAN" + // "TAMIL" + // "BELARUSIAN" + // "JAVANESE" + // "OCCITAN" + // "URDU" + // "BIHARI" - "Bihari" is not a language: There are several different + // languages spoken in and around the Indian state of Bihar. This is + // like saying "Swiss" to mean German+French+Italian+Romansh. + // "GUJARATI" + // "THAI" + // "ARABIC" + // "CATALAN" + // "ESPERANTO" + // "BASQUE" + // "INTERLINGUA" - UI only. + // "KANNADA" + // "PUNJABI" + // "SCOTS_GAELIC" + // "SWAHILI" + // "SLOVENIAN" + // "MARATHI" + // "MALTESE" + // "VIETNAMESE" + // "FRISIAN" + // "SLOVAK" + // "CHINESE_T" - Chinese written in traditional Han characters + // ("zh-Hant"). See also CHINESE. Consider using IsChineseLanguage(). + // "FAROESE" + // "SUNDANESE" + // "UZBEK" + // "AMHARIC" + // "AZERBAIJANI" + // "GEORGIAN" + // "TIGRINYA" - UI only. + // "PERSIAN" + // "BOSNIAN" - UI only. LangId language: CROATIAN (28) + // "SINHALESE" + // "NORWEGIAN_N" - Norwegian Nynorsk ("nn"). See also NORWEGIAN. + // Consider using IsNorwegianLanguage(). UI only. LangId language: + // NORWEGIAN (10) + // "PORTUGUESE_P" - Portuguese in Portugal ("pt-PT"). See the WARNING + // at PORTUGUESE. Avoid a distinction between PORTUGUESE and + // PORTUGUESE_P. Relying on it is a bug. Consider using + // IsPortugueseLanguage(). UI only. LangId language: PORTUGUESE (12) + // "PORTUGUESE_B" - Portuguese in Brazil ("pt-BR"). Consider using + // IsPortugueseLanguage(). UI only. LangId language: PORTUGUESE (12) + // "XHOSA" - UI only. + // "ZULU" - UI only. + // "GUARANI" - UI only. + // "SESOTHO" - UI only. + // "TURKMEN" - UI only. + // "KYRGYZ" + // "BRETON" + // "TWI" - UI only. + // "YIDDISH" - UI only. + // "SERBO_CROATIAN" - UI only. LangId language: SERBIAN (29) + // "SOMALI" - UI only. + // "UIGHUR" + // "KURDISH" - This has been documented as "Kurmanji (kmr) + Sorani + // (ckb) + Kurdish (ku)". There are several kinds of Kurdish languages. + // "ku" normally implies Northern Kurdish = Kurmanji (kmr) which is + // normally written in Latin letters. "ckb" is Central Kurdish (largely + // in Iraq) which is normally written in Arabic letters (thus + // right-to-left). + // "MONGOLIAN" + // "ARMENIAN" + // "LAOTHIAN" + // "SINDHI" + // "RHAETO_ROMANCE" - UI only. + // "AFRIKAANS" + // "LUXEMBOURGISH" + // "BURMESE" + // "KHMER" + // "TIBETAN" + // "DHIVEHI" - sometimes spelled Divehi; lang of Maldives + // "CHEROKEE" + // "SYRIAC" + // "LIMBU" - UI only. + // "ORIYA" + // "ASSAMESE" - UI only. + // "CORSICAN" + // "INTERLINGUE" - UI only. + // "KAZAKH" + // "LINGALA" - UI only. + // "MOLDAVIAN" - "Moldavian" is the same language as Romanian. In + // language tags, "ro-MD" can be used but is not normally necessary. + // Avoid making a distinction between ROMANIAN and MOLDAVIAN. Consider + // using IsRomanianLanguage(). UI only. LangId language: ROMANIAN (22) + // "PASHTO" + // "QUECHUA" + // "SHONA" - UI only. + // "TAJIK" + // "TATAR" + // "TONGA" + // "YORUBA" + // "CREOLES_AND_PIDGINS_ENGLISH_BASED" - This is a vague group of + // languages, not one language. UI only. + // "CREOLES_AND_PIDGINS_FRENCH_BASED" - This is a vague group of + // languages, not one language. UI only. + // "CREOLES_AND_PIDGINS_PORTUGUESE_BASED" - This is a vague group of + // languages, not one language. UI only. + // "CREOLES_AND_PIDGINS_OTHER" - This is a vague group of languages, + // not one language. UI only. + // "MAORI" + // "WOLOF" - UI only. + // "ABKHAZIAN" - UI only. + // "AFAR" - UI only. + // "AYMARA" - UI only. + // "BASHKIR" - UI only. + // "BISLAMA" - UI only. + // "DZONGKHA" - UI only. + // "FIJIAN" - UI only. + // "GREENLANDIC" - UI only. + // "HAUSA" - UI only. + // "HAITIAN_CREOLE" + // "INUPIAK" - UI only. + // "INUKTITUT" + // "KASHMIRI" - UI only. + // "KINYARWANDA" - UI only. + // "MALAGASY" - UI only. + // "NAURU" - UI only. + // "OROMO" - UI only. + // "RUNDI" - UI only. + // "SAMOAN" - UI only. + // "SANGO" - UI only. + // "SANSKRIT" + // "SISWANT" - UI only. + // "TSONGA" - UI only. + // "TSWANA" - UI only. + // "VOLAPUK" - UI only. + // "ZHUANG" - UI only. + // "KHASI" - UI only. + // "SCOTS" - UI only. + // "GANDA" - UI only. More commonly called Luganda. + // "MANX" - UI only. + // "MONTENEGRIN" - UI only. LangId language: SERBIAN (29) + // "AKAN" - UI only. + // "IGBO" - UI only. + // "MAURITIAN_CREOLE" - UI only. + // "HAWAIIAN" - UI only. + // "CEBUANO" - Translate only. + // "EWE" - CLD only. + // "GA" - CLD only. + // "HMONG" - Translate only. + // "KRIO" - CLD only. + // "LOZI" - CLD only. + // "LUBA_LULUA" - CLD only. + // "LUO_KENYA_AND_TANZANIA" - CLD only. + // "NEWARI" - Translate only. + // "NYANJA" - CLD only. + // "OSSETIAN" - Translate only. + // "PAMPANGA" - Translate only. + // "PEDI" - CLD only. + // "RAJASTHANI" - Translate only. + // "SESELWA_CREOLE_FRENCH" - CLD only. + // "TUMBUKA" - CLD only. + // "VENDA" - CLD only. + // "WARAY_PHILIPPINES" - Translate only. + // "NUM_LANGUAGES" - Always keep this at the end. It is not a + WatchpageLanguage string `json:"watchpageLanguage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Predictions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Predictions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/customsearch/v1/customsearch-gen.go b/customsearch/v1/customsearch-gen.go index da8406260e8..1d615469797 100644 --- a/customsearch/v1/customsearch-gen.go +++ b/customsearch/v1/customsearch-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/custom-search/v1/introduction // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // customsearchService, err := customsearch.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // customsearchService, err := customsearch.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // customsearchService, err := customsearch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package customsearch // import "google.golang.org/api/customsearch/v1" import ( diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index da25cc8367d..6ecaf21b92d 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/data-catalog/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datacatalogService, err := datacatalog.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datacatalogService, err := datacatalog.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datacatalogService, err := datacatalog.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datacatalog // import "google.golang.org/api/datacatalog/v1" import ( diff --git a/datacatalog/v1beta1/datacatalog-gen.go b/datacatalog/v1beta1/datacatalog-gen.go index 0e12fc129d1..a3300aff89b 100644 --- a/datacatalog/v1beta1/datacatalog-gen.go +++ b/datacatalog/v1beta1/datacatalog-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/data-catalog/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datacatalogService, err := datacatalog.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datacatalogService, err := datacatalog.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datacatalogService, err := datacatalog.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datacatalog // import "google.golang.org/api/datacatalog/v1beta1" import ( diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index aee48d986c6..cd848e66c2d 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -2214,7 +2214,7 @@ } } }, - "revision": "20230729", + "revision": "20230902", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -4781,6 +4781,10 @@ "description": "Optional. Additional metadata for describing this parameter.", "type": "object" }, + "defaultValue": { + "description": "Optional. The default values will pre-populate the parameter with the given value from the proto. If default_value is left empty, the parameter will be populated with a default of the relevant type, e.g. false for a boolean.", + "type": "string" + }, "enumOptions": { "description": "Optional. The options shown when ENUM ParameterType is specified.", "items": { diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index 60ef701f5b8..f9717d394f1 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataflow // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // dataflowService, err := dataflow.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dataflowService, err := dataflow.NewService(ctx, option.WithScopes(dataflow.UserinfoEmailScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dataflowService, err := dataflow.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dataflowService, err := dataflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dataflow // import "google.golang.org/api/dataflow/v1b3" import ( @@ -4454,6 +4468,12 @@ type ParameterMetadata struct { // parameter. CustomMetadata map[string]string `json:"customMetadata,omitempty"` + // DefaultValue: Optional. The default values will pre-populate the + // parameter with the given value from the proto. If default_value is + // left empty, the parameter will be populated with a default of the + // relevant type, e.g. false for a boolean. + DefaultValue string `json:"defaultValue,omitempty"` + // EnumOptions: Optional. The options shown when ENUM ParameterType is // specified. EnumOptions []*ParameterMetadataEnumOption `json:"enumOptions,omitempty"` diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 19f087b8de1..63e96bd7ffb 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -1961,7 +1961,7 @@ } } }, - "revision": "20230805", + "revision": "20230812", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2499,6 +2499,10 @@ "description": "Required. The Git remote's default branch name.", "type": "string" }, + "sshAuthenticationConfig": { + "$ref": "SshAuthenticationConfig", + "description": "Optional. Authentication fields for remote uris using SSH protocol." + }, "tokenStatus": { "deprecated": true, "description": "Output only. Deprecated: The field does not contain any token status information. Instead use https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/computeAccessTokenStatus", @@ -3416,6 +3420,21 @@ }, "type": "object" }, + "SshAuthenticationConfig": { + "description": "Configures fields for performing SSH authentication.", + "id": "SshAuthenticationConfig", + "properties": { + "hostPublicKey": { + "description": "Required. Content of a public SSH key to verify an identity of a remote Git host.", + "type": "string" + }, + "userPrivateKeySecretVersion": { + "description": "Required. The name of the Secret Manager secret version to use as a ssh private key for Git operations. Must be in the format `projects/*/secrets/*/versions/*`.", + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index d77e821ed69..5c4a21bc170 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataform/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // dataformService, err := dataform.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dataformService, err := dataform.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dataformService, err := dataform.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dataform // import "google.golang.org/api/dataform/v1beta1" import ( @@ -1220,6 +1233,10 @@ type GitRemoteSettings struct { // DefaultBranch: Required. The Git remote's default branch name. DefaultBranch string `json:"defaultBranch,omitempty"` + // SshAuthenticationConfig: Optional. Authentication fields for remote + // uris using SSH protocol. + SshAuthenticationConfig *SshAuthenticationConfig `json:"sshAuthenticationConfig,omitempty"` + // TokenStatus: Output only. Deprecated: The field does not contain any // token status information. Instead use // https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories/computeAccessTokenStatus @@ -2812,6 +2829,41 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SshAuthenticationConfig: Configures fields for performing SSH +// authentication. +type SshAuthenticationConfig struct { + // HostPublicKey: Required. Content of a public SSH key to verify an + // identity of a remote Git host. + HostPublicKey string `json:"hostPublicKey,omitempty"` + + // UserPrivateKeySecretVersion: Required. The name of the Secret Manager + // secret version to use as a ssh private key for Git operations. Must + // be in the format `projects/*/secrets/*/versions/*`. + UserPrivateKeySecretVersion string `json:"userPrivateKeySecretVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HostPublicKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HostPublicKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SshAuthenticationConfig) MarshalJSON() ([]byte, error) { + type NoMethod SshAuthenticationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is // suitable for different programming environments, including REST APIs // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 2b01c20acb4..0524dca87d6 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/data-fusion/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datafusionService, err := datafusion.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datafusionService, err := datafusion.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datafusionService, err := datafusion.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datafusion // import "google.golang.org/api/datafusion/v1" import ( diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index 5207ce6bc4a..b679f7b5e28 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/data-fusion/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datafusionService, err := datafusion.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datafusionService, err := datafusion.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datafusionService, err := datafusion.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datafusion // import "google.golang.org/api/datafusion/v1beta1" import ( diff --git a/datalabeling/v1beta1/datalabeling-gen.go b/datalabeling/v1beta1/datalabeling-gen.go index 51eecfe66bb..3652f26af32 100644 --- a/datalabeling/v1beta1/datalabeling-gen.go +++ b/datalabeling/v1beta1/datalabeling-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/data-labeling/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datalabelingService, err := datalabeling.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datalabelingService, err := datalabeling.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datalabelingService, err := datalabeling.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datalabeling // import "google.golang.org/api/datalabeling/v1beta1" import ( diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 72bbc1523b3..b374d66aa5c 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/database-migration/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datamigrationService, err := datamigration.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datamigrationService, err := datamigration.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datamigrationService, err := datamigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datamigration // import "google.golang.org/api/datamigration/v1" import ( diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index f984e99997c..9a904ed280d 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/database-migration/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datamigrationService, err := datamigration.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datamigrationService, err := datamigration.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datamigrationService, err := datamigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datamigration // import "google.golang.org/api/datamigration/v1beta1" import ( diff --git a/datapipelines/v1/datapipelines-gen.go b/datapipelines/v1/datapipelines-gen.go index 515b33c89be..71a1641cb13 100644 --- a/datapipelines/v1/datapipelines-gen.go +++ b/datapipelines/v1/datapipelines-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataflow/docs/guides/data-pipelines // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datapipelinesService, err := datapipelines.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datapipelinesService, err := datapipelines.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datapipelinesService, err := datapipelines.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datapipelines // import "google.golang.org/api/datapipelines/v1" import ( diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index ed5391956ef..413aede936a 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -1653,6 +1653,97 @@ } } }, + "governanceRules": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/governanceRules/{governanceRulesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.governanceRules.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/governanceRules/{governanceRulesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.governanceRules.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/governanceRules/{governanceRulesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.governanceRules.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "lakes": { "methods": { "create": { @@ -4269,7 +4360,7 @@ } } }, - "revision": "20230806", + "revision": "20230831", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index fc1d5694d69..fd584bd0dc8 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataplex/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // dataplexService, err := dataplex.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dataplexService, err := dataplex.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dataplexService, err := dataplex.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dataplex // import "google.golang.org/api/dataplex/v1" import ( @@ -158,6 +171,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DataTaxonomies = NewProjectsLocationsDataTaxonomiesService(s) rs.EntryGroups = NewProjectsLocationsEntryGroupsService(s) rs.EntryTypes = NewProjectsLocationsEntryTypesService(s) + rs.GovernanceRules = NewProjectsLocationsGovernanceRulesService(s) rs.Lakes = NewProjectsLocationsLakesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) return rs @@ -178,6 +192,8 @@ type ProjectsLocationsService struct { EntryTypes *ProjectsLocationsEntryTypesService + GovernanceRules *ProjectsLocationsGovernanceRulesService + Lakes *ProjectsLocationsLakesService Operations *ProjectsLocationsOperationsService @@ -261,6 +277,15 @@ type ProjectsLocationsEntryTypesService struct { s *Service } +func NewProjectsLocationsGovernanceRulesService(s *Service) *ProjectsLocationsGovernanceRulesService { + rs := &ProjectsLocationsGovernanceRulesService{s: s} + return rs +} + +type ProjectsLocationsGovernanceRulesService struct { + s *Service +} + func NewProjectsLocationsLakesService(s *Service) *ProjectsLocationsLakesService { rs := &ProjectsLocationsLakesService{s: s} rs.Actions = NewProjectsLocationsLakesActionsService(s) @@ -15553,6 +15578,479 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi } +// method id "dataplex.projects.locations.governanceRules.getIamPolicy": + +type ProjectsLocationsGovernanceRulesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsGovernanceRulesService) GetIamPolicy(resource string) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + c := &ProjectsLocationsGovernanceRulesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy.Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected.Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset.The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1.To learn which +// resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.governanceRules.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGovernanceRulesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/governanceRules/{governanceRulesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "dataplex.projects.locations.governanceRules.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.governanceRules.setIamPolicy": + +type ProjectsLocationsGovernanceRulesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy.Can return NOT_FOUND, +// INVALID_ARGUMENT, and PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsGovernanceRulesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { + c := &ProjectsLocationsGovernanceRulesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.governanceRules.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGovernanceRulesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/governanceRules/{governanceRulesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.governanceRules.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dataplex.projects.locations.governanceRules.testIamPermissions": + +type ProjectsLocationsGovernanceRulesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a NOT_FOUND error.Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsGovernanceRulesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { + c := &ProjectsLocationsGovernanceRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGovernanceRulesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.governanceRules.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGovernanceRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/governanceRules/{governanceRulesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "dataplex.projects.locations.governanceRules.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/governanceRules/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "dataplex.projects.locations.lakes.create": type ProjectsLocationsLakesCreateCall struct { diff --git a/dataproc/v1/dataproc-gen.go b/dataproc/v1/dataproc-gen.go index 1d295c25ecb..ab56a30b3b5 100644 --- a/dataproc/v1/dataproc-gen.go +++ b/dataproc/v1/dataproc-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/dataproc/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // dataprocService, err := dataproc.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dataprocService, err := dataproc.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dataprocService, err := dataproc.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dataproc // import "google.golang.org/api/dataproc/v1" import ( diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index 2d2d752868b..2fc73a49084 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/datastore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // datastoreService, err := datastore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // datastoreService, err := datastore.NewService(ctx, option.WithScopes(datastore.DatastoreScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datastoreService, err := datastore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datastoreService, err := datastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datastore // import "google.golang.org/api/datastore/v1" import ( diff --git a/datastore/v1beta1/datastore-gen.go b/datastore/v1beta1/datastore-gen.go index 525e962ed22..84c31dadc10 100644 --- a/datastore/v1beta1/datastore-gen.go +++ b/datastore/v1beta1/datastore-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/datastore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // datastoreService, err := datastore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // datastoreService, err := datastore.NewService(ctx, option.WithScopes(datastore.DatastoreScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datastoreService, err := datastore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datastoreService, err := datastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datastore // import "google.golang.org/api/datastore/v1beta1" import ( diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index f3c7b62dab7..c2265bbea01 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/datastore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // datastoreService, err := datastore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // datastoreService, err := datastore.NewService(ctx, option.WithScopes(datastore.DatastoreScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datastoreService, err := datastore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datastoreService, err := datastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datastore // import "google.golang.org/api/datastore/v1beta3" import ( diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index ba90c6e50a9..22be5f2af49 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1025,12 +1025,12 @@ ], "parameters": { "cdcStrategy.specificStartPosition.mysqlLogPosition.logFile": { - "description": "The binary log file name.", + "description": "Required. The binary log file name.", "location": "query", "type": "string" }, "cdcStrategy.specificStartPosition.mysqlLogPosition.logPosition": { - "description": "The position within the binary log file. Default is head of file.", + "description": "Optional. The position within the binary log file. Default is head of file.", "format": "int32", "location": "query", "type": "integer" @@ -1261,7 +1261,7 @@ } } }, - "revision": "20230802", + "revision": "20230902", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AvroFileFormat": { @@ -2015,11 +2015,11 @@ "id": "MysqlLogPosition", "properties": { "logFile": { - "description": "The binary log file name.", + "description": "Required. The binary log file name.", "type": "string" }, "logPosition": { - "description": "The position within the binary log file. Default is head of file.", + "description": "Optional. The position within the binary log file. Default is head of file.", "format": "int32", "type": "integer" } @@ -2331,6 +2331,10 @@ "description": "Required. Hostname for the Oracle connection.", "type": "string" }, + "oracleSslConfig": { + "$ref": "OracleSslConfig", + "description": "Optional. SSL configuration for the Oracle connection." + }, "password": { "description": "Required. Password for the Oracle connection.", "type": "string" @@ -2412,6 +2416,22 @@ }, "type": "object" }, + "OracleSslConfig": { + "description": "Oracle SSL configuration information.", + "id": "OracleSslConfig", + "properties": { + "caCertificate": { + "description": "Input only. PEM-encoded certificate of the CA that signed the source database server's certificate.", + "type": "string" + }, + "caCertificateSet": { + "description": "Output only. Indicates whether the ca_certificate field has been set for this Connection-Profile.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, "OracleTable": { "description": "Oracle table.", "id": "OracleTable", @@ -2912,6 +2932,12 @@ "description": "Labels.", "type": "object" }, + "lastRecoveryTime": { + "description": "Output only. If the stream was recovered, the time of the last recovery. Note: This field is currently experimental.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "name": { "description": "Output only. The stream's name.", "readOnly": true, diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index da5a744465c..9847ef2d183 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/datastream/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datastreamService, err := datastream.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datastreamService, err := datastream.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datastreamService, err := datastream.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datastream // import "google.golang.org/api/datastream/v1" import ( @@ -1369,11 +1382,11 @@ func (s *MysqlDatabase) MarshalJSON() ([]byte, error) { // MysqlLogPosition: MySQL log position type MysqlLogPosition struct { - // LogFile: The binary log file name. + // LogFile: Required. The binary log file name. LogFile string `json:"logFile,omitempty"` - // LogPosition: The position within the binary log file. Default is head - // of file. + // LogPosition: Optional. The position within the binary log file. + // Default is head of file. LogPosition int64 `json:"logPosition,omitempty"` // ForceSendFields is a list of field names (e.g. "LogFile") to @@ -1842,6 +1855,10 @@ type OracleProfile struct { // Hostname: Required. Hostname for the Oracle connection. Hostname string `json:"hostname,omitempty"` + // OracleSslConfig: Optional. SSL configuration for the Oracle + // connection. + OracleSslConfig *OracleSslConfig `json:"oracleSslConfig,omitempty"` + // Password: Required. Password for the Oracle connection. Password string `json:"password,omitempty"` @@ -1984,6 +2001,39 @@ func (s *OracleSourceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OracleSslConfig: Oracle SSL configuration information. +type OracleSslConfig struct { + // CaCertificate: Input only. PEM-encoded certificate of the CA that + // signed the source database server's certificate. + CaCertificate string `json:"caCertificate,omitempty"` + + // CaCertificateSet: Output only. Indicates whether the ca_certificate + // field has been set for this Connection-Profile. + CaCertificateSet bool `json:"caCertificateSet,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaCertificate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CaCertificate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OracleSslConfig) MarshalJSON() ([]byte, error) { + type NoMethod OracleSslConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OracleTable: Oracle table. type OracleTable struct { // OracleColumns: Oracle columns in the schema. When unspecified as part @@ -2782,6 +2832,10 @@ type Stream struct { // Labels: Labels. Labels map[string]string `json:"labels,omitempty"` + // LastRecoveryTime: Output only. If the stream was recovered, the time + // of the last recovery. Note: This field is currently experimental. + LastRecoveryTime string `json:"lastRecoveryTime,omitempty"` + // Name: Output only. The stream's name. Name string `json:"name,omitempty"` @@ -7471,8 +7525,8 @@ func (r *ProjectsLocationsStreamsService) Patch(name string, stream *Stream) *Pr // CdcStrategySpecificStartPositionMysqlLogPositionLogFile sets the // optional parameter -// "cdcStrategy.specificStartPosition.mysqlLogPosition.logFile": The -// binary log file name. +// "cdcStrategy.specificStartPosition.mysqlLogPosition.logFile": +// Required. The binary log file name. func (c *ProjectsLocationsStreamsPatchCall) CdcStrategySpecificStartPositionMysqlLogPositionLogFile(cdcStrategySpecificStartPositionMysqlLogPositionLogFile string) *ProjectsLocationsStreamsPatchCall { c.urlParams_.Set("cdcStrategy.specificStartPosition.mysqlLogPosition.logFile", cdcStrategySpecificStartPositionMysqlLogPositionLogFile) return c @@ -7630,12 +7684,12 @@ func (c *ProjectsLocationsStreamsPatchCall) Do(opts ...googleapi.CallOption) (*O // ], // "parameters": { // "cdcStrategy.specificStartPosition.mysqlLogPosition.logFile": { - // "description": "The binary log file name.", + // "description": "Required. The binary log file name.", // "location": "query", // "type": "string" // }, // "cdcStrategy.specificStartPosition.mysqlLogPosition.logPosition": { - // "description": "The position within the binary log file. Default is head of file.", + // "description": "Optional. The position within the binary log file. Default is head of file.", // "format": "int32", // "location": "query", // "type": "integer" diff --git a/datastream/v1alpha1/datastream-gen.go b/datastream/v1alpha1/datastream-gen.go index a93aaf0b77f..6cf49e4cab6 100644 --- a/datastream/v1alpha1/datastream-gen.go +++ b/datastream/v1alpha1/datastream-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/datastream/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // datastreamService, err := datastream.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // datastreamService, err := datastream.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // datastreamService, err := datastream.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package datastream // import "google.golang.org/api/datastream/v1alpha1" import ( diff --git a/deploymentmanager/v0.alpha/deploymentmanager-api.json b/deploymentmanager/v0.alpha/deploymentmanager-api.json index 91c6c2958c9..a262ff1dedf 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-api.json +++ b/deploymentmanager/v0.alpha/deploymentmanager-api.json @@ -1588,7 +1588,7 @@ } } }, - "revision": "20230703", + "revision": "20230829", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -1715,6 +1715,48 @@ }, "type": "object" }, + "BulkInsertOperationStatus": { + "id": "BulkInsertOperationStatus", + "properties": { + "createdVmCount": { + "description": "[Output Only] Count of VMs successfully created so far.", + "format": "int32", + "type": "integer" + }, + "deletedVmCount": { + "description": "[Output Only] Count of VMs that got deleted during rollback.", + "format": "int32", + "type": "integer" + }, + "failedToCreateVmCount": { + "description": "[Output Only] Count of VMs that started creating but encountered an error.", + "format": "int32", + "type": "integer" + }, + "status": { + "description": "[Output Only] Creation status of BulkInsert operation - information if the flow is rolling forward or rolling back.", + "enum": [ + "STATUS_UNSPECIFIED", + "CREATING", + "ROLLING_BACK", + "DONE" + ], + "enumDescriptions": [ + "", + "Rolling forward - creating VMs.", + "Rolling back - cleaning up after an error.", + "Done" + ], + "type": "string" + }, + "targetVmCount": { + "description": "[Output Only] Count of VMs originally planned to be created.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CollectionOverride": { "description": "CollectionOverride allows resource handling overrides for specific resources within a BaseType", "id": "CollectionOverride", @@ -2154,6 +2196,19 @@ }, "type": "object" }, + "InstancesBulkInsertOperationMetadata": { + "id": "InstancesBulkInsertOperationMetadata", + "properties": { + "perLocationStatus": { + "additionalProperties": { + "$ref": "BulkInsertOperationStatus" + }, + "description": "Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, "Manifest": { "id": "Manifest", "properties": { @@ -2251,7 +2306,7 @@ "type": "object" }, "Operation": { - "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.", + "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zoneOperations` resource. For more information, read Global, Regional, and Zonal Resources.", "id": "Operation", "properties": { "clientOperationId": { @@ -2315,6 +2370,9 @@ "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", "type": "string" }, + "instancesBulkInsertOperationMetadata": { + "$ref": "InstancesBulkInsertOperationMetadata" + }, "kind": { "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", @@ -2345,6 +2403,10 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "setCommonInstanceMetadataOperationMetadata": { + "$ref": "SetCommonInstanceMetadataOperationMetadata", + "description": "[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state." + }, "startTime": { "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", "type": "string" @@ -2377,7 +2439,7 @@ "type": "string" }, "user": { - "description": "[Output Only] User who requested the operation, for example: `user@example.com`.", + "description": "[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.", "type": "string" }, "warnings": { @@ -2559,7 +2621,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -3089,6 +3151,80 @@ }, "type": "object" }, + "SetCommonInstanceMetadataOperationMetadata": { + "id": "SetCommonInstanceMetadataOperationMetadata", + "properties": { + "clientOperationId": { + "description": "[Output Only] The client operation id.", + "type": "string" + }, + "perLocationOperations": { + "additionalProperties": { + "$ref": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo" + }, + "description": "[Output Only] Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, + "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo": { + "id": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo", + "properties": { + "error": { + "$ref": "Status", + "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is populated." + }, + "state": { + "description": "[Output Only] Status of the action, which can be one of the following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.", + "enum": [ + "UNSPECIFIED", + "PROPAGATING", + "PROPAGATED", + "ABANDONED", + "FAILED", + "DONE" + ], + "enumDescriptions": [ + "", + "Operation is not yet confirmed to have been created in the location.", + "Operation is confirmed to be in the location.", + "Operation not tracked in this location e.g. zone is marked as DOWN.", + "Operation is in an error state.", + "Operation has completed successfully." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, "TargetConfiguration": { "id": "TargetConfiguration", "properties": { diff --git a/deploymentmanager/v0.alpha/deploymentmanager-gen.go b/deploymentmanager/v0.alpha/deploymentmanager-gen.go index d2b17bbaa0b..115c59df8c2 100644 --- a/deploymentmanager/v0.alpha/deploymentmanager-gen.go +++ b/deploymentmanager/v0.alpha/deploymentmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/deployment-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // deploymentmanagerService, err := deploymentmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package deploymentmanager // import "google.golang.org/api/deploymentmanager/v0.alpha" import ( @@ -516,6 +530,57 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BulkInsertOperationStatus struct { + // CreatedVmCount: [Output Only] Count of VMs successfully created so + // far. + CreatedVmCount int64 `json:"createdVmCount,omitempty"` + + // DeletedVmCount: [Output Only] Count of VMs that got deleted during + // rollback. + DeletedVmCount int64 `json:"deletedVmCount,omitempty"` + + // FailedToCreateVmCount: [Output Only] Count of VMs that started + // creating but encountered an error. + FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` + + // Status: [Output Only] Creation status of BulkInsert operation - + // information if the flow is rolling forward or rolling back. + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "CREATING" - Rolling forward - creating VMs. + // "ROLLING_BACK" - Rolling back - cleaning up after an error. + // "DONE" - Done + Status string `json:"status,omitempty"` + + // TargetVmCount: [Output Only] Count of VMs originally planned to be + // created. + TargetVmCount int64 `json:"targetVmCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreatedVmCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { + type NoMethod BulkInsertOperationStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CollectionOverride: CollectionOverride allows resource handling // overrides for specific resources within a BaseType type CollectionOverride struct { @@ -1309,6 +1374,35 @@ func (s *InputMapping) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesBulkInsertOperationMetadata struct { + // PerLocationStatus: Status information per location (location name is + // key). Example key: zones/us-central1-a + PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PerLocationStatus") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PerLocationStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InstancesBulkInsertOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Manifest struct { // Config: Output only. The YAML configuration for this manifest. Config *ConfigFile `json:"config,omitempty"` @@ -1464,7 +1558,7 @@ func (s *MethodMap) MarshalJSON() ([]byte, error) { // Operations can be global, regional or zonal. - For global operations, // use the `globalOperations` resource. - For regional operations, use // the `regionOperations` resource. - For zonal operations, use the -// `zonalOperations` resource. For more information, read Global, +// `zoneOperations` resource. For more information, read Global, // Regional, and Zonal Resources. type Operation struct { // ClientOperationId: [Output Only] The value of `requestId` if you @@ -1504,6 +1598,8 @@ type Operation struct { // This value is in RFC3339 text format. InsertTime string `json:"insertTime,omitempty"` + InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` + // Kind: [Output Only] Type of the resource. Always `compute#operation` // for Operation resources. Kind string `json:"kind,omitempty"` @@ -1534,6 +1630,11 @@ type Operation struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the + // operation is for projects.setCommonInstanceMetadata, this field will + // contain information on all underlying zonal actions and their state. + SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` + // StartTime: [Output Only] The time that this operation was started by // the server. This value is in RFC3339 text format. StartTime string `json:"startTime,omitempty"` @@ -1561,7 +1662,8 @@ type Operation struct { TargetLink string `json:"targetLink,omitempty"` // User: [Output Only] User who requested the operation, for example: - // `user@example.com`. + // `user@example.com` or `alice_smith_identifier + // (global/workforcePools/example-com-us-employees)`. User string `json:"user,omitempty"` // Warnings: [Output Only] If warning messages are generated during @@ -1894,7 +1996,7 @@ func (s *Options) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1903,17 +2005,17 @@ func (s *Options) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -2646,6 +2748,125 @@ func (s *ServiceAccount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SetCommonInstanceMetadataOperationMetadata struct { + // ClientOperationId: [Output Only] The client operation id. + ClientOperationId string `json:"clientOperationId,omitempty"` + + // PerLocationOperations: [Output Only] Status information per location + // (location name is key). Example key: zones/us-central1-a + PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientOperationId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientOperationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod SetCommonInstanceMetadataOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { + // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field + // is populated. + Error *Status `json:"error,omitempty"` + + // State: [Output Only] Status of the action, which can be one of the + // following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or + // `DONE`. + // + // Possible values: + // "UNSPECIFIED" + // "PROPAGATING" - Operation is not yet confirmed to have been created + // in the location. + // "PROPAGATED" - Operation is confirmed to be in the location. + // "ABANDONED" - Operation not tracked in this location e.g. zone is + // marked as DOWN. + // "FAILED" - Operation is in an error state. + // "DONE" - Operation has completed successfully. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) MarshalJSON() ([]byte, error) { + type NoMethod SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetConfiguration struct { // Config: The configuration to use for this deployment. Config *ConfigFile `json:"config,omitempty"` diff --git a/deploymentmanager/v2/deploymentmanager-api.json b/deploymentmanager/v2/deploymentmanager-api.json index ba60dfcfdbc..afc3ce12952 100644 --- a/deploymentmanager/v2/deploymentmanager-api.json +++ b/deploymentmanager/v2/deploymentmanager-api.json @@ -988,7 +988,7 @@ } } }, - "revision": "20230703", + "revision": "20230829", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1061,6 +1061,48 @@ }, "type": "object" }, + "BulkInsertOperationStatus": { + "id": "BulkInsertOperationStatus", + "properties": { + "createdVmCount": { + "description": "[Output Only] Count of VMs successfully created so far.", + "format": "int32", + "type": "integer" + }, + "deletedVmCount": { + "description": "[Output Only] Count of VMs that got deleted during rollback.", + "format": "int32", + "type": "integer" + }, + "failedToCreateVmCount": { + "description": "[Output Only] Count of VMs that started creating but encountered an error.", + "format": "int32", + "type": "integer" + }, + "status": { + "description": "[Output Only] Creation status of BulkInsert operation - information if the flow is rolling forward or rolling back.", + "enum": [ + "STATUS_UNSPECIFIED", + "CREATING", + "ROLLING_BACK", + "DONE" + ], + "enumDescriptions": [ + "", + "Rolling forward - creating VMs.", + "Rolling back - cleaning up after an error.", + "Done" + ], + "type": "string" + }, + "targetVmCount": { + "description": "[Output Only] Count of VMs originally planned to be created.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "ConfigFile": { "id": "ConfigFile", "properties": { @@ -1279,6 +1321,19 @@ }, "type": "object" }, + "InstancesBulkInsertOperationMetadata": { + "id": "InstancesBulkInsertOperationMetadata", + "properties": { + "perLocationStatus": { + "additionalProperties": { + "$ref": "BulkInsertOperationStatus" + }, + "description": "Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, "Manifest": { "id": "Manifest", "properties": { @@ -1349,7 +1404,7 @@ "type": "object" }, "Operation": { - "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.", + "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zoneOperations` resource. For more information, read Global, Regional, and Zonal Resources.", "id": "Operation", "properties": { "clientOperationId": { @@ -1413,6 +1468,9 @@ "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", "type": "string" }, + "instancesBulkInsertOperationMetadata": { + "$ref": "InstancesBulkInsertOperationMetadata" + }, "kind": { "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", @@ -1443,6 +1501,10 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "setCommonInstanceMetadataOperationMetadata": { + "$ref": "SetCommonInstanceMetadataOperationMetadata", + "description": "[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state." + }, "startTime": { "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", "type": "string" @@ -1475,7 +1537,7 @@ "type": "string" }, "user": { - "description": "[Output Only] User who requested the operation, for example: `user@example.com`.", + "description": "[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.", "type": "string" }, "warnings": { @@ -1628,7 +1690,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -2072,6 +2134,80 @@ }, "type": "object" }, + "SetCommonInstanceMetadataOperationMetadata": { + "id": "SetCommonInstanceMetadataOperationMetadata", + "properties": { + "clientOperationId": { + "description": "[Output Only] The client operation id.", + "type": "string" + }, + "perLocationOperations": { + "additionalProperties": { + "$ref": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo" + }, + "description": "[Output Only] Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, + "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo": { + "id": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo", + "properties": { + "error": { + "$ref": "Status", + "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is populated." + }, + "state": { + "description": "[Output Only] Status of the action, which can be one of the following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.", + "enum": [ + "UNSPECIFIED", + "PROPAGATING", + "PROPAGATED", + "ABANDONED", + "FAILED", + "DONE" + ], + "enumDescriptions": [ + "", + "Operation is not yet confirmed to have been created in the location.", + "Operation is confirmed to be in the location.", + "Operation not tracked in this location e.g. zone is marked as DOWN.", + "Operation is in an error state.", + "Operation has completed successfully." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, "TargetConfiguration": { "id": "TargetConfiguration", "properties": { diff --git a/deploymentmanager/v2/deploymentmanager-gen.go b/deploymentmanager/v2/deploymentmanager-gen.go index 26d74ec11be..cc3733ebbfc 100644 --- a/deploymentmanager/v2/deploymentmanager-gen.go +++ b/deploymentmanager/v2/deploymentmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/deployment-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // deploymentmanagerService, err := deploymentmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package deploymentmanager // import "google.golang.org/api/deploymentmanager/v2" import ( @@ -389,6 +403,57 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BulkInsertOperationStatus struct { + // CreatedVmCount: [Output Only] Count of VMs successfully created so + // far. + CreatedVmCount int64 `json:"createdVmCount,omitempty"` + + // DeletedVmCount: [Output Only] Count of VMs that got deleted during + // rollback. + DeletedVmCount int64 `json:"deletedVmCount,omitempty"` + + // FailedToCreateVmCount: [Output Only] Count of VMs that started + // creating but encountered an error. + FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` + + // Status: [Output Only] Creation status of BulkInsert operation - + // information if the flow is rolling forward or rolling back. + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "CREATING" - Rolling forward - creating VMs. + // "ROLLING_BACK" - Rolling back - cleaning up after an error. + // "DONE" - Done + Status string `json:"status,omitempty"` + + // TargetVmCount: [Output Only] Count of VMs originally planned to be + // created. + TargetVmCount int64 `json:"targetVmCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreatedVmCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { + type NoMethod BulkInsertOperationStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ConfigFile struct { // Content: The contents of the file. Content string `json:"content,omitempty"` @@ -844,6 +909,35 @@ func (s *ImportFile) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesBulkInsertOperationMetadata struct { + // PerLocationStatus: Status information per location (location name is + // key). Example key: zones/us-central1-a + PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PerLocationStatus") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PerLocationStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InstancesBulkInsertOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Manifest struct { // Config: Output only. The YAML configuration for this manifest. Config *ConfigFile `json:"config,omitempty"` @@ -953,7 +1047,7 @@ func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) { // Operations can be global, regional or zonal. - For global operations, // use the `globalOperations` resource. - For regional operations, use // the `regionOperations` resource. - For zonal operations, use the -// `zonalOperations` resource. For more information, read Global, +// `zoneOperations` resource. For more information, read Global, // Regional, and Zonal Resources. type Operation struct { // ClientOperationId: [Output Only] The value of `requestId` if you @@ -993,6 +1087,8 @@ type Operation struct { // This value is in RFC3339 text format. InsertTime string `json:"insertTime,omitempty"` + InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` + // Kind: [Output Only] Type of the resource. Always `compute#operation` // for Operation resources. Kind string `json:"kind,omitempty"` @@ -1023,6 +1119,11 @@ type Operation struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the + // operation is for projects.setCommonInstanceMetadata, this field will + // contain information on all underlying zonal actions and their state. + SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` + // StartTime: [Output Only] The time that this operation was started by // the server. This value is in RFC3339 text format. StartTime string `json:"startTime,omitempty"` @@ -1050,7 +1151,8 @@ type Operation struct { TargetLink string `json:"targetLink,omitempty"` // User: [Output Only] User who requested the operation, for example: - // `user@example.com`. + // `user@example.com` or `alice_smith_identifier + // (global/workforcePools/example-com-us-employees)`. User string `json:"user,omitempty"` // Warnings: [Output Only] If warning messages are generated during @@ -1342,7 +1444,7 @@ func (s *OperationsListResponse) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1351,17 +1453,17 @@ func (s *OperationsListResponse) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -1986,6 +2088,125 @@ func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SetCommonInstanceMetadataOperationMetadata struct { + // ClientOperationId: [Output Only] The client operation id. + ClientOperationId string `json:"clientOperationId,omitempty"` + + // PerLocationOperations: [Output Only] Status information per location + // (location name is key). Example key: zones/us-central1-a + PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientOperationId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientOperationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod SetCommonInstanceMetadataOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { + // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field + // is populated. + Error *Status `json:"error,omitempty"` + + // State: [Output Only] Status of the action, which can be one of the + // following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or + // `DONE`. + // + // Possible values: + // "UNSPECIFIED" + // "PROPAGATING" - Operation is not yet confirmed to have been created + // in the location. + // "PROPAGATED" - Operation is confirmed to be in the location. + // "ABANDONED" - Operation not tracked in this location e.g. zone is + // marked as DOWN. + // "FAILED" - Operation is in an error state. + // "DONE" - Operation has completed successfully. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) MarshalJSON() ([]byte, error) { + type NoMethod SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetConfiguration struct { // Config: The configuration to use for this deployment. Config *ConfigFile `json:"config,omitempty"` diff --git a/deploymentmanager/v2beta/deploymentmanager-api.json b/deploymentmanager/v2beta/deploymentmanager-api.json index bf31e6dc159..294cab93a98 100644 --- a/deploymentmanager/v2beta/deploymentmanager-api.json +++ b/deploymentmanager/v2beta/deploymentmanager-api.json @@ -1552,7 +1552,7 @@ } } }, - "revision": "20230703", + "revision": "20230829", "rootUrl": "https://deploymentmanager.googleapis.com/", "schemas": { "AsyncOptions": { @@ -1679,6 +1679,48 @@ }, "type": "object" }, + "BulkInsertOperationStatus": { + "id": "BulkInsertOperationStatus", + "properties": { + "createdVmCount": { + "description": "[Output Only] Count of VMs successfully created so far.", + "format": "int32", + "type": "integer" + }, + "deletedVmCount": { + "description": "[Output Only] Count of VMs that got deleted during rollback.", + "format": "int32", + "type": "integer" + }, + "failedToCreateVmCount": { + "description": "[Output Only] Count of VMs that started creating but encountered an error.", + "format": "int32", + "type": "integer" + }, + "status": { + "description": "[Output Only] Creation status of BulkInsert operation - information if the flow is rolling forward or rolling back.", + "enum": [ + "STATUS_UNSPECIFIED", + "CREATING", + "ROLLING_BACK", + "DONE" + ], + "enumDescriptions": [ + "", + "Rolling forward - creating VMs.", + "Rolling back - cleaning up after an error.", + "Done" + ], + "type": "string" + }, + "targetVmCount": { + "description": "[Output Only] Count of VMs originally planned to be created.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "CollectionOverride": { "description": "CollectionOverride allows resource handling overrides for specific resources within a BaseType", "id": "CollectionOverride", @@ -2084,6 +2126,19 @@ }, "type": "object" }, + "InstancesBulkInsertOperationMetadata": { + "id": "InstancesBulkInsertOperationMetadata", + "properties": { + "perLocationStatus": { + "additionalProperties": { + "$ref": "BulkInsertOperationStatus" + }, + "description": "Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, "Manifest": { "id": "Manifest", "properties": { @@ -2154,7 +2209,7 @@ "type": "object" }, "Operation": { - "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zonalOperations` resource. For more information, read Global, Regional, and Zonal Resources.", + "description": "Represents an Operation resource. Google Compute Engine has three Operation resources: * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations) You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses. Operations can be global, regional or zonal. - For global operations, use the `globalOperations` resource. - For regional operations, use the `regionOperations` resource. - For zonal operations, use the `zoneOperations` resource. For more information, read Global, Regional, and Zonal Resources.", "id": "Operation", "properties": { "clientOperationId": { @@ -2218,6 +2273,9 @@ "description": "[Output Only] The time that this operation was requested. This value is in RFC3339 text format.", "type": "string" }, + "instancesBulkInsertOperationMetadata": { + "$ref": "InstancesBulkInsertOperationMetadata" + }, "kind": { "default": "compute#operation", "description": "[Output Only] Type of the resource. Always `compute#operation` for Operation resources.", @@ -2248,6 +2306,10 @@ "description": "[Output Only] Server-defined URL for the resource.", "type": "string" }, + "setCommonInstanceMetadataOperationMetadata": { + "$ref": "SetCommonInstanceMetadataOperationMetadata", + "description": "[Output Only] If the operation is for projects.setCommonInstanceMetadata, this field will contain information on all underlying zonal actions and their state." + }, "startTime": { "description": "[Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.", "type": "string" @@ -2280,7 +2342,7 @@ "type": "string" }, "user": { - "description": "[Output Only] User who requested the operation, for example: `user@example.com`.", + "description": "[Output Only] User who requested the operation, for example: `user@example.com` or `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.", "type": "string" }, "warnings": { @@ -2462,7 +2524,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -2946,6 +3008,80 @@ }, "type": "object" }, + "SetCommonInstanceMetadataOperationMetadata": { + "id": "SetCommonInstanceMetadataOperationMetadata", + "properties": { + "clientOperationId": { + "description": "[Output Only] The client operation id.", + "type": "string" + }, + "perLocationOperations": { + "additionalProperties": { + "$ref": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo" + }, + "description": "[Output Only] Status information per location (location name is key). Example key: zones/us-central1-a", + "type": "object" + } + }, + "type": "object" + }, + "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo": { + "id": "SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo", + "properties": { + "error": { + "$ref": "Status", + "description": "[Output Only] If state is `ABANDONED` or `FAILED`, this field is populated." + }, + "state": { + "description": "[Output Only] Status of the action, which can be one of the following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.", + "enum": [ + "UNSPECIFIED", + "PROPAGATING", + "PROPAGATED", + "ABANDONED", + "FAILED", + "DONE" + ], + "enumDescriptions": [ + "", + "Operation is not yet confirmed to have been created in the location.", + "Operation is confirmed to be in the location.", + "Operation not tracked in this location e.g. zone is marked as DOWN.", + "Operation is in an error state.", + "Operation has completed successfully." + ], + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, "TargetConfiguration": { "id": "TargetConfiguration", "properties": { diff --git a/deploymentmanager/v2beta/deploymentmanager-gen.go b/deploymentmanager/v2beta/deploymentmanager-gen.go index dccdb3a71ed..d5a73b61fc1 100644 --- a/deploymentmanager/v2beta/deploymentmanager-gen.go +++ b/deploymentmanager/v2beta/deploymentmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/deployment-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // deploymentmanagerService, err := deploymentmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package deploymentmanager // import "google.golang.org/api/deploymentmanager/v2beta" import ( @@ -516,6 +530,57 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type BulkInsertOperationStatus struct { + // CreatedVmCount: [Output Only] Count of VMs successfully created so + // far. + CreatedVmCount int64 `json:"createdVmCount,omitempty"` + + // DeletedVmCount: [Output Only] Count of VMs that got deleted during + // rollback. + DeletedVmCount int64 `json:"deletedVmCount,omitempty"` + + // FailedToCreateVmCount: [Output Only] Count of VMs that started + // creating but encountered an error. + FailedToCreateVmCount int64 `json:"failedToCreateVmCount,omitempty"` + + // Status: [Output Only] Creation status of BulkInsert operation - + // information if the flow is rolling forward or rolling back. + // + // Possible values: + // "STATUS_UNSPECIFIED" + // "CREATING" - Rolling forward - creating VMs. + // "ROLLING_BACK" - Rolling back - cleaning up after an error. + // "DONE" - Done + Status string `json:"status,omitempty"` + + // TargetVmCount: [Output Only] Count of VMs originally planned to be + // created. + TargetVmCount int64 `json:"targetVmCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreatedVmCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreatedVmCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BulkInsertOperationStatus) MarshalJSON() ([]byte, error) { + type NoMethod BulkInsertOperationStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CollectionOverride: CollectionOverride allows resource handling // overrides for specific resources within a BaseType type CollectionOverride struct { @@ -1263,6 +1328,35 @@ func (s *InputMapping) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesBulkInsertOperationMetadata struct { + // PerLocationStatus: Status information per location (location name is + // key). Example key: zones/us-central1-a + PerLocationStatus map[string]BulkInsertOperationStatus `json:"perLocationStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PerLocationStatus") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PerLocationStatus") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesBulkInsertOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InstancesBulkInsertOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Manifest struct { // Config: Output only. The YAML configuration for this manifest. Config *ConfigFile `json:"config,omitempty"` @@ -1372,7 +1466,7 @@ func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) { // Operations can be global, regional or zonal. - For global operations, // use the `globalOperations` resource. - For regional operations, use // the `regionOperations` resource. - For zonal operations, use the -// `zonalOperations` resource. For more information, read Global, +// `zoneOperations` resource. For more information, read Global, // Regional, and Zonal Resources. type Operation struct { // ClientOperationId: [Output Only] The value of `requestId` if you @@ -1412,6 +1506,8 @@ type Operation struct { // This value is in RFC3339 text format. InsertTime string `json:"insertTime,omitempty"` + InstancesBulkInsertOperationMetadata *InstancesBulkInsertOperationMetadata `json:"instancesBulkInsertOperationMetadata,omitempty"` + // Kind: [Output Only] Type of the resource. Always `compute#operation` // for Operation resources. Kind string `json:"kind,omitempty"` @@ -1442,6 +1538,11 @@ type Operation struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // SetCommonInstanceMetadataOperationMetadata: [Output Only] If the + // operation is for projects.setCommonInstanceMetadata, this field will + // contain information on all underlying zonal actions and their state. + SetCommonInstanceMetadataOperationMetadata *SetCommonInstanceMetadataOperationMetadata `json:"setCommonInstanceMetadataOperationMetadata,omitempty"` + // StartTime: [Output Only] The time that this operation was started by // the server. This value is in RFC3339 text format. StartTime string `json:"startTime,omitempty"` @@ -1469,7 +1570,8 @@ type Operation struct { TargetLink string `json:"targetLink,omitempty"` // User: [Output Only] User who requested the operation, for example: - // `user@example.com`. + // `user@example.com` or `alice_smith_identifier + // (global/workforcePools/example-com-us-employees)`. User string `json:"user,omitempty"` // Warnings: [Output Only] If warning messages are generated during @@ -1807,7 +1909,7 @@ func (s *Options) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1816,17 +1918,17 @@ func (s *Options) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -2524,6 +2626,125 @@ func (s *ServiceAccount) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type SetCommonInstanceMetadataOperationMetadata struct { + // ClientOperationId: [Output Only] The client operation id. + ClientOperationId string `json:"clientOperationId,omitempty"` + + // PerLocationOperations: [Output Only] Status information per location + // (location name is key). Example key: zones/us-central1-a + PerLocationOperations map[string]SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo `json:"perLocationOperations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientOperationId") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientOperationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SetCommonInstanceMetadataOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod SetCommonInstanceMetadataOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo struct { + // Error: [Output Only] If state is `ABANDONED` or `FAILED`, this field + // is populated. + Error *Status `json:"error,omitempty"` + + // State: [Output Only] Status of the action, which can be one of the + // following: `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or + // `DONE`. + // + // Possible values: + // "UNSPECIFIED" + // "PROPAGATING" - Operation is not yet confirmed to have been created + // in the location. + // "PROPAGATED" - Operation is confirmed to be in the location. + // "ABANDONED" - Operation not tracked in this location e.g. zone is + // marked as DOWN. + // "FAILED" - Operation is in an error state. + // "DONE" - Operation has completed successfully. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo) MarshalJSON() ([]byte, error) { + type NoMethod SetCommonInstanceMetadataOperationMetadataPerLocationOperationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type TargetConfiguration struct { // Config: The configuration to use for this deployment. Config *ConfigFile `json:"config,omitempty"` diff --git a/dfareporting/v3.5/dfareporting-gen.go b/dfareporting/v3.5/dfareporting-gen.go index b4373861f19..2985a278ccc 100644 --- a/dfareporting/v3.5/dfareporting-gen.go +++ b/dfareporting/v3.5/dfareporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/doubleclick-advertisers/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // dfareportingService, err := dfareporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dfareportingService, err := dfareporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dfareportingService, err := dfareporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dfareporting // import "google.golang.org/api/dfareporting/v3.5" import ( diff --git a/dfareporting/v4/dfareporting-gen.go b/dfareporting/v4/dfareporting-gen.go index 4b99f7d42b7..e958939d707 100644 --- a/dfareporting/v4/dfareporting-gen.go +++ b/dfareporting/v4/dfareporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/doubleclick-advertisers/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // dfareportingService, err := dfareporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dfareportingService, err := dfareporting.NewService(ctx, option.WithScopes(dfareporting.DfatraffickingScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dfareportingService, err := dfareporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dfareportingService, err := dfareporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dfareporting // import "google.golang.org/api/dfareporting/v4" import ( diff --git a/dialogflow/v2/dialogflow-api.json b/dialogflow/v2/dialogflow-api.json index 512b6f6778c..4c689b03c45 100644 --- a/dialogflow/v2/dialogflow-api.json +++ b/dialogflow/v2/dialogflow-api.json @@ -3679,6 +3679,35 @@ }, "suggestions": { "methods": { + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.suggestions.searchKnowledge", + "parameterOrder": [ + "conversation" + ], + "parameters": { + "conversation": { + "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+conversation}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "suggestConversationSummary": { "description": "Suggests summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.", "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/suggestions:suggestConversationSummary", @@ -7493,6 +7522,35 @@ }, "suggestions": { "methods": { + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.suggestions.searchKnowledge", + "parameterOrder": [ + "conversation" + ], + "parameters": { + "conversation": { + "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+conversation}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "suggestConversationSummary": { "description": "Suggests summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/suggestions:suggestConversationSummary", @@ -8072,6 +8130,35 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] + }, + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.suggestions.searchKnowledge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] } } } @@ -8205,15 +8292,98 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] + }, + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2/projects/{projectsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.suggestions.searchKnowledge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] } } } } } }, - "revision": "20230810", + "revision": "20230906", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { + "GoogleCloudDialogflowCxV3AdvancedSettings": { + "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", + "id": "GoogleCloudDialogflowCxV3AdvancedSettings", + "properties": { + "audioExportGcsDestination": { + "$ref": "GoogleCloudDialogflowCxV3GcsDestination", + "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" + }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, + "loggingSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", + "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings": { + "description": "Define behaviors on logging.", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", + "properties": { + "enableInteractionLogging": { + "description": "If true, DF Interaction logging is currently enabled.", + "type": "boolean" + }, + "enableStackdriverLogging": { + "description": "If true, StackDriver logging is currently enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AudioInput": { "description": "Represents the natural speech audio to be processed.", "id": "GoogleCloudDialogflowCxV3AudioInput", @@ -8420,6 +8590,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", @@ -8677,6 +8874,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -8730,6 +8931,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -8737,6 +8942,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -8828,6 +9037,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3GcsDestination": { + "description": "Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.", + "id": "GoogleCloudDialogflowCxV3GcsDestination", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", @@ -9108,10 +9328,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3Page": { "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -9131,12 +9385,16 @@ "$ref": "GoogleCloudDialogflowCxV3Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -9283,6 +9541,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -9356,6 +9618,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", @@ -9727,6 +9995,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -10162,6 +10434,60 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettings": { + "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "properties": { + "audioExportGcsDestination": { + "$ref": "GoogleCloudDialogflowCxV3beta1GcsDestination", + "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" + }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, + "loggingSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", + "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings": { + "description": "Define behaviors on logging.", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", + "properties": { + "enableInteractionLogging": { + "description": "If true, DF Interaction logging is currently enabled.", + "type": "boolean" + }, + "enableStackdriverLogging": { + "description": "If true, StackDriver logging is currently enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AudioInput": { "description": "Represents the natural speech audio to be processed.", "id": "GoogleCloudDialogflowCxV3beta1AudioInput", @@ -10368,6 +10694,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3beta1DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", @@ -10625,6 +10978,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3beta1FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -10678,6 +11035,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3beta1Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -10685,6 +11046,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -10776,6 +11141,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1GcsDestination": { + "description": "Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.", + "id": "GoogleCloudDialogflowCxV3beta1GcsDestination", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", @@ -11056,10 +11432,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3beta1Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1Page": { "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3beta1Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -11079,12 +11489,16 @@ "$ref": "GoogleCloudDialogflowCxV3beta1Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -11231,6 +11645,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -11288,6 +11706,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", @@ -11659,6 +12083,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -12240,6 +12668,10 @@ ], "type": "string" }, + "knowledgeSearchFeedback": { + "$ref": "GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback", + "description": "Optional. Feedback for knowledge search." + }, "summarizationFeedback": { "$ref": "GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback", "description": "Optional. Feedback for conversation summarization." @@ -12247,6 +12679,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback": { + "description": "Feedback for knowledge search.", + "id": "GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback", + "properties": { + "answerCopied": { + "description": "Whether the answer was copied by the human agent or not. If the value is set to be true, AnswerFeedback.clicked will be updated to be true.", + "type": "boolean" + }, + "clickedUris": { + "description": "The URIs clicked by the human agent. The value is appended for each UpdateAnswerRecordRequest. If the value is not empty, AnswerFeedback.clicked will be updated to be true.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback": { "description": "Feedback for conversation summarization.", "id": "GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback", @@ -12277,6 +12727,11 @@ "description": "Output only. The article suggestion answer.", "readOnly": true }, + "dialogflowAssistAnswer": { + "$ref": "GoogleCloudDialogflowV2DialogflowAssistAnswer", + "description": "Output only. Dialogflow assist answer.", + "readOnly": true + }, "faqAnswer": { "$ref": "GoogleCloudDialogflowV2FaqAnswer", "description": "Output only. The FAQ answer.", @@ -12317,6 +12772,10 @@ "description": "A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is only idempotent if a `request_id` is provided.", "type": "string" }, + "suggestionInput": { + "$ref": "GoogleCloudDialogflowV2SuggestionInput", + "description": "An input representing the selection of a suggestion." + }, "textInput": { "$ref": "GoogleCloudDialogflowV2TextInput", "description": "The natural language text to be processed." @@ -12780,13 +13239,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -12819,13 +13280,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -13402,6 +13865,25 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2DialogflowAssistAnswer": { + "description": "Represents a Dialogflow assist answer.", + "id": "GoogleCloudDialogflowV2DialogflowAssistAnswer", + "properties": { + "answerRecord": { + "description": "The name of answer record, in the format of \"projects//locations//answerRecords/\"", + "type": "string" + }, + "intentSuggestion": { + "$ref": "GoogleCloudDialogflowV2IntentSuggestion", + "description": "An intent suggestion generated from conversation." + }, + "queryResult": { + "$ref": "GoogleCloudDialogflowV2QueryResult", + "description": "Result from v2 agent." + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Document": { "description": "A knowledge document to be used by a KnowledgeBase. For more information, see the [knowledge base guide](https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use `projects.knowledgeBases.documents`.", "id": "GoogleCloudDialogflowV2Document", @@ -14033,6 +14515,10 @@ "description": "Generated summary for a conversation.", "id": "GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary", "properties": { + "baselineModelVersion": { + "description": "The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.", + "type": "string" + }, "text": { "description": "The summary content that is concatenated into one string.", "type": "string" @@ -14142,8 +14628,12 @@ "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig", "description": "Configs for processing conversation." }, + "disableAgentQueryLogging": { + "description": "Optional. Disable the logging of search queries sent by human agents. It can prevent those queries from being stored at answer records. Supported features: KNOWLEDGE_SEARCH.", + "type": "boolean" + }, "enableEventBasedSuggestion": { - "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.", + "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, KNOWLEDGE_ASSIST.", "type": "boolean" }, "queryConfig": { @@ -14220,6 +14710,21 @@ "agent": { "description": "Required. The name of a Dialogflow virtual agent used for end user side intent detection and suggestion. Format: `projects//locations//agent`. When multiple agents are allowed in the same Dialogflow project.", "type": "string" + }, + "humanAgentSideConfig": { + "$ref": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig", + "description": "Optional. The Dialogflow assist configuration for human agent." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig": { + "description": "The configuration used for human agent side Dialogflow assist suggestion.", + "id": "GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig", + "properties": { + "agent": { + "description": "Optional. The name of a dialogflow virtual agent used for intent detection and suggestion triggered by human agent. Format: `projects//locations//agent`.", + "type": "string" } }, "type": "object" @@ -15453,6 +15958,25 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2IntentSuggestion": { + "description": "Represents an intent suggestion.", + "id": "GoogleCloudDialogflowV2IntentSuggestion", + "properties": { + "description": { + "description": "Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.", + "type": "string" + }, + "displayName": { + "description": "The display name of the intent.", + "type": "string" + }, + "intentV2": { + "description": "The unique identifier of this intent. Format: `projects//locations//agent/intents/`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2IntentTrainingPhrase": { "description": "Represents an example that the agent is trained on.", "id": "GoogleCloudDialogflowV2IntentTrainingPhrase", @@ -16309,6 +16833,106 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2SearchKnowledgeAnswer": { + "description": "Represents a SearchKnowledge answer.", + "id": "GoogleCloudDialogflowV2SearchKnowledgeAnswer", + "properties": { + "answer": { + "description": "The piece of text from the knowledge base documents that answers the search query", + "type": "string" + }, + "answerRecord": { + "description": "The name of the answer record. Format: `projects//locations//answer Records/`", + "type": "string" + }, + "answerSources": { + "description": "All sources used to generate the answer.", + "items": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource" + }, + "type": "array" + }, + "answerType": { + "description": "The type of the answer.", + "enum": [ + "ANSWER_TYPE_UNSPECIFIED", + "FAQ", + "GENERATIVE" + ], + "enumDescriptions": [ + "The answer has a unspecified type.", + "The answer is from FAQ doucments.", + "The answer is from generative model." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource": { + "description": "The sources of the answers.", + "id": "GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource", + "properties": { + "snippet": { + "description": "The relevant snippet of the article.", + "type": "string" + }, + "title": { + "description": "The title of the article.", + "type": "string" + }, + "uri": { + "description": "The URI of the article.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SearchKnowledgeRequest": { + "description": "The request message for Conversations.SearchKnowledge.", + "id": "GoogleCloudDialogflowV2SearchKnowledgeRequest", + "properties": { + "conversation": { + "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + "type": "string" + }, + "conversationProfile": { + "description": "Required. The conversation profile used to configure the search. Format: `projects//locations//conversationProfiles/`.", + "type": "string" + }, + "latestMessage": { + "description": "The name of the latest conversation message when the request is triggered. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "parent": { + "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + "type": "string" + }, + "query": { + "$ref": "GoogleCloudDialogflowV2TextInput", + "description": "Required. The natural language text query for knowledge search." + }, + "sessionId": { + "description": "The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2SearchKnowledgeResponse": { + "description": "The response message for Conversations.SearchKnowledge.", + "id": "GoogleCloudDialogflowV2SearchKnowledgeResponse", + "properties": { + "answers": { + "description": "Most relevant snippets extracted from articles in the given knowledge base, ordered by confidence.", + "items": { + "$ref": "GoogleCloudDialogflowV2SearchKnowledgeAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2Sentiment": { "description": "The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. See: https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values for how to interpret the result.", "id": "GoogleCloudDialogflowV2Sentiment", @@ -16415,13 +17039,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -16579,6 +17205,10 @@ "Use an enhanced model variant: * If an enhanced variant does not exist for the given model and request language, Dialogflow falls back to the standard variant. The [Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) describes which models have enhanced variants. * If the API caller isn't eligible for enhanced models, Dialogflow returns an error. Please see the [Dialogflow docs](https://cloud.google.com/dialogflow/docs/data-logging) for how to make your project eligible." ], "type": "string" + }, + "useTimeoutBasedEndpointing": { + "description": "Use timeout based endpointing, interpreting endpointer sensitivy as seconds of timeout value.", + "type": "boolean" } }, "type": "object" @@ -16674,6 +17304,10 @@ "description": "The name of the answer record. Format: \"projects//answerRecords/\"", "type": "string" }, + "baselineModelVersion": { + "description": "The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.", + "type": "string" + }, "text": { "description": "The summary content that is concatenated into one string.", "type": "string" @@ -16785,19 +17419,32 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } }, "type": "object" }, + "GoogleCloudDialogflowV2SuggestionInput": { + "description": "Represents the selection of a suggestion.", + "id": "GoogleCloudDialogflowV2SuggestionInput", + "properties": { + "answerRecord": { + "description": "Required. The ID of a suggestion selected by the human agent. The suggestion(s) were generated in a previous call to request Dialogflow assist. The format is: `projects//locations//answerRecords/` where is an alphanumeric string.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2SuggestionResult": { "description": "One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.", "id": "GoogleCloudDialogflowV2SuggestionResult", @@ -17250,7 +17897,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -17258,7 +17906,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -19163,7 +19812,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -19171,7 +19821,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } diff --git a/dialogflow/v2/dialogflow-gen.go b/dialogflow/v2/dialogflow-gen.go index 7d9e411b722..69e46127b23 100644 --- a/dialogflow/v2/dialogflow-gen.go +++ b/dialogflow/v2/dialogflow-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/dialogflow/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // dialogflowService, err := dialogflow.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dialogflow // import "google.golang.org/api/dialogflow/v2" import ( @@ -865,6 +879,132 @@ type ProjectsSuggestionsService struct { s *Service } +// GoogleCloudDialogflowCxV3AdvancedSettings: Hierarchical advanced +// settings for agent/flow/page/fulfillment/parameter. Settings exposed +// at lower level overrides the settings exposed at higher level. +// Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides +// the playback_interruption_settings at the agent level, leaving other +// settings at the agent level unchanged. DTMF settings does not +// override each other. DTMF settings set at different levels define +// DTMF detections running in parallel. Hierarchy: +// Agent->Flow->Page->Fulfillment/Parameter. +type GoogleCloudDialogflowCxV3AdvancedSettings struct { + // AudioExportGcsDestination: If present, incoming audio is exported by + // Dialogflow to the configured Google Cloud Storage destination. + // Exposed at the following levels: - Agent level - Flow level + AudioExportGcsDestination *GoogleCloudDialogflowCxV3GcsDestination `json:"audioExportGcsDestination,omitempty"` + + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + + // LoggingSettings: Settings for logging. Settings for Dialogflow + // History, Contact Center messages, StackDriver logs, and speech + // logging. Exposed at the following levels: - Agent level. + LoggingSettings *GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings `json:"loggingSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AudioExportGcsDestination") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AudioExportGcsDestination") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings: Define +// behaviors on logging. +type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { + // EnableInteractionLogging: If true, DF Interaction logging is + // currently enabled. + EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` + + // EnableStackdriverLogging: If true, StackDriver logging is currently + // enabled. + EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableInteractionLogging") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableInteractionLogging") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AudioInput: Represents the natural speech // audio to be processed. type GoogleCloudDialogflowCxV3AudioInput struct { @@ -1231,6 +1371,52 @@ func (s *GoogleCloudDialogflowCxV3CreateVersionOperationMetadata) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata // for DeleteDocument operation. type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { @@ -1747,6 +1933,11 @@ func (s *GoogleCloudDialogflowCxV3Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3FormParameter: Represents a form parameter. type GoogleCloudDialogflowCxV3FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -1782,7 +1973,7 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1790,12 +1981,13 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1873,9 +2065,20 @@ func (s *GoogleCloudDialogflowCxV3FormParameterFillBehavior) MarshalJSON() ([]by // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"` @@ -1904,7 +2107,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1912,7 +2115,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2061,6 +2264,39 @@ func (s *GoogleCloudDialogflowCxV3FulfillmentSetParameterAction) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3GcsDestination: Google Cloud Storage +// location for a Dialogflow operation that writes or exports objects +// (e.g. exported agent or transcripts) outside of Dialogflow. +type GoogleCloudDialogflowCxV3GcsDestination struct { + // Uri: Required. The Google Cloud Storage URI for the exported objects. + // A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a + // full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GcsDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata // in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { @@ -2616,6 +2852,59 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3KnowledgeConnectorSettings: The Knowledge +// Connector settings for this page or flow. This includes information +// such as the attached Knowledge Bases, and the way to execute +// fulfillment. +type GoogleCloudDialogflowCxV3KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3Page: A Dialogflow CX conversation (session) // can be described and visualized as a state machine. The states of a // CX session are represented by pages. For each flow, you define many @@ -2631,6 +2920,11 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt // the page. For more information, see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -2647,19 +2941,25 @@ type GoogleCloudDialogflowCxV3Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -2678,7 +2978,7 @@ type GoogleCloudDialogflowCxV3Page struct { // with only condition specified. TransitionRoutes []*GoogleCloudDialogflowCxV3TransitionRoute `json:"transitionRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2686,12 +2986,13 @@ type GoogleCloudDialogflowCxV3Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2946,6 +3247,10 @@ type GoogleCloudDialogflowCxV3ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -3057,6 +3362,13 @@ func (s *GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess) MarshalJSO type GoogleCloudDialogflowCxV3ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard: Represents +// info card response. If the response contains generative knowledge +// prediction, Dialogflow will return a payload with Infobot Messenger +// compatible info card. Otherwise, the info card response is skipped. +type GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff: Indicates // that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -3760,6 +4072,10 @@ type GoogleCloudDialogflowCxV3TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -4454,6 +4770,132 @@ func (s *GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AdvancedSettings: Hierarchical advanced +// settings for agent/flow/page/fulfillment/parameter. Settings exposed +// at lower level overrides the settings exposed at higher level. +// Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides +// the playback_interruption_settings at the agent level, leaving other +// settings at the agent level unchanged. DTMF settings does not +// override each other. DTMF settings set at different levels define +// DTMF detections running in parallel. Hierarchy: +// Agent->Flow->Page->Fulfillment/Parameter. +type GoogleCloudDialogflowCxV3beta1AdvancedSettings struct { + // AudioExportGcsDestination: If present, incoming audio is exported by + // Dialogflow to the configured Google Cloud Storage destination. + // Exposed at the following levels: - Agent level - Flow level + AudioExportGcsDestination *GoogleCloudDialogflowCxV3beta1GcsDestination `json:"audioExportGcsDestination,omitempty"` + + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + + // LoggingSettings: Settings for logging. Settings for Dialogflow + // History, Contact Center messages, StackDriver logs, and speech + // logging. Exposed at the following levels: - Agent level. + LoggingSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings `json:"loggingSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AudioExportGcsDestination") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AudioExportGcsDestination") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings: Define +// behaviors on logging. +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { + // EnableInteractionLogging: If true, DF Interaction logging is + // currently enabled. + EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` + + // EnableStackdriverLogging: If true, StackDriver logging is currently + // enabled. + EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableInteractionLogging") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableInteractionLogging") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AudioInput: Represents the natural // speech audio to be processed. type GoogleCloudDialogflowCxV3beta1AudioInput struct { @@ -4820,6 +5262,52 @@ func (s *GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3beta1DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: // Metadata for DeleteDocument operation. type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { @@ -5338,6 +5826,11 @@ func (s *GoogleCloudDialogflowCxV3beta1Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3beta1FormParameter: Represents a form // parameter. type GoogleCloudDialogflowCxV3beta1FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -5373,7 +5866,7 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5381,12 +5874,13 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5464,9 +5958,20 @@ func (s *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior) MarshalJSON() // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3beta1Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` @@ -5495,7 +6000,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5503,7 +6008,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -5653,6 +6158,39 @@ func (s *GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1GcsDestination: Google Cloud Storage +// location for a Dialogflow operation that writes or exports objects +// (e.g. exported agent or transcripts) outside of Dialogflow. +type GoogleCloudDialogflowCxV3beta1GcsDestination struct { + // Uri: Required. The Google Cloud Storage URI for the exported objects. + // A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a + // full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GcsDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: // Metadata in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { @@ -6208,6 +6746,59 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings: The +// Knowledge Connector settings for this page or flow. This includes +// information such as the attached Knowledge Bases, and the way to +// execute fulfillment. +type GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3beta1DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1Page: A Dialogflow CX conversation // (session) can be described and visualized as a state machine. The // states of a CX session are represented by pages. For each flow, you @@ -6224,6 +6815,11 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( // see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3beta1Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -6240,19 +6836,25 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3beta1Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -6271,7 +6873,7 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // with only condition specified. TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6279,12 +6881,13 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -6539,6 +7142,10 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -6639,6 +7246,14 @@ func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) Marsh type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard: +// Represents info card response. If the response contains generative +// knowledge prediction, Dialogflow will return a payload with Infobot +// Messenger compatible info card. Otherwise, the info card response is +// skipped. +type GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff: // Indicates that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -7344,6 +7959,10 @@ type GoogleCloudDialogflowCxV3beta1TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -8214,6 +8833,9 @@ type GoogleCloudDialogflowV2AgentAssistantFeedback struct { // "EFFICIENT" - Document is efficient. DocumentEfficiency string `json:"documentEfficiency,omitempty"` + // KnowledgeSearchFeedback: Optional. Feedback for knowledge search. + KnowledgeSearchFeedback *GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback `json:"knowledgeSearchFeedback,omitempty"` + // SummarizationFeedback: Optional. Feedback for conversation // summarization. SummarizationFeedback *GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback `json:"summarizationFeedback,omitempty"` @@ -8242,6 +8864,42 @@ func (s *GoogleCloudDialogflowV2AgentAssistantFeedback) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback: +// Feedback for knowledge search. +type GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback struct { + // AnswerCopied: Whether the answer was copied by the human agent or + // not. If the value is set to be true, AnswerFeedback.clicked will be + // updated to be true. + AnswerCopied bool `json:"answerCopied,omitempty"` + + // ClickedUris: The URIs clicked by the human agent. The value is + // appended for each UpdateAnswerRecordRequest. If the value is not + // empty, AnswerFeedback.clicked will be updated to be true. + ClickedUris []string `json:"clickedUris,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerCopied") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerCopied") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback: // Feedback for conversation summarization. type GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback struct { @@ -8283,6 +8941,9 @@ type GoogleCloudDialogflowV2AgentAssistantRecord struct { // ArticleSuggestionAnswer: Output only. The article suggestion answer. ArticleSuggestionAnswer *GoogleCloudDialogflowV2ArticleAnswer `json:"articleSuggestionAnswer,omitempty"` + // DialogflowAssistAnswer: Output only. Dialogflow assist answer. + DialogflowAssistAnswer *GoogleCloudDialogflowV2DialogflowAssistAnswer `json:"dialogflowAssistAnswer,omitempty"` + // FaqAnswer: Output only. The FAQ answer. FaqAnswer *GoogleCloudDialogflowV2FaqAnswer `json:"faqAnswer,omitempty"` @@ -8341,6 +9002,9 @@ type GoogleCloudDialogflowV2AnalyzeContentRequest struct { // idempotent if a `request_id` is provided. RequestId string `json:"requestId,omitempty"` + // SuggestionInput: An input representing the selection of a suggestion. + SuggestionInput *GoogleCloudDialogflowV2SuggestionInput `json:"suggestionInput,omitempty"` + // TextInput: The natural language text to be processed. TextInput *GoogleCloudDialogflowV2TextInput `json:"textInput,omitempty"` @@ -9203,6 +9867,8 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata struct // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -9252,6 +9918,8 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest struct { // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ParticipantRole") to @@ -10216,6 +10884,42 @@ func (s *GoogleCloudDialogflowV2DetectIntentResponse) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2DialogflowAssistAnswer: Represents a +// Dialogflow assist answer. +type GoogleCloudDialogflowV2DialogflowAssistAnswer struct { + // AnswerRecord: The name of answer record, in the format of + // "projects//locations//answerRecords/" + AnswerRecord string `json:"answerRecord,omitempty"` + + // IntentSuggestion: An intent suggestion generated from conversation. + IntentSuggestion *GoogleCloudDialogflowV2IntentSuggestion `json:"intentSuggestion,omitempty"` + + // QueryResult: Result from v2 agent. + QueryResult *GoogleCloudDialogflowV2QueryResult `json:"queryResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerRecord") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerRecord") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2DialogflowAssistAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2DialogflowAssistAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2Document: A knowledge document to be used by a // KnowledgeBase. For more information, see the knowledge base guide // (https://cloud.google.com/dialogflow/docs/how/knowledge-bases). Note: @@ -11405,6 +12109,11 @@ func (s *GoogleCloudDialogflowV2GenerateStatelessSummaryResponse) MarshalJSON() // GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary: // Generated summary for a conversation. type GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary struct { + // BaselineModelVersion: The baseline model version used to generate + // this summary. It is empty if a baseline model was not used to + // generate this summary. + BaselineModelVersion string `json:"baselineModelVersion,omitempty"` + // Text: The summary content that is concatenated into one string. Text string `json:"text,omitempty"` @@ -11413,20 +12122,22 @@ type GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary struct { // There is no specific format for the key or value. TextSections map[string]string `json:"textSections,omitempty"` - // ForceSendFields is a list of field names (e.g. "Text") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "BaselineModelVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Text") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BaselineModelVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -11656,9 +12367,14 @@ type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig str // ConversationProcessConfig: Configs for processing conversation. ConversationProcessConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig `json:"conversationProcessConfig,omitempty"` + // DisableAgentQueryLogging: Optional. Disable the logging of search + // queries sent by human agents. It can prevent those queries from being + // stored at answer records. Supported features: KNOWLEDGE_SEARCH. + DisableAgentQueryLogging bool `json:"disableAgentQueryLogging,omitempty"` + // EnableEventBasedSuggestion: Automatically iterates all participants // and tries to compile suggestions. Supported features: - // ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST. + // ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, KNOWLEDGE_ASSIST. EnableEventBasedSuggestion bool `json:"enableEventBasedSuggestion,omitempty"` // QueryConfig: Configs of query. @@ -11825,6 +12541,10 @@ type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialog // same Dialogflow project. Agent string `json:"agent,omitempty"` + // HumanAgentSideConfig: Optional. The Dialogflow assist configuration + // for human agent. + HumanAgentSideConfig *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig `json:"humanAgentSideConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Agent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -11848,6 +12568,38 @@ func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDi return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigD +// ialogflowQuerySourceHumanAgentSideConfig: The configuration used for +// human agent side Dialogflow assist suggestion. +type GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig struct { + // Agent: Optional. The name of a dialogflow virtual agent used for + // intent detection and suggestion triggered by human agent. Format: + // `projects//locations//agent`. + Agent string `json:"agent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Agent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Agent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigD // ocumentQuerySource: Document source settings. Supported features: // SMART_REPLY, SMART_COMPOSE. @@ -13927,6 +14679,44 @@ func (s *GoogleCloudDialogflowV2IntentParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2IntentSuggestion: Represents an intent +// suggestion. +type GoogleCloudDialogflowV2IntentSuggestion struct { + // Description: Human readable description for better understanding an + // intent like its scope, content, result etc. Maximum character limit: + // 140 characters. + Description string `json:"description,omitempty"` + + // DisplayName: The display name of the intent. + DisplayName string `json:"displayName,omitempty"` + + // IntentV2: The unique identifier of this intent. Format: + // `projects//locations//agent/intents/`. + IntentV2 string `json:"intentV2,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2IntentSuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2IntentSuggestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2IntentTrainingPhrase: Represents an example // that the agent is trained on. type GoogleCloudDialogflowV2IntentTrainingPhrase struct { @@ -15527,6 +16317,178 @@ func (s *GoogleCloudDialogflowV2SearchAgentsResponse) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2SearchKnowledgeAnswer: Represents a +// SearchKnowledge answer. +type GoogleCloudDialogflowV2SearchKnowledgeAnswer struct { + // Answer: The piece of text from the knowledge base documents that + // answers the search query + Answer string `json:"answer,omitempty"` + + // AnswerRecord: The name of the answer record. Format: + // `projects//locations//answer Records/` + AnswerRecord string `json:"answerRecord,omitempty"` + + // AnswerSources: All sources used to generate the answer. + AnswerSources []*GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource `json:"answerSources,omitempty"` + + // AnswerType: The type of the answer. + // + // Possible values: + // "ANSWER_TYPE_UNSPECIFIED" - The answer has a unspecified type. + // "FAQ" - The answer is from FAQ doucments. + // "GENERATIVE" - The answer is from generative model. + AnswerType string `json:"answerType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2SearchKnowledgeAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SearchKnowledgeAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource: The sources +// of the answers. +type GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource struct { + // Snippet: The relevant snippet of the article. + Snippet string `json:"snippet,omitempty"` + + // Title: The title of the article. + Title string `json:"title,omitempty"` + + // Uri: The URI of the article. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Snippet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Snippet") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2SearchKnowledgeRequest: The request message +// for Conversations.SearchKnowledge. +type GoogleCloudDialogflowV2SearchKnowledgeRequest struct { + // Conversation: The conversation (between human agent and end user) + // where the search request is triggered. Format: + // `projects//locations//conversations/`. + Conversation string `json:"conversation,omitempty"` + + // ConversationProfile: Required. The conversation profile used to + // configure the search. Format: + // `projects//locations//conversationProfiles/`. + ConversationProfile string `json:"conversationProfile,omitempty"` + + // LatestMessage: The name of the latest conversation message when the + // request is triggered. Format: + // `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + + // Parent: The parent resource contains the conversation profile Format: + // 'projects/' or `projects//locations/`. + Parent string `json:"parent,omitempty"` + + // Query: Required. The natural language text query for knowledge + // search. + Query *GoogleCloudDialogflowV2TextInput `json:"query,omitempty"` + + // SessionId: The ID of the search session. The session_id can be + // combined with Dialogflow V3 Agent ID retrieved from conversation + // profile or on its own to identify a search session. The search + // history of the same session will impact the search result. It's up to + // the API caller to choose an appropriate `Session ID`. It can be a + // random number or some type of session identifiers (preferably + // hashed). The length must not exceed 36 characters. + SessionId string `json:"sessionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Conversation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Conversation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2SearchKnowledgeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SearchKnowledgeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2SearchKnowledgeResponse: The response message +// for Conversations.SearchKnowledge. +type GoogleCloudDialogflowV2SearchKnowledgeResponse struct { + // Answers: Most relevant snippets extracted from articles in the given + // knowledge base, ordered by confidence. + Answers []*GoogleCloudDialogflowV2SearchKnowledgeAnswer `json:"answers,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Answers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2SearchKnowledgeResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SearchKnowledgeResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2Sentiment: The sentiment, such as // positive/negative feeling or association, for a unit of analysis, // such as the query text. See: @@ -15753,6 +16715,8 @@ type GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata struct { // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -16115,6 +17079,10 @@ type GoogleCloudDialogflowV2SpeechToTextConfig struct { // to make your project eligible. SpeechModelVariant string `json:"speechModelVariant,omitempty"` + // UseTimeoutBasedEndpointing: Use timeout based endpointing, + // interpreting endpointer sensitivy as seconds of timeout value. + UseTimeoutBasedEndpointing bool `json:"useTimeoutBasedEndpointing,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -16317,6 +17285,11 @@ type GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary struct { // "projects//answerRecords/" AnswerRecord string `json:"answerRecord,omitempty"` + // BaselineModelVersion: The baseline model version used to generate + // this summary. It is empty if a baseline model was not used to + // generate this summary. + BaselineModelVersion string `json:"baselineModelVersion,omitempty"` + // Text: The summary content that is concatenated into one string. Text string `json:"text,omitempty"` @@ -16535,6 +17508,8 @@ type GoogleCloudDialogflowV2SuggestionFeature struct { // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Type") to @@ -16560,6 +17535,39 @@ func (s *GoogleCloudDialogflowV2SuggestionFeature) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2SuggestionInput: Represents the selection of a +// suggestion. +type GoogleCloudDialogflowV2SuggestionInput struct { + // AnswerRecord: Required. The ID of a suggestion selected by the human + // agent. The suggestion(s) were generated in a previous call to request + // Dialogflow assist. The format is: + // `projects//locations//answerRecords/` where is an alphanumeric + // string. + AnswerRecord string `json:"answerRecord,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerRecord") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerRecord") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2SuggestionInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2SuggestionInput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2SuggestionResult: One response of different // type of suggestion response which is used in the response of // Participants.AnalyzeContent and Participants.AnalyzeContent, as well @@ -17343,6 +18351,8 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata s // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -20594,6 +21604,8 @@ type GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata str // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -39411,6 +40423,154 @@ func (c *ProjectsConversationsParticipantsSuggestionsSuggestSmartRepliesCall) Do } +// method id "dialogflow.projects.conversations.suggestions.searchKnowledge": + +type ProjectsConversationsSuggestionsSearchKnowledgeCall struct { + s *Service + conversation string + googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - conversation: The conversation (between human agent and end user) +// where the search request is triggered. Format: +// `projects//locations//conversations/`. +func (r *ProjectsConversationsSuggestionsService) SearchKnowledge(conversation string, googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest) *ProjectsConversationsSuggestionsSearchKnowledgeCall { + c := &ProjectsConversationsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversation = conversation + c.googleclouddialogflowv2searchknowledgerequest = googleclouddialogflowv2searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsConversationsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsConversationsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+conversation}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "conversation": c.conversation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.conversations.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2SearchKnowledgeResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2SearchKnowledgeResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2/projects/{projectsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.conversations.suggestions.searchKnowledge", + // "parameterOrder": [ + // "conversation" + // ], + // "parameters": { + // "conversation": { + // "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+conversation}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.conversations.suggestions.suggestConversationSummary": type ProjectsConversationsSuggestionsSuggestConversationSummaryCall struct { @@ -58396,6 +59556,154 @@ func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestSmartReplie } +// method id "dialogflow.projects.locations.conversations.suggestions.searchKnowledge": + +type ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall struct { + s *Service + conversation string + googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - conversation: The conversation (between human agent and end user) +// where the search request is triggered. Format: +// `projects//locations//conversations/`. +func (r *ProjectsLocationsConversationsSuggestionsService) SearchKnowledge(conversation string, googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest) *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall { + c := &ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversation = conversation + c.googleclouddialogflowv2searchknowledgerequest = googleclouddialogflowv2searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+conversation}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "conversation": c.conversation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.conversations.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2SearchKnowledgeResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2SearchKnowledgeResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.locations.conversations.suggestions.searchKnowledge", + // "parameterOrder": [ + // "conversation" + // ], + // "parameters": { + // "conversation": { + // "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+conversation}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.locations.conversations.suggestions.suggestConversationSummary": type ProjectsLocationsConversationsSuggestionsSuggestConversationSummaryCall struct { @@ -61286,6 +62594,153 @@ func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Do(opts ...go } +// method id "dialogflow.projects.locations.suggestions.searchKnowledge": + +type ProjectsLocationsSuggestionsSearchKnowledgeCall struct { + s *Service + parent string + googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - parent: The parent resource contains the conversation profile +// Format: 'projects/' or `projects//locations/`. +func (r *ProjectsLocationsSuggestionsService) SearchKnowledge(parent string, googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest) *ProjectsLocationsSuggestionsSearchKnowledgeCall { + c := &ProjectsLocationsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2searchknowledgerequest = googleclouddialogflowv2searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsLocationsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2SearchKnowledgeResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2SearchKnowledgeResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.locations.suggestions.searchKnowledge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.operations.cancel": type ProjectsOperationsCancelCall struct { @@ -61932,3 +63387,150 @@ func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Do(opts ...googleapi.C // } } + +// method id "dialogflow.projects.suggestions.searchKnowledge": + +type ProjectsSuggestionsSearchKnowledgeCall struct { + s *Service + parent string + googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - parent: The parent resource contains the conversation profile +// Format: 'projects/' or `projects//locations/`. +func (r *ProjectsSuggestionsService) SearchKnowledge(parent string, googleclouddialogflowv2searchknowledgerequest *GoogleCloudDialogflowV2SearchKnowledgeRequest) *ProjectsSuggestionsSearchKnowledgeCall { + c := &ProjectsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2searchknowledgerequest = googleclouddialogflowv2searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2SearchKnowledgeResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowV2SearchKnowledgeResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2/projects/{projectsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.suggestions.searchKnowledge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 8bd5c66321c..116d03c6c33 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -3468,6 +3468,35 @@ }, "suggestions": { "methods": { + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.conversations.suggestions.searchKnowledge", + "parameterOrder": [ + "conversation" + ], + "parameters": { + "conversation": { + "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+conversation}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "suggestConversationSummary": { "description": "Suggest summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.", "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/suggestions:suggestConversationSummary", @@ -6885,6 +6914,35 @@ }, "suggestions": { "methods": { + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.conversations.suggestions.searchKnowledge", + "parameterOrder": [ + "conversation" + ], + "parameters": { + "conversation": { + "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+conversation}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "suggestConversationSummary": { "description": "Suggest summary for a conversation based on specific historical messages. The range of the messages to be used for summary can be specified in the request.", "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/suggestions:suggestConversationSummary", @@ -7440,6 +7498,35 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] + }, + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.locations.suggestions.searchKnowledge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] } } } @@ -7573,15 +7660,98 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/dialogflow" ] + }, + "searchKnowledge": { + "description": "Get answers for the given query based on knowledge documents.", + "flatPath": "v2beta1/projects/{projectsId}/suggestions:searchKnowledge", + "httpMethod": "POST", + "id": "dialogflow.projects.suggestions.searchKnowledge", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+parent}/suggestions:searchKnowledge", + "request": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + }, + "response": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] } } } } } }, - "revision": "20230810", + "revision": "20230906", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { + "GoogleCloudDialogflowCxV3AdvancedSettings": { + "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", + "id": "GoogleCloudDialogflowCxV3AdvancedSettings", + "properties": { + "audioExportGcsDestination": { + "$ref": "GoogleCloudDialogflowCxV3GcsDestination", + "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" + }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, + "loggingSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", + "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings": { + "description": "Define behaviors on logging.", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", + "properties": { + "enableInteractionLogging": { + "description": "If true, DF Interaction logging is currently enabled.", + "type": "boolean" + }, + "enableStackdriverLogging": { + "description": "If true, StackDriver logging is currently enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AudioInput": { "description": "Represents the natural speech audio to be processed.", "id": "GoogleCloudDialogflowCxV3AudioInput", @@ -7788,6 +7958,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", @@ -8045,6 +8242,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -8098,6 +8299,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -8105,6 +8310,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -8196,6 +8405,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3GcsDestination": { + "description": "Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.", + "id": "GoogleCloudDialogflowCxV3GcsDestination", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", @@ -8476,10 +8696,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3Page": { "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -8499,12 +8753,16 @@ "$ref": "GoogleCloudDialogflowCxV3Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -8651,6 +8909,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -8724,6 +8986,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", @@ -9095,6 +9363,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -9530,6 +9802,60 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettings": { + "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "properties": { + "audioExportGcsDestination": { + "$ref": "GoogleCloudDialogflowCxV3beta1GcsDestination", + "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" + }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, + "loggingSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", + "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings": { + "description": "Define behaviors on logging.", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", + "properties": { + "enableInteractionLogging": { + "description": "If true, DF Interaction logging is currently enabled.", + "type": "boolean" + }, + "enableStackdriverLogging": { + "description": "If true, StackDriver logging is currently enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AudioInput": { "description": "Represents the natural speech audio to be processed.", "id": "GoogleCloudDialogflowCxV3beta1AudioInput", @@ -9736,6 +10062,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3beta1DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", @@ -9993,6 +10346,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3beta1FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -10046,6 +10403,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3beta1Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -10053,6 +10414,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -10144,6 +10509,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1GcsDestination": { + "description": "Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.", + "id": "GoogleCloudDialogflowCxV3beta1GcsDestination", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", @@ -10424,10 +10800,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3beta1Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1Page": { "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3beta1Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -10447,12 +10857,16 @@ "$ref": "GoogleCloudDialogflowCxV3beta1Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -10599,6 +11013,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -10656,6 +11074,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", @@ -11027,6 +11451,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -11603,13 +12031,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -13363,13 +13793,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -13743,6 +14175,10 @@ ], "type": "string" }, + "knowledgeSearchFeedback": { + "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback", + "description": "Optional. Feedback for knowledge search." + }, "summarizationFeedback": { "$ref": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback", "description": "Feedback for conversation summarization." @@ -13750,6 +14186,24 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback": { + "description": "Feedback for knowledge search.", + "id": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback", + "properties": { + "answerCopied": { + "description": "Whether the answer was copied by the human agent or not. If the value is set to be true, AnswerFeedback.clicked will be updated to be true.", + "type": "boolean" + }, + "clickedUris": { + "description": "The URIs clicked by the human agent. The value is appended for each UpdateAnswerRecordRequest. If the value is not empty, AnswerFeedback.clicked will be updated to be true.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback": { "description": "Feedback for conversation summarization.", "id": "GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback", @@ -14379,7 +14833,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -14387,7 +14842,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -14422,7 +14878,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -14430,7 +14887,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -15363,6 +15821,10 @@ "description": "Generated summary for a conversation.", "id": "GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary", "properties": { + "baselineModelVersion": { + "description": "The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.", + "type": "string" + }, "text": { "description": "The summary content that is concatenated into one string.", "type": "string" @@ -15472,8 +15934,12 @@ "$ref": "GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationProcessConfig", "description": "Configs for processing conversation." }, + "disableAgentQueryLogging": { + "description": "Optional. Disable the logging of search queries sent by human agents. It can prevent those queries from being stored at answer records. Supported features: KNOWLEDGE_SEARCH.", + "type": "boolean" + }, "enableEventBasedSuggestion": { - "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, ENTITY_EXTRACTION.", + "description": "Automatically iterates all participants and tries to compile suggestions. Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, ENTITY_EXTRACTION, KNOWLEDGE_ASSIST.", "type": "boolean" }, "queryConfig": { @@ -18071,6 +18537,106 @@ }, "type": "object" }, + "GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer": { + "description": "Represents a SearchKnowledge answer.", + "id": "GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer", + "properties": { + "answer": { + "description": "The piece of text from the knowledge base documents that answers the search query", + "type": "string" + }, + "answerRecord": { + "description": "The name of the answer record. Format: `projects//locations//answer Records/`", + "type": "string" + }, + "answerSources": { + "description": "All sources used to generate the answer.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource" + }, + "type": "array" + }, + "answerType": { + "description": "The type of the answer.", + "enum": [ + "ANSWER_TYPE_UNSPECIFIED", + "FAQ", + "GENERATIVE" + ], + "enumDescriptions": [ + "The answer has a unspecified type.", + "The answer is from FAQ doucments.", + "The answer is from generative model." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource": { + "description": "The sources of the answers.", + "id": "GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource", + "properties": { + "snippet": { + "description": "The relevant snippet of the article.", + "type": "string" + }, + "title": { + "description": "The title of the article.", + "type": "string" + }, + "uri": { + "description": "The URI of the article.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest": { + "description": "The request message for Conversations.SearchKnowledge.", + "id": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest", + "properties": { + "conversation": { + "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + "type": "string" + }, + "conversationProfile": { + "description": "Required. The conversation profile used to configure the search. Format: `projects//locations//conversationProfiles/`.", + "type": "string" + }, + "latestMessage": { + "description": "The name of the latest conversation message when the request is triggered. Format: `projects//locations//conversations//messages/`.", + "type": "string" + }, + "parent": { + "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + "type": "string" + }, + "query": { + "$ref": "GoogleCloudDialogflowV2beta1TextInput", + "description": "Required. The natural language text query for knowledge search." + }, + "sessionId": { + "description": "The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse": { + "description": "The response message for Conversations.SearchKnowledge.", + "id": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse", + "properties": { + "answers": { + "description": "Most relevant snippets extracted from articles in the given knowledge base, ordered by confidence.", + "items": { + "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDialogflowV2beta1Sentiment": { "description": "The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. See: https://cloud.google.com/natural-language/docs/basics#interpreting_sentiment_analysis_values for how to interpret the result.", "id": "GoogleCloudDialogflowV2beta1Sentiment", @@ -18179,7 +18745,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -18187,7 +18754,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -18283,6 +18851,10 @@ "Use an enhanced model variant: * If an enhanced variant does not exist for the given model and request language, Dialogflow falls back to the standard variant. The [Cloud Speech documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) describes which models have enhanced variants. * If the API caller isn't eligible for enhanced models, Dialogflow returns an error. Please see the [Dialogflow docs](https://cloud.google.com/dialogflow/docs/data-logging) for how to make your project eligible." ], "type": "string" + }, + "useTimeoutBasedEndpointing": { + "description": "Use timeout based endpointing, interpreting endpointer sensitivy as seconds of timeout value.", + "type": "boolean" } }, "type": "object" @@ -18393,6 +18965,10 @@ "description": "The name of the answer record. Format: \"projects//answerRecords/\"", "type": "string" }, + "baselineModelVersion": { + "description": "The baseline model version used to generate this summary. It is empty if a baseline model was not used to generate this summary.", + "type": "string" + }, "text": { "description": "The summary content that is concatenated into one string.", "type": "string" @@ -18631,7 +19207,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -18639,7 +19216,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index 58d39600bf0..9955d54fdce 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/dialogflow/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // dialogflowService, err := dialogflow.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dialogflow // import "google.golang.org/api/dialogflow/v2beta1" import ( @@ -793,6 +807,132 @@ type ProjectsSuggestionsService struct { s *Service } +// GoogleCloudDialogflowCxV3AdvancedSettings: Hierarchical advanced +// settings for agent/flow/page/fulfillment/parameter. Settings exposed +// at lower level overrides the settings exposed at higher level. +// Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides +// the playback_interruption_settings at the agent level, leaving other +// settings at the agent level unchanged. DTMF settings does not +// override each other. DTMF settings set at different levels define +// DTMF detections running in parallel. Hierarchy: +// Agent->Flow->Page->Fulfillment/Parameter. +type GoogleCloudDialogflowCxV3AdvancedSettings struct { + // AudioExportGcsDestination: If present, incoming audio is exported by + // Dialogflow to the configured Google Cloud Storage destination. + // Exposed at the following levels: - Agent level - Flow level + AudioExportGcsDestination *GoogleCloudDialogflowCxV3GcsDestination `json:"audioExportGcsDestination,omitempty"` + + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + + // LoggingSettings: Settings for logging. Settings for Dialogflow + // History, Contact Center messages, StackDriver logs, and speech + // logging. Exposed at the following levels: - Agent level. + LoggingSettings *GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings `json:"loggingSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AudioExportGcsDestination") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AudioExportGcsDestination") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings: Define +// behaviors on logging. +type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { + // EnableInteractionLogging: If true, DF Interaction logging is + // currently enabled. + EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` + + // EnableStackdriverLogging: If true, StackDriver logging is currently + // enabled. + EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableInteractionLogging") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableInteractionLogging") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AudioInput: Represents the natural speech // audio to be processed. type GoogleCloudDialogflowCxV3AudioInput struct { @@ -1159,6 +1299,52 @@ func (s *GoogleCloudDialogflowCxV3CreateVersionOperationMetadata) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata // for DeleteDocument operation. type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { @@ -1675,6 +1861,11 @@ func (s *GoogleCloudDialogflowCxV3Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3FormParameter: Represents a form parameter. type GoogleCloudDialogflowCxV3FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -1710,7 +1901,7 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1718,12 +1909,13 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1801,9 +1993,20 @@ func (s *GoogleCloudDialogflowCxV3FormParameterFillBehavior) MarshalJSON() ([]by // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"` @@ -1832,7 +2035,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1840,7 +2043,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -1989,6 +2192,39 @@ func (s *GoogleCloudDialogflowCxV3FulfillmentSetParameterAction) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3GcsDestination: Google Cloud Storage +// location for a Dialogflow operation that writes or exports objects +// (e.g. exported agent or transcripts) outside of Dialogflow. +type GoogleCloudDialogflowCxV3GcsDestination struct { + // Uri: Required. The Google Cloud Storage URI for the exported objects. + // A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a + // full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GcsDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata // in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { @@ -2544,6 +2780,59 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3KnowledgeConnectorSettings: The Knowledge +// Connector settings for this page or flow. This includes information +// such as the attached Knowledge Bases, and the way to execute +// fulfillment. +type GoogleCloudDialogflowCxV3KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3Page: A Dialogflow CX conversation (session) // can be described and visualized as a state machine. The states of a // CX session are represented by pages. For each flow, you define many @@ -2559,6 +2848,11 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt // the page. For more information, see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -2575,19 +2869,25 @@ type GoogleCloudDialogflowCxV3Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -2606,7 +2906,7 @@ type GoogleCloudDialogflowCxV3Page struct { // with only condition specified. TransitionRoutes []*GoogleCloudDialogflowCxV3TransitionRoute `json:"transitionRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2614,12 +2914,13 @@ type GoogleCloudDialogflowCxV3Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2874,6 +3175,10 @@ type GoogleCloudDialogflowCxV3ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -2985,6 +3290,13 @@ func (s *GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess) MarshalJSO type GoogleCloudDialogflowCxV3ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard: Represents +// info card response. If the response contains generative knowledge +// prediction, Dialogflow will return a payload with Infobot Messenger +// compatible info card. Otherwise, the info card response is skipped. +type GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff: Indicates // that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -3688,6 +4000,10 @@ type GoogleCloudDialogflowCxV3TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -4382,6 +4698,132 @@ func (s *GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AdvancedSettings: Hierarchical advanced +// settings for agent/flow/page/fulfillment/parameter. Settings exposed +// at lower level overrides the settings exposed at higher level. +// Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides +// the playback_interruption_settings at the agent level, leaving other +// settings at the agent level unchanged. DTMF settings does not +// override each other. DTMF settings set at different levels define +// DTMF detections running in parallel. Hierarchy: +// Agent->Flow->Page->Fulfillment/Parameter. +type GoogleCloudDialogflowCxV3beta1AdvancedSettings struct { + // AudioExportGcsDestination: If present, incoming audio is exported by + // Dialogflow to the configured Google Cloud Storage destination. + // Exposed at the following levels: - Agent level - Flow level + AudioExportGcsDestination *GoogleCloudDialogflowCxV3beta1GcsDestination `json:"audioExportGcsDestination,omitempty"` + + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + + // LoggingSettings: Settings for logging. Settings for Dialogflow + // History, Contact Center messages, StackDriver logs, and speech + // logging. Exposed at the following levels: - Agent level. + LoggingSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings `json:"loggingSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AudioExportGcsDestination") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AudioExportGcsDestination") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings: Define +// behaviors on logging. +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { + // EnableInteractionLogging: If true, DF Interaction logging is + // currently enabled. + EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` + + // EnableStackdriverLogging: If true, StackDriver logging is currently + // enabled. + EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableInteractionLogging") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableInteractionLogging") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AudioInput: Represents the natural // speech audio to be processed. type GoogleCloudDialogflowCxV3beta1AudioInput struct { @@ -4748,6 +5190,52 @@ func (s *GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3beta1DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: // Metadata for DeleteDocument operation. type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { @@ -5266,6 +5754,11 @@ func (s *GoogleCloudDialogflowCxV3beta1Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3beta1FormParameter: Represents a form // parameter. type GoogleCloudDialogflowCxV3beta1FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -5301,7 +5794,7 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5309,12 +5802,13 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5392,9 +5886,20 @@ func (s *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior) MarshalJSON() // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3beta1Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` @@ -5423,7 +5928,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5431,7 +5936,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -5581,6 +6086,39 @@ func (s *GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1GcsDestination: Google Cloud Storage +// location for a Dialogflow operation that writes or exports objects +// (e.g. exported agent or transcripts) outside of Dialogflow. +type GoogleCloudDialogflowCxV3beta1GcsDestination struct { + // Uri: Required. The Google Cloud Storage URI for the exported objects. + // A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a + // full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GcsDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: // Metadata in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { @@ -6136,6 +6674,59 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings: The +// Knowledge Connector settings for this page or flow. This includes +// information such as the attached Knowledge Bases, and the way to +// execute fulfillment. +type GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3beta1DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1Page: A Dialogflow CX conversation // (session) can be described and visualized as a state machine. The // states of a CX session are represented by pages. For each flow, you @@ -6152,6 +6743,11 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( // see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3beta1Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -6168,19 +6764,25 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3beta1Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -6199,7 +6801,7 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // with only condition specified. TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6207,12 +6809,13 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -6467,6 +7070,10 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -6567,6 +7174,14 @@ func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) Marsh type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard: +// Represents info card response. If the response contains generative +// knowledge prediction, Dialogflow will return a payload with Infobot +// Messenger compatible info card. Otherwise, the info card response is +// skipped. +type GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff: // Indicates that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -7272,6 +7887,10 @@ type GoogleCloudDialogflowCxV3beta1TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -8197,6 +8816,8 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata struct // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -11082,6 +11703,8 @@ type GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata struct { // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -11708,6 +12331,9 @@ type GoogleCloudDialogflowV2beta1AgentAssistantFeedback struct { // "EFFICIENT" - Document is efficient. DocumentEfficiency string `json:"documentEfficiency,omitempty"` + // KnowledgeSearchFeedback: Optional. Feedback for knowledge search. + KnowledgeSearchFeedback *GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback `json:"knowledgeSearchFeedback,omitempty"` + // SummarizationFeedback: Feedback for conversation summarization. SummarizationFeedback *GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback `json:"summarizationFeedback,omitempty"` @@ -11735,6 +12361,42 @@ func (s *GoogleCloudDialogflowV2beta1AgentAssistantFeedback) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedb +// ack: Feedback for knowledge search. +type GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback struct { + // AnswerCopied: Whether the answer was copied by the human agent or + // not. If the value is set to be true, AnswerFeedback.clicked will be + // updated to be true. + AnswerCopied bool `json:"answerCopied,omitempty"` + + // ClickedUris: The URIs clicked by the human agent. The value is + // appended for each UpdateAnswerRecordRequest. If the value is not + // empty, AnswerFeedback.clicked will be updated to be true. + ClickedUris []string `json:"clickedUris,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerCopied") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerCopied") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1AgentAssistantFeedbackKnowledgeSearchFeedback + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedbac // k: Feedback for conversation summarization. type GoogleCloudDialogflowV2beta1AgentAssistantFeedbackSummarizationFeedback struct { @@ -12883,6 +13545,8 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata s // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -12936,6 +13600,8 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigRequest struct { // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ParticipantRole") to @@ -14668,6 +15334,11 @@ func (s *GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponse) MarshalJS // GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary: // Generated summary for a conversation. type GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary struct { + // BaselineModelVersion: The baseline model version used to generate + // this summary. It is empty if a baseline model was not used to + // generate this summary. + BaselineModelVersion string `json:"baselineModelVersion,omitempty"` + // Text: The summary content that is concatenated into one string. Text string `json:"text,omitempty"` @@ -14676,20 +15347,22 @@ type GoogleCloudDialogflowV2beta1GenerateStatelessSummaryResponseSummary struct // There is no specific format for the key or value. TextSections map[string]string `json:"textSections,omitempty"` - // ForceSendFields is a list of field names (e.g. "Text") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "BaselineModelVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Text") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BaselineModelVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -14919,9 +15592,15 @@ type GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigSuggestionFeatureConfi // ConversationProcessConfig: Configs for processing conversation. ConversationProcessConfig *GoogleCloudDialogflowV2beta1HumanAgentAssistantConfigConversationProcessConfig `json:"conversationProcessConfig,omitempty"` + // DisableAgentQueryLogging: Optional. Disable the logging of search + // queries sent by human agents. It can prevent those queries from being + // stored at answer records. Supported features: KNOWLEDGE_SEARCH. + DisableAgentQueryLogging bool `json:"disableAgentQueryLogging,omitempty"` + // EnableEventBasedSuggestion: Automatically iterates all participants // and tries to compile suggestions. Supported features: - // ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, ENTITY_EXTRACTION. + // ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST, ENTITY_EXTRACTION, + // KNOWLEDGE_ASSIST. EnableEventBasedSuggestion bool `json:"enableEventBasedSuggestion,omitempty"` // QueryConfig: Configs of query. @@ -19562,6 +20241,178 @@ func (s *GoogleCloudDialogflowV2beta1SearchAgentsResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer: Represents a +// SearchKnowledge answer. +type GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer struct { + // Answer: The piece of text from the knowledge base documents that + // answers the search query + Answer string `json:"answer,omitempty"` + + // AnswerRecord: The name of the answer record. Format: + // `projects//locations//answer Records/` + AnswerRecord string `json:"answerRecord,omitempty"` + + // AnswerSources: All sources used to generate the answer. + AnswerSources []*GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource `json:"answerSources,omitempty"` + + // AnswerType: The type of the answer. + // + // Possible values: + // "ANSWER_TYPE_UNSPECIFIED" - The answer has a unspecified type. + // "FAQ" - The answer is from FAQ doucments. + // "GENERATIVE" - The answer is from generative model. + AnswerType string `json:"answerType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource: The +// sources of the answers. +type GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource struct { + // Snippet: The relevant snippet of the article. + Snippet string `json:"snippet,omitempty"` + + // Title: The title of the article. + Title string `json:"title,omitempty"` + + // Uri: The URI of the article. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Snippet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Snippet") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SearchKnowledgeAnswerAnswerSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1SearchKnowledgeRequest: The request +// message for Conversations.SearchKnowledge. +type GoogleCloudDialogflowV2beta1SearchKnowledgeRequest struct { + // Conversation: The conversation (between human agent and end user) + // where the search request is triggered. Format: + // `projects//locations//conversations/`. + Conversation string `json:"conversation,omitempty"` + + // ConversationProfile: Required. The conversation profile used to + // configure the search. Format: + // `projects//locations//conversationProfiles/`. + ConversationProfile string `json:"conversationProfile,omitempty"` + + // LatestMessage: The name of the latest conversation message when the + // request is triggered. Format: + // `projects//locations//conversations//messages/`. + LatestMessage string `json:"latestMessage,omitempty"` + + // Parent: The parent resource contains the conversation profile Format: + // 'projects/' or `projects//locations/`. + Parent string `json:"parent,omitempty"` + + // Query: Required. The natural language text query for knowledge + // search. + Query *GoogleCloudDialogflowV2beta1TextInput `json:"query,omitempty"` + + // SessionId: The ID of the search session. The session_id can be + // combined with Dialogflow V3 Agent ID retrieved from conversation + // profile or on its own to identify a search session. The search + // history of the same session will impact the search result. It's up to + // the API caller to choose an appropriate `Session ID`. It can be a + // random number or some type of session identifiers (preferably + // hashed). The length must not exceed 36 characters. + SessionId string `json:"sessionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Conversation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Conversation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SearchKnowledgeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowV2beta1SearchKnowledgeResponse: The response +// message for Conversations.SearchKnowledge. +type GoogleCloudDialogflowV2beta1SearchKnowledgeResponse struct { + // Answers: Most relevant snippets extracted from articles in the given + // knowledge base, ordered by confidence. + Answers []*GoogleCloudDialogflowV2beta1SearchKnowledgeAnswer `json:"answers,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Answers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowV2beta1SearchKnowledgeResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowV2beta1Sentiment: The sentiment, such as // positive/negative feeling or association, for a unit of analysis, // such as the query text. See: @@ -19796,6 +20647,8 @@ type GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata str // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -20016,6 +20869,10 @@ type GoogleCloudDialogflowV2beta1SpeechToTextConfig struct { // to make your project eligible. SpeechModelVariant string `json:"speechModelVariant,omitempty"` + // UseTimeoutBasedEndpointing: Use timeout based endpointing, + // interpreting endpointer sensitivy as seconds of timeout value. + UseTimeoutBasedEndpointing bool `json:"useTimeoutBasedEndpointing,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -20255,6 +21112,11 @@ type GoogleCloudDialogflowV2beta1SuggestConversationSummaryResponseSummary struc // "projects//answerRecords/" AnswerRecord string `json:"answerRecord,omitempty"` + // BaselineModelVersion: The baseline model version used to generate + // this summary. It is empty if a baseline model was not used to + // generate this summary. + BaselineModelVersion string `json:"baselineModelVersion,omitempty"` + // Text: The summary content that is concatenated into one string. Text string `json:"text,omitempty"` @@ -20671,6 +21533,8 @@ type GoogleCloudDialogflowV2beta1SuggestionFeature struct { // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Type") to @@ -38818,6 +39682,154 @@ func (c *ProjectsConversationsParticipantsSuggestionsSuggestSmartRepliesCall) Do } +// method id "dialogflow.projects.conversations.suggestions.searchKnowledge": + +type ProjectsConversationsSuggestionsSearchKnowledgeCall struct { + s *Service + conversation string + googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - conversation: The conversation (between human agent and end user) +// where the search request is triggered. Format: +// `projects//locations//conversations/`. +func (r *ProjectsConversationsSuggestionsService) SearchKnowledge(conversation string, googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest) *ProjectsConversationsSuggestionsSearchKnowledgeCall { + c := &ProjectsConversationsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversation = conversation + c.googleclouddialogflowv2beta1searchknowledgerequest = googleclouddialogflowv2beta1searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsConversationsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsConversationsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+conversation}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "conversation": c.conversation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.conversations.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsConversationsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2beta1SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2beta1/projects/{projectsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.conversations.suggestions.searchKnowledge", + // "parameterOrder": [ + // "conversation" + // ], + // "parameters": { + // "conversation": { + // "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+conversation}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.conversations.suggestions.suggestConversationSummary": type ProjectsConversationsSuggestionsSuggestConversationSummaryCall struct { @@ -55898,6 +56910,154 @@ func (c *ProjectsLocationsConversationsParticipantsSuggestionsSuggestSmartReplie } +// method id "dialogflow.projects.locations.conversations.suggestions.searchKnowledge": + +type ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall struct { + s *Service + conversation string + googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - conversation: The conversation (between human agent and end user) +// where the search request is triggered. Format: +// `projects//locations//conversations/`. +func (r *ProjectsLocationsConversationsSuggestionsService) SearchKnowledge(conversation string, googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest) *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall { + c := &ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.conversation = conversation + c.googleclouddialogflowv2beta1searchknowledgerequest = googleclouddialogflowv2beta1searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+conversation}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "conversation": c.conversation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.conversations.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsConversationsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2beta1SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/conversations/{conversationsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.locations.conversations.suggestions.searchKnowledge", + // "parameterOrder": [ + // "conversation" + // ], + // "parameters": { + // "conversation": { + // "description": "The conversation (between human agent and end user) where the search request is triggered. Format: `projects//locations//conversations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+conversation}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.locations.conversations.suggestions.suggestConversationSummary": type ProjectsLocationsConversationsSuggestionsSuggestConversationSummaryCall struct { @@ -58680,6 +59840,153 @@ func (c *ProjectsLocationsSuggestionsGenerateStatelessSummaryCall) Do(opts ...go } +// method id "dialogflow.projects.locations.suggestions.searchKnowledge": + +type ProjectsLocationsSuggestionsSearchKnowledgeCall struct { + s *Service + parent string + googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - parent: The parent resource contains the conversation profile +// Format: 'projects/' or `projects//locations/`. +func (r *ProjectsLocationsSuggestionsService) SearchKnowledge(parent string, googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest) *ProjectsLocationsSuggestionsSearchKnowledgeCall { + c := &ProjectsLocationsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2beta1searchknowledgerequest = googleclouddialogflowv2beta1searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsLocationsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2beta1SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.locations.suggestions.searchKnowledge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+parent}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.operations.cancel": type ProjectsOperationsCancelCall struct { @@ -59326,3 +60633,150 @@ func (c *ProjectsSuggestionsGenerateStatelessSummaryCall) Do(opts ...googleapi.C // } } + +// method id "dialogflow.projects.suggestions.searchKnowledge": + +type ProjectsSuggestionsSearchKnowledgeCall struct { + s *Service + parent string + googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchKnowledge: Get answers for the given query based on knowledge +// documents. +// +// - parent: The parent resource contains the conversation profile +// Format: 'projects/' or `projects//locations/`. +func (r *ProjectsSuggestionsService) SearchKnowledge(parent string, googleclouddialogflowv2beta1searchknowledgerequest *GoogleCloudDialogflowV2beta1SearchKnowledgeRequest) *ProjectsSuggestionsSearchKnowledgeCall { + c := &ProjectsSuggestionsSearchKnowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddialogflowv2beta1searchknowledgerequest = googleclouddialogflowv2beta1searchknowledgerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Fields(s ...googleapi.Field) *ProjectsSuggestionsSearchKnowledgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Context(ctx context.Context) *ProjectsSuggestionsSearchKnowledgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSuggestionsSearchKnowledgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowv2beta1searchknowledgerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+parent}/suggestions:searchKnowledge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.suggestions.searchKnowledge" call. +// Exactly one of *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDialogflowV2beta1SearchKnowledgeResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsSuggestionsSearchKnowledgeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowV2beta1SearchKnowledgeResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowV2beta1SearchKnowledgeResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Get answers for the given query based on knowledge documents.", + // "flatPath": "v2beta1/projects/{projectsId}/suggestions:searchKnowledge", + // "httpMethod": "POST", + // "id": "dialogflow.projects.suggestions.searchKnowledge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The parent resource contains the conversation profile Format: 'projects/' or `projects//locations/`.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta1/{+parent}/suggestions:searchKnowledge", + // "request": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowV2beta1SearchKnowledgeResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index d6893ea45b6..e998915b96d 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -294,6 +294,37 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "getGenerativeSettings": { + "description": "Gets the generative settings for the agent.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.getGenerativeSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Required. Language code of the generative settings.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Format: `projects//locations//agents//generativeSettings`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + "required": true, + "type": "string" + } + }, + "path": "v3/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3GenerativeSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "getValidationResult": { "description": "Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/validationResult", @@ -426,6 +457,41 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "updateGenerativeSettings": { + "description": "Updates the generative settings for the agent.", + "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agents.updateGenerativeSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Format: `projects//locations//agents//generativeSettings`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v3/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowCxV3GenerativeSettings" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3GenerativeSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "validate": { "description": "Validates the specified agent and creates or updates validation results. The agent in draft version is validated. Please call this API after the training is completed to get the complete validation results.", "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}:validate", @@ -4002,7 +4068,7 @@ } } }, - "revision": "20230810", + "revision": "20230906", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -4013,6 +4079,10 @@ "$ref": "GoogleCloudDialogflowCxV3GcsDestination", "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, "loggingSettings": { "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." @@ -4020,6 +4090,26 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings": { "description": "Define behaviors on logging.", "id": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", @@ -4068,6 +4158,10 @@ "description": "Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead.", "type": "boolean" }, + "genAppBuilderSettings": { + "$ref": "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings", + "description": "Gen App Builder-related agent-level settings." + }, "gitIntegrationSettings": { "$ref": "GoogleCloudDialogflowCxV3AgentGitIntegrationSettings", "description": "Git integration settings for this agent." @@ -4110,6 +4204,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings": { + "description": "Settings for Gen App Builder.", + "id": "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings", + "properties": { + "engine": { + "description": "Required. The full name of the Gen App Builder engine related to this agent if there is one. Format: `projects/{Project ID}/locations/{Location ID}/collections/{Collection ID}/engines/{Engine ID}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AgentGitIntegrationSettings": { "description": "Settings for connecting to Git repository for an agent.", "id": "GoogleCloudDialogflowCxV3AgentGitIntegrationSettings", @@ -4501,6 +4606,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", @@ -5299,6 +5431,10 @@ "description": "Flows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be \"consumed\". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.", "id": "GoogleCloudDialogflowCxV3Flow", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "description": { "description": "The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.", "type": "string" @@ -5314,6 +5450,10 @@ }, "type": "array" }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the flow. Format: `projects//locations//agents//flows/`.", "type": "string" @@ -5407,6 +5547,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -5503,6 +5647,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -5510,6 +5658,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -5612,6 +5764,97 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3GenerativeSettings": { + "description": "Settings for Generative AI.", + "id": "GoogleCloudDialogflowCxV3GenerativeSettings", + "properties": { + "fallbackSettings": { + "$ref": "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings", + "description": "Settings for Generative Fallback." + }, + "generativeSafetySettings": { + "$ref": "GoogleCloudDialogflowCxV3SafetySettings", + "description": "Settings for Generative Safety." + }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings", + "description": "Settings for knowledge connector." + }, + "languageCode": { + "description": "Language for this settings.", + "type": "string" + }, + "name": { + "description": "Format: `projects//locations//agents//generativeSettings`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings": { + "description": "Settings for Generative Fallback.", + "id": "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings", + "properties": { + "promptTemplates": { + "description": "Stored prompts that can be selected, for example default templates like \"conservative\" or \"chatty\", or user defined ones.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate" + }, + "type": "array" + }, + "selectedPrompt": { + "description": "Display name of the selected prompt.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate": { + "description": "Prompt template.", + "id": "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate", + "properties": { + "displayName": { + "description": "Prompt name.", + "type": "string" + }, + "frozen": { + "description": "If the flag is true, the prompt is frozen and cannot be modified by users.", + "type": "boolean" + }, + "promptText": { + "description": "Prompt text that is sent to a LLM on no-match default, placeholders are filled downstream. For example: \"Here is a conversation $conversation, a response is: \"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings": { + "description": "Settings for knowledge connector. These parameters are used for LLM prompt like \"You are . You are a helpful and verbose at , . Your task is to help humans on \".", + "id": "GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings", + "properties": { + "agent": { + "description": "Name of the virtual agent. Used for LLM prompt. Can be left empty.", + "type": "string" + }, + "agentIdentity": { + "description": "Identity of the agent, e.g. \"virtual agent\", \"AI assistant\".", + "type": "string" + }, + "agentScope": { + "description": "Agent scope, e.g. \"Example company website\", \"internal Example company website for employees\", \"manual of car owner\".", + "type": "string" + }, + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" + }, + "businessDescription": { + "description": "Company description, used for LLM prompt, e.g. \"a family company selling freshly roasted coffee beans\".", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", @@ -5976,6 +6219,36 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3ListAgentsResponse": { "description": "The response message for Agents.ListAgents.", "id": "GoogleCloudDialogflowCxV3ListAgentsResponse", @@ -6498,6 +6771,10 @@ "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -6517,12 +6794,16 @@ "$ref": "GoogleCloudDialogflowCxV3Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -6718,6 +6999,10 @@ "description": "Represents the result of a conversational query.", "id": "GoogleCloudDialogflowCxV3QueryResult", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding." + }, "currentPage": { "$ref": "GoogleCloudDialogflowCxV3Page", "description": "The current Page. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`." @@ -6852,6 +7137,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -6925,6 +7214,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", @@ -7209,6 +7504,35 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3SafetySettings": { + "description": "Settings for Generative Safety.", + "id": "GoogleCloudDialogflowCxV3SafetySettings", + "properties": { + "bannedPhrases": { + "description": "Banned phrases for generated text.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3SafetySettingsPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3SafetySettingsPhrase": { + "description": "Text input which can be used for prompt or banned phrases.", + "id": "GoogleCloudDialogflowCxV3SafetySettingsPhrase", + "properties": { + "languageCode": { + "description": "Required. Language code of the phrase.", + "type": "string" + }, + "text": { + "description": "Required. Text input which can be used for prompt or banned phrases.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3SecuritySettings": { "description": "Represents the settings related to security issues, such as data redaction and data retention. It may take hours for updates on the settings to propagate to all the related components and take effect.", "id": "GoogleCloudDialogflowCxV3SecuritySettings", @@ -7276,6 +7600,18 @@ ], "type": "string" }, + "retentionStrategy": { + "description": "Specifies the retention behavior defined by SecuritySettings.RetentionStrategy.", + "enum": [ + "RETENTION_STRATEGY_UNSPECIFIED", + "REMOVE_AFTER_CONVERSATION" + ], + "enumDescriptions": [ + "Retains the persisted data with Dialogflow's internal default 365d TTLs.", + "Removes data when the conversation ends. If there is no Conversation explicitly established, a default conversation ends when the corresponding Dialogflow session ends." + ], + "type": "string" + }, "retentionWindowDays": { "description": "Retains the data for the specified number of days. User must set a value lower than Dialogflow's default 365d TTL (30 days for Agent Assist traffic), higher value will be ignored and use default. Setting a value higher than that has no effect. A missing value or setting to 0 also means we use default TTL.", "format": "int32", @@ -7734,6 +8070,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -7966,7 +8306,8 @@ "FLOW", "PAGE", "PAGES", - "TRANSITION_ROUTE_GROUP" + "TRANSITION_ROUTE_GROUP", + "AGENT_TRANSITION_ROUTE_GROUP" ], "enumDescriptions": [ "Unspecified.", @@ -7982,7 +8323,8 @@ "Flow.", "Page.", "Multiple pages.", - "Transition route group." + "Transition route group.", + "Agent transition route group." ], "type": "string" }, @@ -8472,6 +8814,60 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettings": { + "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "properties": { + "audioExportGcsDestination": { + "$ref": "GoogleCloudDialogflowCxV3beta1GcsDestination", + "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" + }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, + "loggingSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", + "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings": { + "description": "Define behaviors on logging.", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", + "properties": { + "enableInteractionLogging": { + "description": "If true, DF Interaction logging is currently enabled.", + "type": "boolean" + }, + "enableStackdriverLogging": { + "description": "If true, StackDriver logging is currently enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AudioInput": { "description": "Represents the natural speech audio to be processed.", "id": "GoogleCloudDialogflowCxV3beta1AudioInput", @@ -8678,6 +9074,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3beta1DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", @@ -8935,6 +9358,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3beta1FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -8988,6 +9415,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3beta1Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -8995,6 +9426,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -9086,6 +9521,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1GcsDestination": { + "description": "Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.", + "id": "GoogleCloudDialogflowCxV3beta1GcsDestination", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", @@ -9366,10 +9812,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3beta1Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1Page": { "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3beta1Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -9389,12 +9869,16 @@ "$ref": "GoogleCloudDialogflowCxV3beta1Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -9541,6 +10025,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -9598,6 +10086,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", @@ -9969,6 +10463,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -10545,13 +11043,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -12305,13 +12805,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -12656,7 +13158,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -12664,7 +13167,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -14569,7 +15073,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -14577,7 +15082,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index a858ecb9108..9cc29788afb 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/dialogflow/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // dialogflowService, err := dialogflow.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dialogflow // import "google.golang.org/api/dialogflow/v3" import ( @@ -461,6 +475,10 @@ type GoogleCloudDialogflowCxV3AdvancedSettings struct { // Exposed at the following levels: - Agent level - Flow level AudioExportGcsDestination *GoogleCloudDialogflowCxV3GcsDestination `json:"audioExportGcsDestination,omitempty"` + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + // LoggingSettings: Settings for logging. Settings for Dialogflow // History, Contact Center messages, StackDriver logs, and speech // logging. Exposed at the following levels: - Agent level. @@ -491,6 +509,46 @@ func (s *GoogleCloudDialogflowCxV3AdvancedSettings) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings: Define // behaviors on logging. type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { @@ -569,6 +627,9 @@ type GoogleCloudDialogflowCxV3Agent struct { // for the agent. Please use agent.advanced_settings instead. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + // GenAppBuilderSettings: Gen App Builder-related agent-level settings. + GenAppBuilderSettings *GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings `json:"genAppBuilderSettings,omitempty"` + // GitIntegrationSettings: Git integration settings for this agent. GitIntegrationSettings *GoogleCloudDialogflowCxV3AgentGitIntegrationSettings `json:"gitIntegrationSettings,omitempty"` @@ -636,6 +697,38 @@ func (s *GoogleCloudDialogflowCxV3Agent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings: Settings for Gen +// App Builder. +type GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings struct { + // Engine: Required. The full name of the Gen App Builder engine related + // to this agent if there is one. Format: `projects/{Project + // ID}/locations/{Location ID}/collections/{Collection + // ID}/engines/{Engine ID}` + Engine string `json:"engine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AgentGitIntegrationSettings: Settings for // connecting to Git repository for an agent. type GoogleCloudDialogflowCxV3AgentGitIntegrationSettings struct { @@ -1357,6 +1450,52 @@ func (s *GoogleCloudDialogflowCxV3CreateVersionOperationMetadata) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata // for DeleteDocument operation. type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { @@ -2793,6 +2932,11 @@ func (s *GoogleCloudDialogflowCxV3ExportTestCasesResponse) MarshalJSON() ([]byte // different flow, the matched intent can be carried over and to be // consumed in the target flow. type GoogleCloudDialogflowCxV3Flow struct { + // AdvancedSettings: Hierarchical advanced settings for this flow. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // Description: The description of the flow. The maximum length is 500 // characters. If exceeded, the request is rejected. Description string `json:"description,omitempty"` @@ -2810,6 +2954,10 @@ type GoogleCloudDialogflowCxV3Flow struct { // event get executed, with the rest being ignored. EventHandlers []*GoogleCloudDialogflowCxV3EventHandler `json:"eventHandlers,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the flow. Format: // `projects//locations//agents//flows/`. Name string `json:"name,omitempty"` @@ -2844,7 +2992,7 @@ type GoogleCloudDialogflowCxV3Flow struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2852,12 +3000,13 @@ type GoogleCloudDialogflowCxV3Flow struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2991,6 +3140,11 @@ func (s *GoogleCloudDialogflowCxV3Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3FormParameter: Represents a form parameter. type GoogleCloudDialogflowCxV3FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -3026,7 +3180,7 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3034,12 +3188,13 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -3207,9 +3362,20 @@ func (s *GoogleCloudDialogflowCxV3FulfillIntentResponse) MarshalJSON() ([]byte, // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"` @@ -3238,7 +3404,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3246,7 +3412,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -3428,6 +3594,176 @@ func (s *GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3GenerativeSettings: Settings for Generative +// AI. +type GoogleCloudDialogflowCxV3GenerativeSettings struct { + // FallbackSettings: Settings for Generative Fallback. + FallbackSettings *GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings `json:"fallbackSettings,omitempty"` + + // GenerativeSafetySettings: Settings for Generative Safety. + GenerativeSafetySettings *GoogleCloudDialogflowCxV3SafetySettings `json:"generativeSafetySettings,omitempty"` + + // KnowledgeConnectorSettings: Settings for knowledge connector. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + + // LanguageCode: Language for this settings. + LanguageCode string `json:"languageCode,omitempty"` + + // Name: Format: `projects//locations//agents//generativeSettings`. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FallbackSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FallbackSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GenerativeSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GenerativeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings: Settings +// for Generative Fallback. +type GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings struct { + // PromptTemplates: Stored prompts that can be selected, for example + // default templates like "conservative" or "chatty", or user defined + // ones. + PromptTemplates []*GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate `json:"promptTemplates,omitempty"` + + // SelectedPrompt: Display name of the selected prompt. + SelectedPrompt string `json:"selectedPrompt,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PromptTemplates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PromptTemplates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTempl +// ate: Prompt template. +type GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate struct { + // DisplayName: Prompt name. + DisplayName string `json:"displayName,omitempty"` + + // Frozen: If the flag is true, the prompt is frozen and cannot be + // modified by users. + Frozen bool `json:"frozen,omitempty"` + + // PromptText: Prompt text that is sent to a LLM on no-match default, + // placeholders are filled downstream. For example: "Here is a + // conversation $conversation, a response is: " + PromptText string `json:"promptText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings: +// +// Settings for knowledge connector. These parameters are used for LLM +// +// prompt like "You are . You are a helpful and verbose at , . Your task +// is to help humans on ". +type GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings struct { + // Agent: Name of the virtual agent. Used for LLM prompt. Can be left + // empty. + Agent string `json:"agent,omitempty"` + + // AgentIdentity: Identity of the agent, e.g. "virtual agent", "AI + // assistant". + AgentIdentity string `json:"agentIdentity,omitempty"` + + // AgentScope: Agent scope, e.g. "Example company website", "internal + // Example company website for employees", "manual of car owner". + AgentScope string `json:"agentScope,omitempty"` + + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` + + // BusinessDescription: Company description, used for LLM prompt, e.g. + // "a family company selling freshly roasted coffee beans". + BusinessDescription string `json:"businessDescription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Agent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Agent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata // in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { @@ -4158,6 +4494,59 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3KnowledgeConnectorSettings: The Knowledge +// Connector settings for this page or flow. This includes information +// such as the attached Knowledge Bases, and the way to execute +// fulfillment. +type GoogleCloudDialogflowCxV3KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3ListAgentsResponse: The response message for // Agents.ListAgents. type GoogleCloudDialogflowCxV3ListAgentsResponse struct { @@ -5211,8 +5600,13 @@ func (s *GoogleCloudDialogflowCxV3OutputAudioConfig) MarshalJSON() ([]byte, erro // the page. For more information, see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3Page struct { - // DisplayName: Required. The human-readable name of the page, unique - // within the flow. + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + + // DisplayName: Required. The human-readable name of the page, unique + // within the flow. DisplayName string `json:"displayName,omitempty"` // EntryFulfillment: The fulfillment to call when the session is @@ -5227,19 +5621,25 @@ type GoogleCloudDialogflowCxV3Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -5262,7 +5662,7 @@ type GoogleCloudDialogflowCxV3Page struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5270,12 +5670,13 @@ type GoogleCloudDialogflowCxV3Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5587,6 +5988,14 @@ func (s *GoogleCloudDialogflowCxV3QueryParameters) MarshalJSON() ([]byte, error) // GoogleCloudDialogflowCxV3QueryResult: Represents the result of a // conversational query. type GoogleCloudDialogflowCxV3QueryResult struct { + // AdvancedSettings: Returns the current advanced settings including IVR + // settings. Even though the operations configured by these settings are + // performed by Dialogflow, the client may need to perform special logic + // at the moment. For example, if Dialogflow exports audio to Google + // Cloud Storage, then the client may need to wait for the resulting + // object to appear in the bucket before proceeding. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // CurrentPage: The current Page. Some, not all fields are filled in // this message, including but not limited to `name` and `display_name`. CurrentPage *GoogleCloudDialogflowCxV3Page `json:"currentPage,omitempty"` @@ -5682,7 +6091,7 @@ type GoogleCloudDialogflowCxV3QueryResult struct { // sequence. WebhookStatuses []*GoogleRpcStatus `json:"webhookStatuses,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentPage") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5690,12 +6099,13 @@ type GoogleCloudDialogflowCxV3QueryResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentPage") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -5811,6 +6221,10 @@ type GoogleCloudDialogflowCxV3ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -5922,6 +6336,13 @@ func (s *GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess) MarshalJSO type GoogleCloudDialogflowCxV3ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard: Represents +// info card response. If the response contains generative knowledge +// prediction, Dialogflow will return a payload with Infobot Messenger +// compatible info card. Otherwise, the info card response is skipped. +type GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff: Indicates // that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -6513,6 +6934,68 @@ func (s *GoogleCloudDialogflowCxV3RunTestCaseResponse) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3SafetySettings: Settings for Generative +// Safety. +type GoogleCloudDialogflowCxV3SafetySettings struct { + // BannedPhrases: Banned phrases for generated text. + BannedPhrases []*GoogleCloudDialogflowCxV3SafetySettingsPhrase `json:"bannedPhrases,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BannedPhrases") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BannedPhrases") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3SafetySettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3SafetySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3SafetySettingsPhrase: Text input which can +// be used for prompt or banned phrases. +type GoogleCloudDialogflowCxV3SafetySettingsPhrase struct { + // LanguageCode: Required. Language code of the phrase. + LanguageCode string `json:"languageCode,omitempty"` + + // Text: Required. Text input which can be used for prompt or banned + // phrases. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LanguageCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LanguageCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3SafetySettingsPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3SafetySettingsPhrase + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3SecuritySettings: Represents the settings // related to security issues, such as data redaction and data // retention. It may take hours for updates on the settings to propagate @@ -6601,6 +7084,17 @@ type GoogleCloudDialogflowCxV3SecuritySettings struct { // to be persisted. RedactionStrategy string `json:"redactionStrategy,omitempty"` + // RetentionStrategy: Specifies the retention behavior defined by + // SecuritySettings.RetentionStrategy. + // + // Possible values: + // "RETENTION_STRATEGY_UNSPECIFIED" - Retains the persisted data with + // Dialogflow's internal default 365d TTLs. + // "REMOVE_AFTER_CONVERSATION" - Removes data when the conversation + // ends. If there is no Conversation explicitly established, a default + // conversation ends when the corresponding Dialogflow session ends. + RetentionStrategy string `json:"retentionStrategy,omitempty"` + // RetentionWindowDays: Retains the data for the specified number of // days. User must set a value lower than Dialogflow's default 365d TTL // (30 days for Agent Assist traffic), higher value will be ignored and @@ -7489,6 +7983,10 @@ type GoogleCloudDialogflowCxV3TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -7916,6 +8414,7 @@ type GoogleCloudDialogflowCxV3ValidationMessage struct { // "PAGE" - Page. // "PAGES" - Multiple pages. // "TRANSITION_ROUTE_GROUP" - Transition route group. + // "AGENT_TRANSITION_ROUTE_GROUP" - Agent transition route group. ResourceType string `json:"resourceType,omitempty"` // Resources: The names of the resources where the message is found. @@ -8712,6 +9211,132 @@ func (s *GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AdvancedSettings: Hierarchical advanced +// settings for agent/flow/page/fulfillment/parameter. Settings exposed +// at lower level overrides the settings exposed at higher level. +// Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides +// the playback_interruption_settings at the agent level, leaving other +// settings at the agent level unchanged. DTMF settings does not +// override each other. DTMF settings set at different levels define +// DTMF detections running in parallel. Hierarchy: +// Agent->Flow->Page->Fulfillment/Parameter. +type GoogleCloudDialogflowCxV3beta1AdvancedSettings struct { + // AudioExportGcsDestination: If present, incoming audio is exported by + // Dialogflow to the configured Google Cloud Storage destination. + // Exposed at the following levels: - Agent level - Flow level + AudioExportGcsDestination *GoogleCloudDialogflowCxV3beta1GcsDestination `json:"audioExportGcsDestination,omitempty"` + + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + + // LoggingSettings: Settings for logging. Settings for Dialogflow + // History, Contact Center messages, StackDriver logs, and speech + // logging. Exposed at the following levels: - Agent level. + LoggingSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings `json:"loggingSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AudioExportGcsDestination") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AudioExportGcsDestination") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings: Define +// behaviors on logging. +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { + // EnableInteractionLogging: If true, DF Interaction logging is + // currently enabled. + EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` + + // EnableStackdriverLogging: If true, StackDriver logging is currently + // enabled. + EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableInteractionLogging") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableInteractionLogging") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AudioInput: Represents the natural // speech audio to be processed. type GoogleCloudDialogflowCxV3beta1AudioInput struct { @@ -9078,6 +9703,52 @@ func (s *GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3beta1DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: // Metadata for DeleteDocument operation. type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { @@ -9596,6 +10267,11 @@ func (s *GoogleCloudDialogflowCxV3beta1Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3beta1FormParameter: Represents a form // parameter. type GoogleCloudDialogflowCxV3beta1FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -9631,7 +10307,7 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9639,12 +10315,13 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -9722,9 +10399,20 @@ func (s *GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior) MarshalJSON() // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3beta1Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` @@ -9753,7 +10441,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9761,7 +10449,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9911,19 +10599,17 @@ func (s *GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: -// Metadata in google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` +// GoogleCloudDialogflowCxV3beta1GcsDestination: Google Cloud Storage +// location for a Dialogflow operation that writes or exports objects +// (e.g. exported agent or transcripts) outside of Dialogflow. +type GoogleCloudDialogflowCxV3beta1GcsDestination struct { + // Uri: Required. The Google Cloud Storage URI for the exported objects. + // A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a + // full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to + // ForceSendFields is a list of field names (e.g. "Uri") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9931,7 +10617,7 @@ type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API + // NullFields is a list of field names (e.g. "Uri") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9940,13 +10626,48 @@ type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata +func (s *GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GcsDestination raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata: +// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: +// Metadata in google::longrunning::Operation for Knowledge operations. +type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { + // State: Required. Output only. The current state of this operation. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "PENDING" - The operation has been created. + // "RUNNING" - The operation is currently running. + // "DONE" - The operation is done, either cancelled or completed. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "State") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata: // Metadata for ImportDocuments operation. type GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata struct { // GenericMetadata: The generic information of the operation. @@ -10466,6 +11187,59 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings: The +// Knowledge Connector settings for this page or flow. This includes +// information such as the attached Knowledge Bases, and the way to +// execute fulfillment. +type GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3beta1DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1Page: A Dialogflow CX conversation // (session) can be described and visualized as a state machine. The // states of a CX session are represented by pages. For each flow, you @@ -10482,6 +11256,11 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( // see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3beta1Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -10498,19 +11277,25 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3beta1Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -10529,7 +11314,7 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // with only condition specified. TransitionRoutes []*GoogleCloudDialogflowCxV3beta1TransitionRoute `json:"transitionRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10537,12 +11322,13 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -10797,6 +11583,10 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -10897,6 +11687,14 @@ func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) Marsh type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard: +// Represents info card response. If the response contains generative +// knowledge prediction, Dialogflow will return a payload with Infobot +// Messenger compatible info card. Otherwise, the info card response is +// skipped. +type GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff: // Indicates that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -11602,6 +12400,10 @@ type GoogleCloudDialogflowCxV3beta1TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -12527,6 +13329,8 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata struct // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -15412,6 +16216,8 @@ type GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata struct { // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -16042,6 +16848,8 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata s // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -19293,6 +20101,8 @@ type GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata str // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -21304,6 +22114,167 @@ func (c *ProjectsLocationsAgentsGetCall) Do(opts ...googleapi.CallOption) (*Goog } +// method id "dialogflow.projects.locations.agents.getGenerativeSettings": + +type ProjectsLocationsAgentsGetGenerativeSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetGenerativeSettings: Gets the generative settings for the agent. +// +// - name: Format: `projects//locations//agents//generativeSettings`. +func (r *ProjectsLocationsAgentsService) GetGenerativeSettings(name string) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c := &ProjectsLocationsAgentsGetGenerativeSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// LanguageCode sets the optional parameter "languageCode": Required. +// Language code of the generative settings. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Context(ctx context.Context) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.getGenerativeSettings" call. +// Exactly one of *GoogleCloudDialogflowCxV3GenerativeSettings or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowCxV3GenerativeSettings.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3GenerativeSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowCxV3GenerativeSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the generative settings for the agent.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + // "httpMethod": "GET", + // "id": "dialogflow.projects.locations.agents.getGenerativeSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "languageCode": { + // "description": "Required. Language code of the generative settings.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Format: `projects//locations//agents//generativeSettings`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3/{+name}", + // "response": { + // "$ref": "GoogleCloudDialogflowCxV3GenerativeSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.locations.agents.getValidationResult": type ProjectsLocationsAgentsGetValidationResultCall struct { @@ -21980,6 +22951,166 @@ func (c *ProjectsLocationsAgentsRestoreCall) Do(opts ...googleapi.CallOption) (* } +// method id "dialogflow.projects.locations.agents.updateGenerativeSettings": + +type ProjectsLocationsAgentsUpdateGenerativeSettingsCall struct { + s *Service + name string + googleclouddialogflowcxv3generativesettings *GoogleCloudDialogflowCxV3GenerativeSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateGenerativeSettings: Updates the generative settings for the +// agent. +// +// - name: Format: `projects//locations//agents//generativeSettings`. +func (r *ProjectsLocationsAgentsService) UpdateGenerativeSettings(name string, googleclouddialogflowcxv3generativesettings *GoogleCloudDialogflowCxV3GenerativeSettings) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c := &ProjectsLocationsAgentsUpdateGenerativeSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddialogflowcxv3generativesettings = googleclouddialogflowcxv3generativesettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": The mask to +// control which fields get updated. If the mask is not present, all +// fields will be updated. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Context(ctx context.Context) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3generativesettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.updateGenerativeSettings" call. +// Exactly one of *GoogleCloudDialogflowCxV3GenerativeSettings or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowCxV3GenerativeSettings.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3GenerativeSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowCxV3GenerativeSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the generative settings for the agent.", + // "flatPath": "v3/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + // "httpMethod": "PATCH", + // "id": "dialogflow.projects.locations.agents.updateGenerativeSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Format: `projects//locations//agents//generativeSettings`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v3/{+name}", + // "request": { + // "$ref": "GoogleCloudDialogflowCxV3GenerativeSettings" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowCxV3GenerativeSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.locations.agents.validate": type ProjectsLocationsAgentsValidateCall struct { diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index 5927758ca5d..d8cd18b0c4f 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -294,6 +294,37 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "getGenerativeSettings": { + "description": "Gets the generative settings for the agent.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + "httpMethod": "GET", + "id": "dialogflow.projects.locations.agents.getGenerativeSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "languageCode": { + "description": "Required. Language code of the generative settings.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Format: `projects//locations//agents//generativeSettings`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + "required": true, + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "getValidationResult": { "description": "Gets the latest agent validation result. Agent validation is performed when ValidateAgent is called.", "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/validationResult", @@ -426,6 +457,41 @@ "https://www.googleapis.com/auth/dialogflow" ] }, + "updateGenerativeSettings": { + "description": "Updates the generative settings for the agent.", + "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + "httpMethod": "PATCH", + "id": "dialogflow.projects.locations.agents.updateGenerativeSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Format: `projects//locations//agents//generativeSettings`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v3beta1/{+name}", + "request": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettings" + }, + "response": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/dialogflow" + ] + }, "validate": { "description": "Validates the specified agent and creates or updates validation results. The agent in draft version is validated. Please call this API after the training is completed to get the complete validation results.", "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}:validate", @@ -4002,9 +4068,63 @@ } } }, - "revision": "20230810", + "revision": "20230906", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { + "GoogleCloudDialogflowCxV3AdvancedSettings": { + "description": "Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent-\u003eFlow-\u003ePage-\u003eFulfillment/Parameter.", + "id": "GoogleCloudDialogflowCxV3AdvancedSettings", + "properties": { + "audioExportGcsDestination": { + "$ref": "GoogleCloudDialogflowCxV3GcsDestination", + "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" + }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, + "loggingSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", + "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings": { + "description": "Define behaviors on logging.", + "id": "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings", + "properties": { + "enableInteractionLogging": { + "description": "If true, DF Interaction logging is currently enabled.", + "type": "boolean" + }, + "enableStackdriverLogging": { + "description": "If true, StackDriver logging is currently enabled.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AudioInput": { "description": "Represents the natural speech audio to be processed.", "id": "GoogleCloudDialogflowCxV3AudioInput", @@ -4211,6 +4331,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", @@ -4468,6 +4615,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -4521,6 +4672,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -4528,6 +4683,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -4619,6 +4778,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3GcsDestination": { + "description": "Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.", + "id": "GoogleCloudDialogflowCxV3GcsDestination", + "properties": { + "uri": { + "description": "Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", @@ -4899,10 +5069,44 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3Page": { "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -4922,12 +5126,16 @@ "$ref": "GoogleCloudDialogflowCxV3Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -5074,6 +5282,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -5147,6 +5359,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff", @@ -5518,6 +5736,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -5961,6 +6183,10 @@ "$ref": "GoogleCloudDialogflowCxV3beta1GcsDestination", "description": "If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level" }, + "dtmfSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "description": "Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level." + }, "loggingSettings": { "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", "description": "Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level." @@ -5968,6 +6194,26 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings": { + "description": "Define behaviors for DTMF (dual tone multi frequency).", + "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings", + "properties": { + "enabled": { + "description": "If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).", + "type": "boolean" + }, + "finishDigit": { + "description": "The digit that terminates a DTMF digit sequence.", + "type": "string" + }, + "maxDigits": { + "description": "Max length of DTMF digits.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings": { "description": "Define behaviors on logging.", "id": "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings", @@ -6016,6 +6262,10 @@ "description": "Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead.", "type": "boolean" }, + "genAppBuilderSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings", + "description": "Gen App Builder-related agent-level settings." + }, "gitIntegrationSettings": { "$ref": "GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings", "description": "Git integration settings for this agent." @@ -6058,6 +6308,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings": { + "description": "Settings for Gen App Builder.", + "id": "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings", + "properties": { + "engine": { + "description": "Required. The full name of the Gen App Builder engine related to this agent if there is one. Format: `projects/{Project ID}/locations/{Location ID}/collections/{Collection ID}/engines/{Engine ID}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings": { "description": "Settings for connecting to Git repository for an agent.", "id": "GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings", @@ -6449,6 +6710,33 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1DataStoreConnection": { + "description": "A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.", + "id": "GoogleCloudDialogflowCxV3beta1DataStoreConnection", + "properties": { + "dataStore": { + "description": "The full name of the referenced data store. Formats: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` `projects/{project}/locations/{location}/dataStores/{data_store}`", + "type": "string" + }, + "dataStoreType": { + "description": "The type of the connected data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "PUBLIC_WEB", + "UNSTRUCTURED", + "STRUCTURED" + ], + "enumDescriptions": [ + "Not specified. This value indicates that the data store type is not specified, so it will not be used during search.", + "A data store that contains public web content.", + "A data store that contains unstructured private data.", + "A data store that contains structured data (for example FAQ)." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { "description": "Metadata for DeleteDocument operation.", "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", @@ -7247,6 +7535,10 @@ "description": "Flows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be \"consumed\". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.", "id": "GoogleCloudDialogflowCxV3beta1Flow", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "description": { "description": "The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.", "type": "string" @@ -7262,6 +7554,10 @@ }, "type": "array" }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the flow. Format: `projects//locations//agents//flows/`.", "type": "string" @@ -7355,6 +7651,10 @@ "description": "Represents a form parameter.", "id": "GoogleCloudDialogflowCxV3beta1FormParameter", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "defaultValue": { "description": "The default value of an optional parameter. If the parameter is required, the default value will be ignored.", "type": "any" @@ -7451,6 +7751,10 @@ "description": "A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.", "id": "GoogleCloudDialogflowCxV3beta1Fulfillment", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "conditionalCases": { "description": "Conditional cases for this fulfillment.", "items": { @@ -7458,6 +7762,10 @@ }, "type": "array" }, + "enableGenerativeFallback": { + "description": "If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.", + "type": "boolean" + }, "messages": { "description": "The list of rich message responses to present to the user.", "items": { @@ -7560,6 +7868,97 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1GenerativeSettings": { + "description": "Settings for Generative AI.", + "id": "GoogleCloudDialogflowCxV3beta1GenerativeSettings", + "properties": { + "fallbackSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings", + "description": "Settings for Generative Fallback." + }, + "generativeSafetySettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1SafetySettings", + "description": "Settings for Generative Safety." + }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings", + "description": "Settings for knowledge connector." + }, + "languageCode": { + "description": "Language for this settings.", + "type": "string" + }, + "name": { + "description": "Format: `projects//locations//agents//generativeSettings`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings": { + "description": "Settings for Generative Fallback.", + "id": "GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings", + "properties": { + "promptTemplates": { + "description": "Stored prompts that can be selected, for example default templates like \"conservative\" or \"chatty\", or user defined ones.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate" + }, + "type": "array" + }, + "selectedPrompt": { + "description": "Display name of the selected prompt.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate": { + "description": "Prompt template.", + "id": "GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate", + "properties": { + "displayName": { + "description": "Prompt name.", + "type": "string" + }, + "frozen": { + "description": "If the flag is true, the prompt is frozen and cannot be modified by users.", + "type": "boolean" + }, + "promptText": { + "description": "Prompt text that is sent to a LLM on no-match default, placeholders are filled downstream. For example: \"Here is a conversation $conversation, a response is: \"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings": { + "description": "Settings for knowledge connector. These parameters are used for LLM prompt like \"You are . You are a helpful and verbose at , . Your task is to help humans on \".", + "id": "GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings", + "properties": { + "agent": { + "description": "Name of the virtual agent. Used for LLM prompt. Can be left empty.", + "type": "string" + }, + "agentIdentity": { + "description": "Identity of the agent, e.g. \"virtual agent\", \"AI assistant\".", + "type": "string" + }, + "agentScope": { + "description": "Agent scope, e.g. \"Example company website\", \"internal Example company website for employees\", \"manual of car owner\".", + "type": "string" + }, + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" + }, + "businessDescription": { + "description": "Company description, used for LLM prompt, e.g. \"a family company selling freshly roasted coffee beans\".", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { "description": "Metadata in google::longrunning::Operation for Knowledge operations.", "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", @@ -7924,6 +8323,36 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings": { + "description": "The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.", + "id": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "properties": { + "dataStoreConnections": { + "description": "Optional. List of related data store connections.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1DataStoreConnection" + }, + "type": "array" + }, + "enabled": { + "description": "Whether Knowledge Connector is enabled or not.", + "type": "boolean" + }, + "targetFlow": { + "description": "The target flow to transition to. Format: `projects//locations//agents//flows/`.", + "type": "string" + }, + "targetPage": { + "description": "The target page to transition to. Format: `projects//locations//agents//flows//pages/`.", + "type": "string" + }, + "triggerFulfillment": { + "$ref": "GoogleCloudDialogflowCxV3beta1Fulfillment", + "description": "The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter `$request.knowledge.answers` (contains up to the 5 highest confidence answers) and `$request.knowledge.questions` (contains the corresponding questions) to construct the fulfillment." + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ListAgentsResponse": { "description": "The response message for Agents.ListAgents.", "id": "GoogleCloudDialogflowCxV3beta1ListAgentsResponse", @@ -8446,6 +8875,10 @@ "description": "A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).", "id": "GoogleCloudDialogflowCxV3beta1Page", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level." + }, "displayName": { "description": "Required. The human-readable name of the page, unique within the flow.", "type": "string" @@ -8465,12 +8898,16 @@ "$ref": "GoogleCloudDialogflowCxV3beta1Form", "description": "The form associated with the page, used for collecting parameters relevant to the page." }, + "knowledgeConnectorSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings", + "description": "Optional. Knowledge connector configuration." + }, "name": { "description": "The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.", "type": "string" }, "transitionRouteGroups": { - "description": "Ordered list of `TransitionRouteGroups` associated with the page. Transition route groups must be unique within a page. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", + "description": "Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -\u003e page's transition route group -\u003e flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.", "items": { "type": "string" }, @@ -8666,6 +9103,10 @@ "description": "Represents the result of a conversational query.", "id": "GoogleCloudDialogflowCxV3beta1QueryResult", "properties": { + "advancedSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AdvancedSettings", + "description": "Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding." + }, "currentPage": { "$ref": "GoogleCloudDialogflowCxV3beta1Page", "description": "The current Page. Some, not all fields are filled in this message, including but not limited to `name` and `display_name`." @@ -8800,6 +9241,10 @@ "description": "Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches `END_SESSION` page. It is not supposed to be defined by the user. It's guaranteed that there is at most one such message in each response.", "readOnly": true }, + "knowledgeInfoCard": { + "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "description": "Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger." + }, "liveAgentHandoff": { "$ref": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", "description": "Hands off conversation to a human agent." @@ -8857,6 +9302,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard": { + "description": "Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.", + "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard", + "properties": {}, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff": { "description": "Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff", @@ -9141,6 +9592,35 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1SafetySettings": { + "description": "Settings for Generative Safety.", + "id": "GoogleCloudDialogflowCxV3beta1SafetySettings", + "properties": { + "bannedPhrases": { + "description": "Banned phrases for generated text.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase": { + "description": "Text input which can be used for prompt or banned phrases.", + "id": "GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase", + "properties": { + "languageCode": { + "description": "Required. Language code of the phrase.", + "type": "string" + }, + "text": { + "description": "Required. Text input which can be used for prompt or banned phrases.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1SecuritySettings": { "description": "Represents the settings related to security issues, such as data redaction and data retention. It may take hours for updates on the settings to propagate to all the related components and take effect.", "id": "GoogleCloudDialogflowCxV3beta1SecuritySettings", @@ -9208,6 +9688,18 @@ ], "type": "string" }, + "retentionStrategy": { + "description": "Specifies the retention behavior defined by SecuritySettings.RetentionStrategy.", + "enum": [ + "RETENTION_STRATEGY_UNSPECIFIED", + "REMOVE_AFTER_CONVERSATION" + ], + "enumDescriptions": [ + "Retains the persisted data with Dialogflow's internal default 365d TTLs.", + "Removes data when the conversation ends. If there is no Conversation explicitly established, a default conversation ends when the corresponding Dialogflow session ends." + ], + "type": "string" + }, "retentionWindowDays": { "description": "Retains data in interaction logging for the specified number of days. This does not apply to Cloud logging, which is owned by the user - not Dialogflow. User must set a value lower than Dialogflow's default 365d TTL (30 days for Agent Assist traffic), higher value will be ignored and use default. Setting a value higher than that has no effect. A missing value or setting to 0 also means we use default TTL.", "format": "int32", @@ -9666,6 +10158,10 @@ "description": "The condition to evaluate against form parameters or session parameters. See the [conditions reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition). At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" }, + "description": { + "description": "Optional. The description of the transition route. The maximum length is 500 characters.", + "type": "string" + }, "intent": { "description": "The unique identifier of an Intent. Format: `projects//locations//agents//intents/`. Indicates that the transition can only happen when the given intent is matched. At least one of `intent` or `condition` must be specified. When both `intent` and `condition` are specified, the transition can only happen when both are fulfilled.", "type": "string" @@ -9898,7 +10394,8 @@ "FLOW", "PAGE", "PAGES", - "TRANSITION_ROUTE_GROUP" + "TRANSITION_ROUTE_GROUP", + "AGENT_TRANSITION_ROUTE_GROUP" ], "enumDescriptions": [ "Unspecified.", @@ -9914,7 +10411,8 @@ "Flow.", "Page.", "Multiple pages.", - "Transition route group." + "Transition route group.", + "Agent transition route group." ], "type": "string" }, @@ -10545,13 +11043,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -12305,13 +12805,15 @@ "TYPE_UNSPECIFIED", "ARTICLE_SUGGESTION", "FAQ", - "SMART_REPLY" + "SMART_REPLY", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", "Run article suggestion model for chat.", "Run FAQ model for chat.", - "Run smart reply model for chat." + "Run smart reply model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -12656,7 +13158,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -12664,7 +13167,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } @@ -14569,7 +15073,8 @@ "FAQ", "SMART_REPLY", "DIALOGFLOW_ASSIST", - "CONVERSATION_SUMMARIZATION" + "CONVERSATION_SUMMARIZATION", + "KNOWLEDGE_SEARCH" ], "enumDescriptions": [ "Unspecified feature type.", @@ -14577,7 +15082,8 @@ "Run FAQ model.", "Run smart reply model for chat.", "Run Dialogflow assist model for chat, which will return automated agent response as suggestion.", - "Run conversation summarization model for chat." + "Run conversation summarization model for chat.", + "Run knowledge search with text input from agent or text generated query." ], "type": "string" } diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index 5ba32114475..bc5544ee313 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/dialogflow/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // dialogflowService, err := dialogflow.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithScopes(dialogflow.DialogflowScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dialogflowService, err := dialogflow.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dialogflowService, err := dialogflow.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dialogflow // import "google.golang.org/api/dialogflow/v3beta1" import ( @@ -445,6 +459,132 @@ type ProjectsOperationsService struct { s *Service } +// GoogleCloudDialogflowCxV3AdvancedSettings: Hierarchical advanced +// settings for agent/flow/page/fulfillment/parameter. Settings exposed +// at lower level overrides the settings exposed at higher level. +// Overriding occurs at the sub-setting level. For example, the +// playback_interruption_settings at fulfillment level only overrides +// the playback_interruption_settings at the agent level, leaving other +// settings at the agent level unchanged. DTMF settings does not +// override each other. DTMF settings set at different levels define +// DTMF detections running in parallel. Hierarchy: +// Agent->Flow->Page->Fulfillment/Parameter. +type GoogleCloudDialogflowCxV3AdvancedSettings struct { + // AudioExportGcsDestination: If present, incoming audio is exported by + // Dialogflow to the configured Google Cloud Storage destination. + // Exposed at the following levels: - Agent level - Flow level + AudioExportGcsDestination *GoogleCloudDialogflowCxV3GcsDestination `json:"audioExportGcsDestination,omitempty"` + + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + + // LoggingSettings: Settings for logging. Settings for Dialogflow + // History, Contact Center messages, StackDriver logs, and speech + // logging. Exposed at the following levels: - Agent level. + LoggingSettings *GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings `json:"loggingSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AudioExportGcsDestination") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AudioExportGcsDestination") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings: Define +// behaviors on logging. +type GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings struct { + // EnableInteractionLogging: If true, DF Interaction logging is + // currently enabled. + EnableInteractionLogging bool `json:"enableInteractionLogging,omitempty"` + + // EnableStackdriverLogging: If true, StackDriver logging is currently + // enabled. + EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableInteractionLogging") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableInteractionLogging") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AudioInput: Represents the natural speech // audio to be processed. type GoogleCloudDialogflowCxV3AudioInput struct { @@ -811,6 +951,52 @@ func (s *GoogleCloudDialogflowCxV3CreateVersionOperationMetadata) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata // for DeleteDocument operation. type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { @@ -1327,6 +1513,11 @@ func (s *GoogleCloudDialogflowCxV3Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3FormParameter: Represents a form parameter. type GoogleCloudDialogflowCxV3FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -1362,7 +1553,7 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1370,12 +1561,13 @@ type GoogleCloudDialogflowCxV3FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1453,9 +1645,20 @@ func (s *GoogleCloudDialogflowCxV3FormParameterFillBehavior) MarshalJSON() ([]by // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3ResponseMessage `json:"messages,omitempty"` @@ -1484,7 +1687,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1492,7 +1695,7 @@ type GoogleCloudDialogflowCxV3Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -1641,6 +1844,39 @@ func (s *GoogleCloudDialogflowCxV3FulfillmentSetParameterAction) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3GcsDestination: Google Cloud Storage +// location for a Dialogflow operation that writes or exports objects +// (e.g. exported agent or transcripts) outside of Dialogflow. +type GoogleCloudDialogflowCxV3GcsDestination struct { + // Uri: Required. The Google Cloud Storage URI for the exported objects. + // A URI is of the form: `gs://bucket/object-name-or-prefix` Whether a + // full object name, or just a prefix, its usage depends on the + // Dialogflow operation. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Uri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Uri") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3GcsDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata // in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { @@ -2196,6 +2432,59 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3KnowledgeConnectorSettings: The Knowledge +// Connector settings for this page or flow. This includes information +// such as the attached Knowledge Bases, and the way to execute +// fulfillment. +type GoogleCloudDialogflowCxV3KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3Page: A Dialogflow CX conversation (session) // can be described and visualized as a state machine. The states of a // CX session are represented by pages. For each flow, you define many @@ -2211,6 +2500,11 @@ func (s *GoogleCloudDialogflowCxV3IntentTrainingPhrasePart) MarshalJSON() ([]byt // the page. For more information, see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -2227,19 +2521,25 @@ type GoogleCloudDialogflowCxV3Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -2258,7 +2558,7 @@ type GoogleCloudDialogflowCxV3Page struct { // with only condition specified. TransitionRoutes []*GoogleCloudDialogflowCxV3TransitionRoute `json:"transitionRoutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2266,12 +2566,13 @@ type GoogleCloudDialogflowCxV3Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -2526,6 +2827,10 @@ type GoogleCloudDialogflowCxV3ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -2637,6 +2942,13 @@ func (s *GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess) MarshalJSO type GoogleCloudDialogflowCxV3ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard: Represents +// info card response. If the response contains generative knowledge +// prediction, Dialogflow will return a payload with Infobot Messenger +// compatible info card. Otherwise, the info card response is skipped. +type GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff: Indicates // that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -3340,6 +3652,10 @@ type GoogleCloudDialogflowCxV3TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -4050,6 +4366,10 @@ type GoogleCloudDialogflowCxV3beta1AdvancedSettings struct { // Exposed at the following levels: - Agent level - Flow level AudioExportGcsDestination *GoogleCloudDialogflowCxV3beta1GcsDestination `json:"audioExportGcsDestination,omitempty"` + // DtmfSettings: Settings for DTMF. Exposed at the following levels: - + // Agent level - Flow level - Page level - Parameter level. + DtmfSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings `json:"dtmfSettings,omitempty"` + // LoggingSettings: Settings for logging. Settings for Dialogflow // History, Contact Center messages, StackDriver logs, and speech // logging. Exposed at the following levels: - Agent level. @@ -4080,6 +4400,46 @@ func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettings) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings: Define +// behaviors for DTMF (dual tone multi frequency). +type GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings struct { + // Enabled: If true, incoming audio is processed for DTMF (dual tone + // multi frequency) events. For example, if the caller presses a button + // on their telephone keypad and DTMF processing is enabled, Dialogflow + // will detect the event (e.g. a "3" was pressed) in the incoming audio + // and pass the event to the bot to drive business logic (e.g. when 3 is + // pressed, return the account balance). + Enabled bool `json:"enabled,omitempty"` + + // FinishDigit: The digit that terminates a DTMF digit sequence. + FinishDigit string `json:"finishDigit,omitempty"` + + // MaxDigits: Max length of DTMF digits. + MaxDigits int64 `json:"maxDigits,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Enabled") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Enabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings: Define // behaviors on logging. type GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings struct { @@ -4158,6 +4518,9 @@ type GoogleCloudDialogflowCxV3beta1Agent struct { // for the agent. Please use agent.advanced_settings instead. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` + // GenAppBuilderSettings: Gen App Builder-related agent-level settings. + GenAppBuilderSettings *GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings `json:"genAppBuilderSettings,omitempty"` + // GitIntegrationSettings: Git integration settings for this agent. GitIntegrationSettings *GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings `json:"gitIntegrationSettings,omitempty"` @@ -4225,8 +4588,40 @@ func (s *GoogleCloudDialogflowCxV3beta1Agent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings: Settings -// for connecting to Git repository for an agent. +// GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings: Settings +// for Gen App Builder. +type GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings struct { + // Engine: Required. The full name of the Gen App Builder engine related + // to this agent if there is one. Format: `projects/{Project + // ID}/locations/{Location ID}/collections/{Collection + // ID}/engines/{Engine ID}` + Engine string `json:"engine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings: Settings +// for connecting to Git repository for an agent. type GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettings struct { // GithubSettings: GitHub settings. GithubSettings *GoogleCloudDialogflowCxV3beta1AgentGitIntegrationSettingsGithubSettings `json:"githubSettings,omitempty"` @@ -4946,6 +5341,52 @@ func (s *GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata) MarshalJS return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1DataStoreConnection: A data store +// connection. It represents a data store in Discovery Engine and the +// type of the contents it contains. +type GoogleCloudDialogflowCxV3beta1DataStoreConnection struct { + // DataStore: The full name of the referenced data store. Formats: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}` + // `projects/{project}/locations/{location}/dataStores/{data_store}` + DataStore string `json:"dataStore,omitempty"` + + // DataStoreType: The type of the connected data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Not specified. This value indicates + // that the data store type is not specified, so it will not be used + // during search. + // "PUBLIC_WEB" - A data store that contains public web content. + // "UNSTRUCTURED" - A data store that contains unstructured private + // data. + // "STRUCTURED" - A data store that contains structured data (for + // example FAQ). + DataStoreType string `json:"dataStoreType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1DataStoreConnection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: // Metadata for DeleteDocument operation. type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { @@ -6385,6 +6826,11 @@ func (s *GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse) MarshalJSON() ([ // different flow, the matched intent can be carried over and to be // consumed in the target flow. type GoogleCloudDialogflowCxV3beta1Flow struct { + // AdvancedSettings: Hierarchical advanced settings for this flow. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // Description: The description of the flow. The maximum length is 500 // characters. If exceeded, the request is rejected. Description string `json:"description,omitempty"` @@ -6402,6 +6848,10 @@ type GoogleCloudDialogflowCxV3beta1Flow struct { // event get executed, with the rest being ignored. EventHandlers []*GoogleCloudDialogflowCxV3beta1EventHandler `json:"eventHandlers,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the flow. Format: // `projects//locations//agents//flows/`. Name string `json:"name,omitempty"` @@ -6436,7 +6886,7 @@ type GoogleCloudDialogflowCxV3beta1Flow struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6444,12 +6894,13 @@ type GoogleCloudDialogflowCxV3beta1Flow struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -6585,6 +7036,11 @@ func (s *GoogleCloudDialogflowCxV3beta1Form) MarshalJSON() ([]byte, error) { // GoogleCloudDialogflowCxV3beta1FormParameter: Represents a form // parameter. type GoogleCloudDialogflowCxV3beta1FormParameter struct { + // AdvancedSettings: Hierarchical advanced settings for this parameter. + // The settings exposed at the lower level overrides the settings + // exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DefaultValue: The default value of an optional parameter. If the // parameter is required, the default value will be ignored. DefaultValue interface{} `json:"defaultValue,omitempty"` @@ -6620,7 +7076,7 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // filling concludes. Required bool `json:"required,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultValue") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6628,12 +7084,13 @@ type GoogleCloudDialogflowCxV3beta1FormParameter struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultValue") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -6801,9 +7258,20 @@ func (s *GoogleCloudDialogflowCxV3beta1FulfillIntentResponse) MarshalJSON() ([]b // call the webhook (for example, to load user data from a database), or // both. type GoogleCloudDialogflowCxV3beta1Fulfillment struct { + // AdvancedSettings: Hierarchical advanced settings for this + // fulfillment. The settings exposed at the lower level overrides the + // settings exposed at the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // ConditionalCases: Conditional cases for this fulfillment. ConditionalCases []*GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases `json:"conditionalCases,omitempty"` + // EnableGenerativeFallback: If the flag is true, the agent will utilize + // LLM to generate a text response. If LLM generation fails, the defined + // responses in the fulfillment will be respected. This flag is only + // useful for fulfillments associated with no-match event handlers. + EnableGenerativeFallback bool `json:"enableGenerativeFallback,omitempty"` + // Messages: The list of rich message responses to present to the user. Messages []*GoogleCloudDialogflowCxV3beta1ResponseMessage `json:"messages,omitempty"` @@ -6832,7 +7300,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // `projects//locations//agents//webhooks/`. Webhook string `json:"webhook,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionalCases") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6840,7 +7308,7 @@ type GoogleCloudDialogflowCxV3beta1Fulfillment struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionalCases") to + // NullFields is a list of field names (e.g. "AdvancedSettings") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7023,6 +7491,174 @@ func (s *GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1GenerativeSettings: Settings for +// Generative AI. +type GoogleCloudDialogflowCxV3beta1GenerativeSettings struct { + // FallbackSettings: Settings for Generative Fallback. + FallbackSettings *GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings `json:"fallbackSettings,omitempty"` + + // GenerativeSafetySettings: Settings for Generative Safety. + GenerativeSafetySettings *GoogleCloudDialogflowCxV3beta1SafetySettings `json:"generativeSafetySettings,omitempty"` + + // KnowledgeConnectorSettings: Settings for knowledge connector. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + + // LanguageCode: Language for this settings. + LanguageCode string `json:"languageCode,omitempty"` + + // Name: Format: `projects//locations//agents//generativeSettings`. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FallbackSettings") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FallbackSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GenerativeSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GenerativeSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings: +// Settings for Generative Fallback. +type GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings struct { + // PromptTemplates: Stored prompts that can be selected, for example + // default templates like "conservative" or "chatty", or user defined + // ones. + PromptTemplates []*GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate `json:"promptTemplates,omitempty"` + + // SelectedPrompt: Display name of the selected prompt. + SelectedPrompt string `json:"selectedPrompt,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PromptTemplates") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PromptTemplates") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPrompt +// Template: Prompt template. +type GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate struct { + // DisplayName: Prompt name. + DisplayName string `json:"displayName,omitempty"` + + // Frozen: If the flag is true, the prompt is frozen and cannot be + // modified by users. + Frozen bool `json:"frozen,omitempty"` + + // PromptText: Prompt text that is sent to a LLM on no-match default, + // placeholders are filled downstream. For example: "Here is a + // conversation $conversation, a response is: " + PromptText string `json:"promptText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GenerativeSettingsFallbackSettingsPromptTemplate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSett +// ings: Settings for knowledge connector. These parameters are used for +// LLM prompt like "You are . You are a helpful and verbose at , . Your +// task is to help humans on ". +type GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings struct { + // Agent: Name of the virtual agent. Used for LLM prompt. Can be left + // empty. + Agent string `json:"agent,omitempty"` + + // AgentIdentity: Identity of the agent, e.g. "virtual agent", "AI + // assistant". + AgentIdentity string `json:"agentIdentity,omitempty"` + + // AgentScope: Agent scope, e.g. "Example company website", "internal + // Example company website for employees", "manual of car owner". + AgentScope string `json:"agentScope,omitempty"` + + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` + + // BusinessDescription: Company description, used for LLM prompt, e.g. + // "a family company selling freshly roasted coffee beans". + BusinessDescription string `json:"businessDescription,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Agent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Agent") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1GenerativeSettingsKnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: // Metadata in google::longrunning::Operation for Knowledge operations. type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { @@ -7754,6 +8390,59 @@ func (s *GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings: The +// Knowledge Connector settings for this page or flow. This includes +// information such as the attached Knowledge Bases, and the way to +// execute fulfillment. +type GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings struct { + // DataStoreConnections: Optional. List of related data store + // connections. + DataStoreConnections []*GoogleCloudDialogflowCxV3beta1DataStoreConnection `json:"dataStoreConnections,omitempty"` + + // Enabled: Whether Knowledge Connector is enabled or not. + Enabled bool `json:"enabled,omitempty"` + + // TargetFlow: The target flow to transition to. Format: + // `projects//locations//agents//flows/`. + TargetFlow string `json:"targetFlow,omitempty"` + + // TargetPage: The target page to transition to. Format: + // `projects//locations//agents//flows//pages/`. + TargetPage string `json:"targetPage,omitempty"` + + // TriggerFulfillment: The fulfillment to be triggered. When the answers + // from the Knowledge Connector are selected by Dialogflow, you can + // utitlize the request scoped parameter `$request.knowledge.answers` + // (contains up to the 5 highest confidence answers) and + // `$request.knowledge.questions` (contains the corresponding questions) + // to construct the fulfillment. + TriggerFulfillment *GoogleCloudDialogflowCxV3beta1Fulfillment `json:"triggerFulfillment,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DataStoreConnections") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreConnections") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1ListAgentsResponse: The response // message for Agents.ListAgents. type GoogleCloudDialogflowCxV3beta1ListAgentsResponse struct { @@ -8809,6 +9498,11 @@ func (s *GoogleCloudDialogflowCxV3beta1OutputAudioConfig) MarshalJSON() ([]byte, // see the Page guide // (https://cloud.google.com/dialogflow/cx/docs/concept/page). type GoogleCloudDialogflowCxV3beta1Page struct { + // AdvancedSettings: Hierarchical advanced settings for this page. The + // settings exposed at the lower level overrides the settings exposed at + // the higher level. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // DisplayName: Required. The human-readable name of the page, unique // within the flow. DisplayName string `json:"displayName,omitempty"` @@ -8825,19 +9519,25 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // parameters relevant to the page. Form *GoogleCloudDialogflowCxV3beta1Form `json:"form,omitempty"` + // KnowledgeConnectorSettings: Optional. Knowledge connector + // configuration. + KnowledgeConnectorSettings *GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings `json:"knowledgeConnectorSettings,omitempty"` + // Name: The unique identifier of the page. Required for the // Pages.UpdatePage method. Pages.CreatePage populates the name // automatically. Format: `projects//locations//agents//flows//pages/`. Name string `json:"name,omitempty"` - // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` - // associated with the page. Transition route groups must be unique - // within a page. * If multiple transition routes within a page scope - // refer to the same intent, then the precedence order is: page's - // transition route -> page's transition route group -> flow's - // transition routes. * If multiple transition route groups within a - // page contain the same intent, then the first group in the ordered - // list takes precedence. + // TransitionRouteGroups: Ordered list of `TransitionRouteGroups` added + // to the page. Transition route groups must be unique within a page. If + // the page links both flow-level transition route groups and + // agent-level transition route groups, the flow-level ones will have + // higher priority and will be put before the agent-level ones. * If + // multiple transition routes within a page scope refer to the same + // intent, then the precedence order is: page's transition route -> + // page's transition route group -> flow's transition routes. * If + // multiple transition route groups within a page contain the same + // intent, then the first group in the ordered list takes precedence. // Format:`projects//locations//agents//flows//transitionRouteGroups/` // or `projects//locations//agents//transitionRouteGroups/` for // agent-level groups. @@ -8860,7 +9560,7 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8868,12 +9568,13 @@ type GoogleCloudDialogflowCxV3beta1Page struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -9185,6 +9886,14 @@ func (s *GoogleCloudDialogflowCxV3beta1QueryParameters) MarshalJSON() ([]byte, e // GoogleCloudDialogflowCxV3beta1QueryResult: Represents the result of a // conversational query. type GoogleCloudDialogflowCxV3beta1QueryResult struct { + // AdvancedSettings: Returns the current advanced settings including IVR + // settings. Even though the operations configured by these settings are + // performed by Dialogflow, the client may need to perform special logic + // at the moment. For example, if Dialogflow exports audio to Google + // Cloud Storage, then the client may need to wait for the resulting + // object to appear in the bucket before proceeding. + AdvancedSettings *GoogleCloudDialogflowCxV3beta1AdvancedSettings `json:"advancedSettings,omitempty"` + // CurrentPage: The current Page. Some, not all fields are filled in // this message, including but not limited to `name` and `display_name`. CurrentPage *GoogleCloudDialogflowCxV3beta1Page `json:"currentPage,omitempty"` @@ -9280,7 +9989,7 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // sequence. WebhookStatuses []*GoogleRpcStatus `json:"webhookStatuses,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentPage") to + // ForceSendFields is a list of field names (e.g. "AdvancedSettings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9288,13 +9997,14 @@ type GoogleCloudDialogflowCxV3beta1QueryResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentPage") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdvancedSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } func (s *GoogleCloudDialogflowCxV3beta1QueryResult) MarshalJSON() ([]byte, error) { @@ -9409,6 +10119,10 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessage struct { // is at most one such message in each response. EndInteraction *GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction `json:"endInteraction,omitempty"` + // KnowledgeInfoCard: Represents info card for knowledge answers, to be + // better rendered in Dialogflow Messenger. + KnowledgeInfoCard *GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard `json:"knowledgeInfoCard,omitempty"` + // LiveAgentHandoff: Hands off conversation to a human agent. LiveAgentHandoff *GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff `json:"liveAgentHandoff,omitempty"` @@ -9509,6 +10223,14 @@ func (s *GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess) Marsh type GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction struct { } +// GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard: +// Represents info card response. If the response contains generative +// knowledge prediction, Dialogflow will return a payload with Infobot +// Messenger compatible info card. Otherwise, the info card response is +// skipped. +type GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard struct { +} + // GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff: // Indicates that the conversation should be handed off to a live agent. // Dialogflow only uses this to determine which conversations were @@ -10101,6 +10823,68 @@ func (s *GoogleCloudDialogflowCxV3beta1RunTestCaseResponse) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1SafetySettings: Settings for Generative +// Safety. +type GoogleCloudDialogflowCxV3beta1SafetySettings struct { + // BannedPhrases: Banned phrases for generated text. + BannedPhrases []*GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase `json:"bannedPhrases,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BannedPhrases") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BannedPhrases") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1SafetySettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1SafetySettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase: Text input which +// can be used for prompt or banned phrases. +type GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase struct { + // LanguageCode: Required. Language code of the phrase. + LanguageCode string `json:"languageCode,omitempty"` + + // Text: Required. Text input which can be used for prompt or banned + // phrases. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LanguageCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LanguageCode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1SafetySettingsPhrase + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1SecuritySettings: Represents the // settings related to security issues, such as data redaction and data // retention. It may take hours for updates on the settings to propagate @@ -10189,6 +10973,17 @@ type GoogleCloudDialogflowCxV3beta1SecuritySettings struct { // to be persisted. RedactionStrategy string `json:"redactionStrategy,omitempty"` + // RetentionStrategy: Specifies the retention behavior defined by + // SecuritySettings.RetentionStrategy. + // + // Possible values: + // "RETENTION_STRATEGY_UNSPECIFIED" - Retains the persisted data with + // Dialogflow's internal default 365d TTLs. + // "REMOVE_AFTER_CONVERSATION" - Removes data when the conversation + // ends. If there is no Conversation explicitly established, a default + // conversation ends when the corresponding Dialogflow session ends. + RetentionStrategy string `json:"retentionStrategy,omitempty"` + // RetentionWindowDays: Retains data in interaction logging for the // specified number of days. This does not apply to Cloud logging, which // is owned by the user - not Dialogflow. User must set a value lower @@ -11080,6 +11875,10 @@ type GoogleCloudDialogflowCxV3beta1TransitionRoute struct { // happen when both are fulfilled. Condition string `json:"condition,omitempty"` + // Description: Optional. The description of the transition route. The + // maximum length is 500 characters. + Description string `json:"description,omitempty"` + // Intent: The unique identifier of an Intent. Format: // `projects//locations//agents//intents/`. Indicates that the // transition can only happen when the given intent is matched. At least @@ -11510,6 +12309,7 @@ type GoogleCloudDialogflowCxV3beta1ValidationMessage struct { // "PAGE" - Page. // "PAGES" - Multiple pages. // "TRANSITION_ROUTE_GROUP" - Transition route group. + // "AGENT_TRANSITION_ROUTE_GROUP" - Agent transition route group. ResourceType string `json:"resourceType,omitempty"` // Resources: The names of the resources where the message is found. @@ -12538,6 +13338,8 @@ type GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata struct // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -15423,6 +16225,8 @@ type GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata struct { // "ARTICLE_SUGGESTION" - Run article suggestion model for chat. // "FAQ" - Run FAQ model for chat. // "SMART_REPLY" - Run smart reply model for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -16053,6 +16857,8 @@ type GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata s // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -19304,6 +20110,8 @@ type GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata str // will return automated agent response as suggestion. // "CONVERSATION_SUMMARIZATION" - Run conversation summarization model // for chat. + // "KNOWLEDGE_SEARCH" - Run knowledge search with text input from + // agent or text generated query. SuggestionFeatureType string `json:"suggestionFeatureType,omitempty"` // ForceSendFields is a list of field names (e.g. "ConversationProfile") @@ -21317,6 +22125,167 @@ func (c *ProjectsLocationsAgentsGetCall) Do(opts ...googleapi.CallOption) (*Goog } +// method id "dialogflow.projects.locations.agents.getGenerativeSettings": + +type ProjectsLocationsAgentsGetGenerativeSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetGenerativeSettings: Gets the generative settings for the agent. +// +// - name: Format: `projects//locations//agents//generativeSettings`. +func (r *ProjectsLocationsAgentsService) GetGenerativeSettings(name string) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c := &ProjectsLocationsAgentsGetGenerativeSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// LanguageCode sets the optional parameter "languageCode": Required. +// Language code of the generative settings. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) LanguageCode(languageCode string) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Context(ctx context.Context) *ProjectsLocationsAgentsGetGenerativeSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.getGenerativeSettings" call. +// Exactly one of *GoogleCloudDialogflowCxV3beta1GenerativeSettings or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowCxV3beta1GenerativeSettings.ServerResponse.Heade +// r or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsGetGenerativeSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1GenerativeSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowCxV3beta1GenerativeSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the generative settings for the agent.", + // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + // "httpMethod": "GET", + // "id": "dialogflow.projects.locations.agents.getGenerativeSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "languageCode": { + // "description": "Required. Language code of the generative settings.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Format: `projects//locations//agents//generativeSettings`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v3beta1/{+name}", + // "response": { + // "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.locations.agents.getValidationResult": type ProjectsLocationsAgentsGetValidationResultCall struct { @@ -21994,6 +22963,166 @@ func (c *ProjectsLocationsAgentsRestoreCall) Do(opts ...googleapi.CallOption) (* } +// method id "dialogflow.projects.locations.agents.updateGenerativeSettings": + +type ProjectsLocationsAgentsUpdateGenerativeSettingsCall struct { + s *Service + name string + googleclouddialogflowcxv3beta1generativesettings *GoogleCloudDialogflowCxV3beta1GenerativeSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateGenerativeSettings: Updates the generative settings for the +// agent. +// +// - name: Format: `projects//locations//agents//generativeSettings`. +func (r *ProjectsLocationsAgentsService) UpdateGenerativeSettings(name string, googleclouddialogflowcxv3beta1generativesettings *GoogleCloudDialogflowCxV3beta1GenerativeSettings) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c := &ProjectsLocationsAgentsUpdateGenerativeSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddialogflowcxv3beta1generativesettings = googleclouddialogflowcxv3beta1generativesettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": The mask to +// control which fields get updated. If the mask is not present, all +// fields will be updated. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) UpdateMask(updateMask string) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Context(ctx context.Context) *ProjectsLocationsAgentsUpdateGenerativeSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddialogflowcxv3beta1generativesettings) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v3beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dialogflow.projects.locations.agents.updateGenerativeSettings" call. +// Exactly one of *GoogleCloudDialogflowCxV3beta1GenerativeSettings or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDialogflowCxV3beta1GenerativeSettings.ServerResponse.Heade +// r or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAgentsUpdateGenerativeSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDialogflowCxV3beta1GenerativeSettings, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDialogflowCxV3beta1GenerativeSettings{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the generative settings for the agent.", + // "flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/agents/{agentsId}/generativeSettings", + // "httpMethod": "PATCH", + // "id": "dialogflow.projects.locations.agents.updateGenerativeSettings", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Format: `projects//locations//agents//generativeSettings`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v3beta1/{+name}", + // "request": { + // "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettings" + // }, + // "response": { + // "$ref": "GoogleCloudDialogflowCxV3beta1GenerativeSettings" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/dialogflow" + // ] + // } + +} + // method id "dialogflow.projects.locations.agents.validate": type ProjectsLocationsAgentsValidateCall struct { diff --git a/digitalassetlinks/v1/digitalassetlinks-gen.go b/digitalassetlinks/v1/digitalassetlinks-gen.go index 7e94b1ac3ca..8d3604d4a72 100644 --- a/digitalassetlinks/v1/digitalassetlinks-gen.go +++ b/digitalassetlinks/v1/digitalassetlinks-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/digital-asset-links/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // digitalassetlinksService, err := digitalassetlinks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // digitalassetlinksService, err := digitalassetlinks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // digitalassetlinksService, err := digitalassetlinks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package digitalassetlinks // import "google.golang.org/api/digitalassetlinks/v1" import ( diff --git a/discovery/v1/discovery-gen.go b/discovery/v1/discovery-gen.go index 552219a4535..dad67ebe3b1 100644 --- a/discovery/v1/discovery-gen.go +++ b/discovery/v1/discovery-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/discovery/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // discoveryService, err := discovery.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // discoveryService, err := discovery.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // discoveryService, err := discovery.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package discovery // import "google.golang.org/api/discovery/v1" import ( diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 1b64519ae09..686426bff26 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -105,6 +105,122 @@ }, "protocol": "rest", "resources": { + "locations": { + "methods": { + "lookupWidgetConfig": { + "description": "Gets the Widget Config using the uuid.", + "flatPath": "v1alpha/locations/{locationsId}/lookupWidgetConfig", + "httpMethod": "POST", + "id": "discoveryengine.locations.lookupWidgetConfig", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where lookup widget will be performed. Format: `locations/{location}`", + "location": "path", + "pattern": "^locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+location}/lookupWidgetConfig", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "widgetCompleteQuery": { + "description": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", + "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + "httpMethod": "POST", + "id": "discoveryengine.locations.widgetCompleteQuery", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + "location": "path", + "pattern": "^locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+location}/widgetCompleteQuery", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "widgetConverseConversation": { + "description": "Converse a conversation with Widget.", + "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", + "httpMethod": "POST", + "id": "discoveryengine.locations.widgetConverseConversation", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + "location": "path", + "pattern": "^locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+location}/widgetConverseConversation", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "widgetSearch": { + "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", + "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", + "httpMethod": "POST", + "id": "discoveryengine.locations.widgetSearch", + "parameterOrder": [ + "location" + ], + "parameters": { + "location": { + "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + "location": "path", + "pattern": "^locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+location}/widgetSearch", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "projects": { "resources": { "locations": { @@ -2654,7 +2770,7 @@ } } }, - "revision": "20230814", + "revision": "20230905", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3034,6 +3150,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAdditionalParams": { + "description": "AdditionalParams message for WidgetService methods for security and privacy enhancement.", + "id": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", + "properties": { + "token": { + "description": "Token that used for non-human user check.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", @@ -3079,6 +3206,33 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest": { + "description": "Request message for CompletionService.CompleteQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest", + "properties": { + "dataStore": { + "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + "type": "string" + }, + "includeTailSuggestions": { + "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + "type": "boolean" + }, + "query": { + "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + "type": "string" + }, + "queryModel": { + "description": "Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for IndustryVertical.SITE_SEARCH dataStores.", + "type": "string" + }, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse": { "description": "Response message for CompletionService.CompleteQuery method.", "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse", @@ -3101,7 +3255,7 @@ "description": "Suggestions as search queries.", "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion", "properties": { - "completableFieldPath": { + "completableFieldPaths": { "description": "The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.", "items": { "type": "string" @@ -3226,6 +3380,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", "description": "The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session." }, + "name": { + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "type": "string" + }, "query": { "$ref": "GoogleCloudDiscoveryengineV1alphaTextInput", "description": "Required. Current user input." @@ -3238,6 +3396,10 @@ "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", "type": "string" }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", + "description": "A specification for configuring the summary returned in the response." + }, "userLabels": { "additionalProperties": { "type": "string" @@ -3874,6 +4036,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest": { + "description": "Request message for WidgetService.LookupWidgetConfig method.", + "id": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest", + "properties": { + "widgetConfigId": { + "description": "Required. The UUID of the Widget Config.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse": { + "description": "Response message for WidgetService.LookupWidgetConfig method.", + "id": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse", + "properties": { + "anonymousWidgetConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConfig", + "description": "The Anonymous Widget Config associated with the UUID." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaMediaInfo": { "description": "Media-specific user event information.", "id": "GoogleCloudDiscoveryengineV1alphaMediaInfo", @@ -4320,6 +4504,10 @@ "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" }, + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "type": "string" + }, "spellCorrectionSpec": { "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction takes effect." @@ -4405,6 +4593,16 @@ "format": "int32", "type": "integer" }, + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" + }, + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, "returnExtractiveSegmentScore": { "description": "Specifies whether to return the confidence score from the extractive segments in each search result. The default value is `false`.", "type": "boolean" @@ -4807,6 +5005,10 @@ "description": "Summary of the top N search result specified by the summary spec.", "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", "properties": { + "safetyAttributes": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes", + "description": "A collection of Safety Attribute categories and their associated confidence scores." + }, "summarySkippedReasons": { "description": "Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", "items": { @@ -4814,13 +5016,17 @@ "SUMMARY_SKIPPED_REASON_UNSPECIFIED", "ADVERSARIAL_QUERY_IGNORED", "NON_SUMMARY_SEEKING_QUERY_IGNORED", - "OUT_OF_DOMAIN_QUERY_IGNORED" + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION", + "LLM_ADDON_NOT_ENABLED" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", "The adversarial query ignored case. Only populated when SummarySpec.ignore_adversarial_query is set to `true`.", "The non-summary seeking query ignored case. Only populated when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", - "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B." + "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", + "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", + "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled." ], "type": "string" }, @@ -4833,6 +5039,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes": { + "description": "Safety Attribute categories and their associated confidence scores.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes", + "properties": { + "categories": { + "description": "The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scores": { + "description": "The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", @@ -4948,13 +5176,7 @@ }, "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", - "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "GoogleCloudDiscoveryengineV1alphaTextInput": { @@ -5131,6 +5353,304 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest": { + "description": "Request message for WidgetService.WidgetCompleteQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest", + "properties": { + "additionalParams": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", + "description": "Additional params for security and privacy enhancement." + }, + "completeQueryRequest": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest", + "description": "Required. The CompleteQuery request to perform auto-complete suggestion query." + }, + "configId": { + "description": "Required. The UUID of the WidgetConfig. This field is used to identify the widget configuration, set of models used to make the auto complete query.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse": { + "description": "Response message for WidgetService.WidgetCompleteQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse", + "properties": { + "uToken": { + "description": "The token in response.", + "type": "string" + }, + "widgetQuerySuggestions": { + "description": "Results of the matched query suggestions in widget. The result list is ordered and the first result is a top suggestion.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion": { + "description": "Suggestions as search queries.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion", + "properties": { + "suggestion": { + "description": "The suggestion for the query.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetConfig": { + "description": "WidgetConfig captures configs at the Widget level.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetConfig", + "properties": { + "allowPublicAccess": { + "description": "Whether allow no-auth integration with widget. If set true, public access to search or other solutions from widget is allowed without authenication token provided by customer hosted backend server.", + "type": "boolean" + }, + "allowlistedDomains": { + "description": "Allowlisted domains that can load this widget.", + "items": { + "type": "string" + }, + "type": "array" + }, + "configId": { + "description": "Output only. Unique obfuscated identifier of a WidgetConfig.", + "readOnly": true, + "type": "string" + }, + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "description": "The content search spec that configs the desired behavior of content search." + }, + "createTime": { + "description": "Output only. Timestamp the WidgetConfig was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataStoreType": { + "description": "Output only. The type of the parent data store.", + "enum": [ + "DATA_STORE_TYPE_UNSPECIFIED", + "SITE_SEARCH", + "STRUCTURED", + "UNSTRUCTURED" + ], + "enumDescriptions": [ + "Unspecified data store type.", + "The parent data store contains a site search engine.", + "The parent data store contains a search engine for structured data.", + "The parent data store contains a search engine for unstructured data." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The human readable widget config display name. Used in Discovery UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "enableAutocomplete": { + "description": "Whether or not to enable autocomplete.", + "type": "boolean" + }, + "enableConversationalSearch": { + "description": "Whether to allow conversational search (LLM, multi-turn) or not (non-LLM, single-turn).", + "type": "boolean" + }, + "enableQualityFeedback": { + "description": "Turn on or off collecting the search result quality feedback from end users.", + "type": "boolean" + }, + "enableResultScore": { + "description": "Whether to show the result score.", + "type": "boolean" + }, + "enableSafeSearch": { + "description": "Whether to enable safe search.", + "type": "boolean" + }, + "enableSnippetResultSummary": { + "description": "Turn on or off summary for each snippets result.", + "type": "boolean" + }, + "enableSummarization": { + "description": "Turn on or off summarization for the search response.", + "type": "boolean" + }, + "facetField": { + "description": "The configuration and appearance of facets in the end user view.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField" + }, + "type": "array" + }, + "fieldsUiComponentsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField" + }, + "description": "The key is the UI component. Mock. Currently supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, `custom3`. The value is the name of the field along with its device visibility. The 3 custom fields are optional and can be added or removed. `title`, `thumbnail`, `url` are required UI components that cannot be removed.", + "type": "object" + }, + "llmEnabled": { + "description": "Output only. Whether LLM is enabled in the corresponding data store.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Immutable. The full resource name of the widget config. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionType": { + "description": "Required. Immutable. Specifies the solution type that this WidgetConfig can be used for.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the WidgetConfig was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField": { + "description": "Facet fields that store the mapping of fields to end user widget appearance.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField", + "properties": { + "displayName": { + "description": "Optional. The field name that end users will see.", + "type": "string" + }, + "field": { + "description": "Required. Registered field name. The format is `field.abc`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField": { + "description": "Facet field that maps to a UI Component.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField", + "properties": { + "deviceVisibility": { + "description": "The field visibility on different types of devices.", + "items": { + "enum": [ + "DEVICE_VISIBILITY_UNSPECIFIED", + "MOBILE", + "DESKTOP" + ], + "enumDescriptions": [ + "Default value when not specified. Server returns INVALID_ARGUMENT if used in requests.", + "The UI component is visible on Mobile devices.", + "The UI component is visible on Browser-based client." + ], + "type": "string" + }, + "type": "array" + }, + "displayTemplate": { + "description": "The template to customize how the field is displayed. An example value would be a string that looks like: \"Price: {value}\".", + "type": "string" + }, + "field": { + "description": "Required. Registered field name. The format is `field.abc`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest": { + "description": "Request message for WidgetService.WidgetConverseConversation method.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest", + "properties": { + "additionalParams": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", + "description": "Additional params for security and privacy enhancement." + }, + "configId": { + "description": "Required. The UUID of the WidgetConfig. This field is used to identify the widget configuration, set of models used to make the user event collection.", + "type": "string" + }, + "conversationId": { + "description": "The id of the Conversation to get. Use \"-\" to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "type": "string" + }, + "converseConversationRequest": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest", + "description": "Required. The ConverseConversationRequest request to perform converse a conversation. The ServingConfig id will be `default_search` by default." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse": { + "description": "Response message for WidgetService.WidgetConverseConversation method.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse", + "properties": { + "conversationId": { + "description": "The id of the Conversation returned.", + "type": "string" + }, + "converseConversationResponse": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse", + "description": "ConverseConversationResponse returned from ConversationalSearchService.ConverseConversation." + }, + "uToken": { + "description": "The token in response.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest": { + "description": "Request message for WidgetService.WidgetSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest", + "properties": { + "additionalParams": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", + "description": "Additional params for security and privacy enhancement." + }, + "configId": { + "description": "Required. The UUID of the Search WidgetConfig. This field is used to identify the search widget configuration, set of models used to make the search.", + "type": "string" + }, + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest", + "description": "Required. The search request to perform search." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse": { + "description": "Response message for WidgetService.WidgetSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse", + "properties": { + "searchResponse": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse", + "description": "The search response after performing search." + }, + "uToken": { + "description": "The token in response.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata": { "description": "Metadata for Create Schema LRO.", "id": "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index c05aa08a604..2b5f62b6e2a 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/discovery-engine/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // discoveryengineService, err := discoveryengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // discoveryengineService, err := discoveryengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // discoveryengineService, err := discoveryengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package discoveryengine // import "google.golang.org/api/discoveryengine/v1alpha" import ( @@ -119,6 +132,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Locations = NewLocationsService(s) s.Projects = NewProjectsService(s) return s, nil } @@ -128,6 +142,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Locations *LocationsService + Projects *ProjectsService } @@ -138,6 +154,15 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewLocationsService(s *Service) *LocationsService { + rs := &LocationsService{s: s} + return rs +} + +type LocationsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -1265,6 +1290,36 @@ func (s *GoogleCloudDiscoveryengineV1UpdateSchemaMetadata) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAdditionalParams: AdditionalParams +// message for WidgetService methods for security and privacy +// enhancement. +type GoogleCloudDiscoveryengineV1alphaAdditionalParams struct { + // Token: Token that used for non-human user check. + Token string `json:"token,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Token") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Token") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAdditionalParams) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAdditionalParams + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse: // Response message for SiteSearchEngineService.BatchCreateTargetSites // method. @@ -1354,6 +1409,72 @@ func (s *GoogleCloudDiscoveryengineV1alphaBigQuerySource) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest: Request +// message for CompletionService.CompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { + // DataStore: Required. The parent data store resource name for which + // the completion is performed, such as + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store`. + DataStore string `json:"dataStore,omitempty"` + + // IncludeTailSuggestions: Indicates if tail suggestions should be + // returned if there are no suggestions that match the full query. Even + // if set to true, if there are suggestions that match the full query, + // those are returned and no tail suggestions are returned. + IncludeTailSuggestions bool `json:"includeTailSuggestions,omitempty"` + + // Query: Required. The typeahead input used to fetch suggestions. + // Maximum length is 128 characters. + Query string `json:"query,omitempty"` + + // QueryModel: Selects data model of query suggestions for serving. + // Currently supported values: * `document` - Using suggestions + // generated from user-imported documents. * `search-history` - Using + // suggestions generated from the past history of SearchService.Search + // API calls. Do not use it when there is no traffic for Search API. * + // `user-event` - Using suggestions generated from user-imported search + // events. * `document-completable` - Using suggestions taken directly + // from user-imported document fields marked as completable. Default + // values: * `document` is the default model for regular dataStores. * + // `search-history` is the default model for + // IndustryVertical.SITE_SEARCH dataStores. + QueryModel string `json:"queryModel,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. This should be the same identifier as + // UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field + // must be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse: Response // message for CompletionService.CompleteQuery method. type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse struct { @@ -1399,17 +1520,17 @@ func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse) MarshalJSON() ( // // Suggestions as search queries. type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion struct { - // CompletableFieldPath: The unique document field paths that serve as + // CompletableFieldPaths: The unique document field paths that serve as // the source of this suggestion if it was generated from completable // fields. This field is only populated for the document-completable // model. - CompletableFieldPath []string `json:"completableFieldPath,omitempty"` + CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` // Suggestion: The suggestion for the query. Suggestion string `json:"suggestion,omitempty"` // ForceSendFields is a list of field names (e.g. - // "CompletableFieldPath") to unconditionally include in API requests. + // "CompletableFieldPaths") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -1417,7 +1538,7 @@ type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion struc // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletableFieldPath") to + // NullFields is a list of field names (e.g. "CompletableFieldPaths") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -1603,6 +1724,16 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { // the conversation in auto session. Conversation *GoogleCloudDiscoveryengineV1alphaConversation `json:"conversation,omitempty"` + // Name: Required. The resource name of the Conversation to get. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion}/dataStores/{data_store_id}/conversations/{conversation_id}`. + // Use + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion}/dataStores/{data_store_id}/conversations/-` to activate auto + // session mode, which automatically creates a new conversation inside a + // ConverseConversation session. + Name string `json:"name,omitempty"` + // Query: Required. Current user input. Query *GoogleCloudDiscoveryengineV1alphaTextInput `json:"query,omitempty"` @@ -1616,6 +1747,10 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { // If this is not set, the default serving config will be used. ServingConfig string `json:"servingConfig,omitempty"` + // SummarySpec: A specification for configuring the summary returned in + // the response. + SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // UserLabels: The user labels applied to a resource must meet the // following requirements: * Each resource can have multiple labels, up // to a maximum of 64. * Each label must be a key-value pair. * Keys @@ -2796,6 +2931,72 @@ func (s *GoogleCloudDiscoveryengineV1alphaListSchemasResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest: Request +// message for WidgetService.LookupWidgetConfig method. +type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { + // WidgetConfigId: Required. The UUID of the Widget Config. + WidgetConfigId string `json:"widgetConfigId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "WidgetConfigId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "WidgetConfigId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse: Response +// message for WidgetService.LookupWidgetConfig method. +type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse struct { + // AnonymousWidgetConfig: The Anonymous Widget Config associated with + // the UUID. + AnonymousWidgetConfig *GoogleCloudDiscoveryengineV1alphaWidgetConfig `json:"anonymousWidgetConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AnonymousWidgetConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnonymousWidgetConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaMediaInfo: Media-specific user event // information. type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { @@ -3635,6 +3836,14 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // for website search. SafeSearch bool `json:"safeSearch,omitempty"` + // ServingConfig: Required. The resource name of the Search serving + // config, such as + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store/servingConfigs/default_serving_config`. This + // field is used to identify the serving configuration name, set of + // models used to make the search. + ServingConfig string `json:"servingConfig,omitempty"` + // SpellCorrectionSpec: The spell correction specification that // specifies the mode under which spell correction takes effect. SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` @@ -3856,6 +4065,15 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveCo // segments. Otherwise, return the `max_extractive_segment_count`. MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after + // each selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + + // NumPreviousSegments: Specifies whether to also include the adjacent + // from each selected segments. Return at most `num_previous_segments` + // segments before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the // confidence score from the extractive segments in each search result. // The default value is `false`. @@ -4640,6 +4858,10 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult) MarshalJSO // GoogleCloudDiscoveryengineV1alphaSearchResponseSummary: Summary of // the top N search result specified by the summary spec. type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { + // SafetyAttributes: A collection of Safety Attribute categories and + // their associated confidence scores. + SafetyAttributes *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` + // SummarySkippedReasons: Additional summary-skipped reasons. This // provides the reason for ignored cases. If nothing is skipped, this // field is not set. @@ -4657,21 +4879,25 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // case. Google skips the summary if there are no high-relevance search // results. For example, the data store contains facts about company A // but the user query is asking questions about company B. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the summary if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google + // skips the summary if the LLM addon is not enabled. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "SummarySkippedReasons") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SummarySkippedReasons") to + // NullFields is a list of field names (e.g. "SafetyAttributes") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -4687,6 +4913,57 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes +// : Safety Attribute categories and their associated confidence scores. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes struct { + // Categories: The display names of Safety Attribute categories + // associated with the generated content. Order matches the Scores. + Categories []string `json:"categories,omitempty"` + + // Scores: The confidence scores of the each category, higher value + // means higher confidence. Order matches the Categories. + Scores []float64 `json:"scores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Categories") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + // GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification // information for target sites in advanced site search. type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { @@ -4844,32 +5121,6 @@ func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() } type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total - // quota this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TotalRequiredQuota") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GoogleCloudDiscoveryengineV1alphaTextInput: Defines text input. @@ -5231,17 +5482,23 @@ func (s *GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for -// Create Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest: Request +// message for WidgetService.WidgetCompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // CompleteQueryRequest: Required. The CompleteQuery request to perform + // auto-complete suggestion query. + CompleteQueryRequest *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest `json:"completeQueryRequest,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ConfigId: Required. The UUID of the WidgetConfig. This field is used + // to identify the widget configuration, set of models used to make the + // auto complete query. + ConfigId string `json:"configId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalParams") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5249,32 +5506,38 @@ type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdditionalParams") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse: +// Response message for WidgetService.WidgetCompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // WidgetQuerySuggestions: Results of the matched query suggestions in + // widget. The result list is ordered and the first result is a top + // suggestion. + WidgetQuerySuggestions []*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion `json:"widgetQuerySuggestions,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "UToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5282,8 +5545,8 @@ type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "UToken") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5291,31 +5554,19 @@ type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuer +// ySuggestion: Suggestions as search queries. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion struct { + // Suggestion: The suggestion for the query. + Suggestion string `json:"suggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Suggestion") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5323,7 +5574,7 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Suggestion") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5332,27 +5583,149 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of -// the ImportDocumentsRequest. If the long running operation is done, -// then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConfig: WidgetConfig captures +// configs at the Widget level. +type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { + // AllowPublicAccess: Whether allow no-auth integration with widget. If + // set true, public access to search or other solutions from widget is + // allowed without authenication token provided by customer hosted + // backend server. + AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // AllowlistedDomains: Allowlisted domains that can load this widget. + AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ConfigId: Output only. Unique obfuscated identifier of a + // WidgetConfig. + ConfigId string `json:"configId,omitempty"` + + // ContentSearchSpec: The content search spec that configs the desired + // behavior of content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + + // CreateTime: Output only. Timestamp the WidgetConfig was created. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreType: Output only. The type of the parent data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Unspecified data store type. + // "SITE_SEARCH" - The parent data store contains a site search + // engine. + // "STRUCTURED" - The parent data store contains a search engine for + // structured data. + // "UNSTRUCTURED" - The parent data store contains a search engine for + // unstructured data. + DataStoreType string `json:"dataStoreType,omitempty"` + + // DisplayName: Required. The human readable widget config display name. + // Used in Discovery UI. This field must be a UTF-8 encoded string with + // a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // EnableAutocomplete: Whether or not to enable autocomplete. + EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` + + // EnableConversationalSearch: Whether to allow conversational search + // (LLM, multi-turn) or not (non-LLM, single-turn). + EnableConversationalSearch bool `json:"enableConversationalSearch,omitempty"` + + // EnableQualityFeedback: Turn on or off collecting the search result + // quality feedback from end users. + EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` + + // EnableResultScore: Whether to show the result score. + EnableResultScore bool `json:"enableResultScore,omitempty"` + + // EnableSafeSearch: Whether to enable safe search. + EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` + + // EnableSnippetResultSummary: Turn on or off summary for each snippets + // result. + EnableSnippetResultSummary bool `json:"enableSnippetResultSummary,omitempty"` + + // EnableSummarization: Turn on or off summarization for the search + // response. + EnableSummarization bool `json:"enableSummarization,omitempty"` + + // FacetField: The configuration and appearance of facets in the end + // user view. + FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` + + // FieldsUiComponentsMap: The key is the UI component. Mock. Currently + // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, + // `custom3`. The value is the name of the field along with its device + // visibility. The 3 custom fields are optional and can be added or + // removed. `title`, `thumbnail`, `url` are required UI components that + // cannot be removed. + FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + + // LlmEnabled: Output only. Whether LLM is enabled in the corresponding + // data store. + LlmEnabled bool `json:"llmEnabled,omitempty"` + + // Name: Immutable. The full resource name of the widget config. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + + // SolutionType: Required. Immutable. Specifies the solution type that + // this WidgetConfig can be used for. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the WidgetConfig was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowPublicAccess") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowPublicAccess") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField: Facet fields +// that store the mapping of fields to end user widget appearance. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { + // DisplayName: Optional. The field name that end users will see. + DisplayName string `json:"displayName,omitempty"` + + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5360,7 +5733,7 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include + // NullFields is a list of field names (e.g. "DisplayName") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -5369,22 +5742,33 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an - // empty, existing Cloud Storage directory. Import errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField: Facet +// field that maps to a UI Component. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { + // DeviceVisibility: The field visibility on different types of devices. + // + // Possible values: + // "DEVICE_VISIBILITY_UNSPECIFIED" - Default value when not specified. + // Server returns INVALID_ARGUMENT if used in requests. + // "MOBILE" - The UI component is visible on Mobile devices. + // "DESKTOP" - The UI component is visible on Browser-based client. + DeviceVisibility []string `json:"deviceVisibility,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // DisplayTemplate: The template to customize how the field is + // displayed. An example value would be a string that looks like: + // "Price: {value}". + DisplayTemplate string `json:"displayTemplate,omitempty"` + + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceVisibility") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5392,40 +5776,46 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "DeviceVisibility") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata -// related to the progress of the Import operation. This is returned by -// the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest: +// Request message for WidgetService.WidgetConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` + // ConfigId: Required. The UUID of the WidgetConfig. This field is used + // to identify the widget configuration, set of models used to make the + // user event collection. + ConfigId string `json:"configId,omitempty"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // ConversationId: The id of the Conversation to get. Use "-" to + // activate auto session mode, which automatically creates a new + // conversation inside a ConverseConversation session. + ConversationId string `json:"conversationId,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // ConverseConversationRequest: Required. The + // ConverseConversationRequest request to perform converse a + // conversation. The ServingConfig id will be `default_search` by + // default. + ConverseConversationRequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest `json:"converseConversationRequest,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AdditionalParams") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5433,44 +5823,40 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdditionalParams") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of -// the ImportUserEventsRequest. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this - // field was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse: +// Response message for WidgetService.WidgetConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct { + // ConversationId: The id of the Conversation returned. + ConversationId string `json:"conversationId,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // ConverseConversationResponse: ConverseConversationResponse returned + // from ConversationalSearchService.ConverseConversation. + ConverseConversationResponse *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse `json:"converseConversationResponse,omitempty"` - // JoinedEventsCount: Count of user events imported with complete - // existing Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "ConversationId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5478,40 +5864,38 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConversationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata -// related to the progress of the PurgeDocuments operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest: Request message +// for WidgetService.WidgetSearch method. +type GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // ConfigId: Required. The UUID of the Search WidgetConfig. This field + // is used to identify the search widget configuration, set of models + // used to make the search. + ConfigId string `json:"configId,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // SearchRequest: Required. The search request to perform search. + SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AdditionalParams") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5519,36 +5903,36 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AdditionalParams") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response -// message for DocumentService.PurgeDocuments method. If the long -// running operation is successfully done, then this message is returned -// by the google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse: Response +// message for WidgetService.WidgetSearch method. +type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { + // SearchResponse: The search response after performing search. + SearchResponse *GoogleCloudDiscoveryengineV1alphaSearchResponse `json:"searchResponse,omitempty"` - // PurgeSample: A sample of document names that will be deleted. Only - // populated if `force` is set to false. A max of 100 names will be - // returned and the names are chosen at random. - PurgeSample []string `json:"purgeSample,omitempty"` + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SearchResponse") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5556,38 +5940,33 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "SearchResponse") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and -// layout of a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - - // Name: Immutable. The full resource name of the schema, in the format - // of - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 - // encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for +// Create Schema LRO. +type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5595,7 +5974,7 @@ type GoogleCloudDiscoveryengineV1betaSchema struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") to include in + // NullFields is a list of field names (e.g. "CreateTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5604,15 +5983,15 @@ type GoogleCloudDiscoveryengineV1betaSchema struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema +func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { +// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -5637,27 +6016,31 @@ type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5665,61 +6048,68 @@ type GoogleLongrunningListOperationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Response: The normal, successful response of the operation. If the - // original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an + // empty, existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5727,8 +6117,8 @@ type GoogleLongrunningOperation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5736,45 +6126,31 @@ type GoogleLongrunningOperation struct { NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated empty messages in your APIs. A typical -// example is to use it as the request or the response type of an API -// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This is returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5782,8 +6158,8 @@ type GoogleRpcStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5791,37 +6167,35 @@ type GoogleRpcStatus struct { NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of +// the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Day") to + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5829,21 +6203,960 @@ type GoogleTypeDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata +// related to the progress of the PurgeDocuments operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response +// message for DocumentService.PurgeDocuments method. If the long +// running operation is successfully done, then this message is returned +// by the google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // PurgeSample: A sample of document names that will be deleted. Only + // populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and +// layout of a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + + // Name: Immutable. The full resource name of the schema, in the format + // of + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JsonSchema") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "discoveryengine.locations.lookupWidgetConfig": + +type LocationsLookupWidgetConfigCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// LookupWidgetConfig: Gets the Widget Config using the uuid. +// +// - location: The location resource where lookup widget will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) LookupWidgetConfig(location string, googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) *LocationsLookupWidgetConfigCall { + c := &LocationsLookupWidgetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest = googleclouddiscoveryenginev1alphalookupwidgetconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *LocationsLookupWidgetConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsLookupWidgetConfigCall) Context(ctx context.Context) *LocationsLookupWidgetConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsLookupWidgetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/lookupWidgetConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.lookupWidgetConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the Widget Config using the uuid.", + // "flatPath": "v1alpha/locations/{locationsId}/lookupWidgetConfig", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.lookupWidgetConfig", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where lookup widget will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/lookupWidgetConfig", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetCompleteQuery": + +type LocationsWidgetCompleteQueryCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetCompleteQuery: Performs a user input completion with keyword +// suggestion. Similar to the CompletionService.CompleteQuery method, +// but a widget version that allows CompleteQuery without API Key. It +// supports CompleteQuery with or without JWT token. +// +// - location: The location resource where widget complete query will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetCompleteQuery(location string, googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) *LocationsWidgetCompleteQueryCall { + c := &LocationsWidgetCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest = googleclouddiscoveryenginev1alphawidgetcompletequeryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsWidgetCompleteQueryCall) Fields(s ...googleapi.Field) *LocationsWidgetCompleteQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsWidgetCompleteQueryCall) Context(ctx context.Context) *LocationsWidgetCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsWidgetCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetCompleteQuery") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetCompleteQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetCompleteQuery", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetCompleteQuery", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetConverseConversation": + +type LocationsWidgetConverseConversationCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetConverseConversation: Converse a conversation with Widget. +// +// - location: The location resource where widget converse conversation +// will be performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { + c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsWidgetConverseConversationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetConverseConversation") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetConverseConversation" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S +// erverResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Converse a conversation with Widget.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetConverseConversation", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetConverseConversation", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetSearch": + +type LocationsWidgetSearchCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetSearch: Performs a search. Similar to the SearchService.Search +// method, but a widget version that allows search without API Key. It +// supports search with or without JWT token. +// +// - location: The location resource where widget search will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { + c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsWidgetSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetsearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetSearch") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetSearch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetSearch", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": type ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index cce4a7f6acb..205abb4bdcd 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -2598,7 +2598,7 @@ } } }, - "revision": "20230814", + "revision": "20230905", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3489,13 +3489,7 @@ }, "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", - "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", - "type": "string" - } - }, + "properties": {}, "type": "object" }, "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { @@ -3568,7 +3562,7 @@ "description": "Suggestions as search queries.", "id": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion", "properties": { - "completableFieldPath": { + "completableFieldPaths": { "description": "The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.", "items": { "type": "string" @@ -3705,6 +3699,10 @@ "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", "type": "string" }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec", + "description": "A specification for configuring the summary returned in the response." + }, "userLabels": { "additionalProperties": { "type": "string" @@ -4689,6 +4687,16 @@ "format": "int32", "type": "integer" }, + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" + }, + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, "returnExtractiveSegmentScore": { "description": "Specifies whether to return the confidence score from the extractive segments in each search result. The default value is `false`.", "type": "boolean" @@ -5091,6 +5099,10 @@ "description": "Summary of the top N search result specified by the summary spec.", "id": "GoogleCloudDiscoveryengineV1betaSearchResponseSummary", "properties": { + "safetyAttributes": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes", + "description": "A collection of Safety Attribute categories and their associated confidence scores." + }, "summarySkippedReasons": { "description": "Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", "items": { @@ -5098,13 +5110,17 @@ "SUMMARY_SKIPPED_REASON_UNSPECIFIED", "ADVERSARIAL_QUERY_IGNORED", "NON_SUMMARY_SEEKING_QUERY_IGNORED", - "OUT_OF_DOMAIN_QUERY_IGNORED" + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION", + "LLM_ADDON_NOT_ENABLED" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", "The adversarial query ignored case. Only populated when SummarySpec.ignore_adversarial_query is set to `true`.", "The non-summary seeking query ignored case. Only populated when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", - "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B." + "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", + "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", + "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled." ], "type": "string" }, @@ -5117,6 +5133,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes": { + "description": "Safety Attribute categories and their associated confidence scores.", + "id": "GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes", + "properties": { + "categories": { + "description": "The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scores": { + "description": "The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaTextInput": { "description": "Defines text input.", "id": "GoogleCloudDiscoveryengineV1betaTextInput", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 85b01f4cdb7..d8ad9fa9a46 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/discovery-engine/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // discoveryengineService, err := discoveryengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // discoveryengineService, err := discoveryengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // discoveryengineService, err := discoveryengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package discoveryengine // import "google.golang.org/api/discoveryengine/v1beta" import ( @@ -2071,32 +2084,6 @@ func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() } type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total - // quota this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TotalRequiredQuota") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } // GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for @@ -2235,17 +2222,17 @@ func (s *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse) MarshalJSON() ([ // GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion: // Suggestions as search queries. type GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion struct { - // CompletableFieldPath: The unique document field paths that serve as + // CompletableFieldPaths: The unique document field paths that serve as // the source of this suggestion if it was generated from completable // fields. This field is only populated for the document-completable // model. - CompletableFieldPath []string `json:"completableFieldPath,omitempty"` + CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` // Suggestion: The suggestion for the query. Suggestion string `json:"suggestion,omitempty"` // ForceSendFields is a list of field names (e.g. - // "CompletableFieldPath") to unconditionally include in API requests. + // "CompletableFieldPaths") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -2253,7 +2240,7 @@ type GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion struct // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletableFieldPath") to + // NullFields is a list of field names (e.g. "CompletableFieldPaths") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -2452,6 +2439,10 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { // If this is not set, the default serving config will be used. ServingConfig string `json:"servingConfig,omitempty"` + // SummarySpec: A specification for configuring the summary returned in + // the response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // UserLabels: The user labels applied to a resource must meet the // following requirements: * Each resource can have multiple labels, up // to a maximum of 64. * Each label must be a key-value pair. * Keys @@ -4406,6 +4397,15 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveCon // segments. Otherwise, return the `max_extractive_segment_count`. MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after + // each selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + + // NumPreviousSegments: Specifies whether to also include the adjacent + // from each selected segments. Return at most `num_previous_segments` + // segments before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the // confidence score from the extractive segments in each search result. // The default value is `false`. @@ -5190,6 +5190,10 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult) MarshalJSON // GoogleCloudDiscoveryengineV1betaSearchResponseSummary: Summary of the // top N search result specified by the summary spec. type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { + // SafetyAttributes: A collection of Safety Attribute categories and + // their associated confidence scores. + SafetyAttributes *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` + // SummarySkippedReasons: Additional summary-skipped reasons. This // provides the reason for ignored cases. If nothing is skipped, this // field is not set. @@ -5207,21 +5211,25 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { // case. Google skips the summary if there are no high-relevance search // results. For example, the data store contains facts about company A // but the user query is asking questions about company B. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the summary if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google + // skips the summary if the LLM addon is not enabled. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "SummarySkippedReasons") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SummarySkippedReasons") to + // NullFields is a list of field names (e.g. "SafetyAttributes") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -5237,6 +5245,58 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummary) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes: +// +// Safety Attribute categories and their associated confidence scores. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struct { + // Categories: The display names of Safety Attribute categories + // associated with the generated content. Order matches the Scores. + Categories []string `json:"categories,omitempty"` + + // Scores: The confidence scores of the each category, higher value + // means higher confidence. Order matches the Categories. + Scores []float64 `json:"scores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Categories") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + // GoogleCloudDiscoveryengineV1betaTextInput: Defines text input. type GoogleCloudDiscoveryengineV1betaTextInput struct { // Context: Conversation context of the input. diff --git a/displayvideo/v1/displayvideo-api.json b/displayvideo/v1/displayvideo-api.json index 52abfc054a9..1c83769cfa4 100644 --- a/displayvideo/v1/displayvideo-api.json +++ b/displayvideo/v1/displayvideo-api.json @@ -306,11 +306,6 @@ "location": "query", "type": "string" }, - "internalDebuggingConfig": { - "description": "The config used in internal debugging and manual testing. Use comma to separate multiple values. Examples: To allow entity search to go through tangle `searchUsingTangle` To get only the advertiser Ids use `idOnly`", - "location": "query", - "type": "string" - }, "orderBy": { "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", "location": "query", @@ -2269,7 +2264,7 @@ "lineItems": { "methods": { "bulkEditLineItemAssignedTargetingOptions": { - "description": "Bulk edits targeting options under a single line item. The operation will delete the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * UpdateLineItem * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + "description": "Bulk edits targeting options under a single line item. The operation will delete the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.patch * assignedTargetingOptions.create * assignedTargetingOptions.delete", "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}:bulkEditLineItemAssignedTargetingOptions", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions", @@ -2538,7 +2533,7 @@ ] }, "patch": { - "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete", "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", "httpMethod": "PATCH", "id": "displayvideo.advertisers.lineItems.patch", @@ -2588,7 +2583,7 @@ "assignedTargetingOptions": { "methods": { "create": { - "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * DeleteLineItemAssignedTargetingOption", + "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * DeleteLineItemAssignedTargetingOption", "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create", @@ -2730,7 +2725,7 @@ ] }, "delete": { - "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * CreateLineItemAssignedTargetingOption", + "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * CreateLineItemAssignedTargetingOption", "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", "httpMethod": "DELETE", "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete", @@ -6232,12 +6227,6 @@ "inventorySourceId" ], "parameters": { - "advertiserId": { - "description": "Optional. The advertiser_id is optional, when it is provided, the advertiser access is used.", - "format": "int64", - "location": "query", - "type": "string" - }, "inventorySourceId": { "description": "Required. The ID of the inventory source to fetch.", "format": "int64", @@ -8157,7 +8146,7 @@ } } }, - "revision": "20230803", + "revision": "20230831", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -8750,7 +8739,7 @@ "type": "string" }, "targetingOptionId": { - "description": "Required. The ID of the targeting option assigned to the location list. Must be of type TARGETING_TYPE_GEO_REGION.", + "description": "Required. The ID of the targeting option assigned to the location list. Assigned locations can only be modified in TARGETING_LOCATION_TYPE_REGIONAL location lists. When creating or deleting assigned locations, this value must be of type TARGETING_TYPE_GEO_REGION.", "type": "string" } }, @@ -9723,7 +9712,6 @@ "type": "object" }, "BulkListCampaignAssignedTargetingOptionsResponse": { - "description": "Response message for BulkListCampaignAssignedTargetingOptions.", "id": "BulkListCampaignAssignedTargetingOptionsResponse", "properties": { "assignedTargetingOptions": { @@ -9741,7 +9729,6 @@ "type": "object" }, "BulkListInsertionOrderAssignedTargetingOptionsResponse": { - "description": "Response message for BulkListInsertionOrderAssignedTargetingOptions.", "id": "BulkListInsertionOrderAssignedTargetingOptionsResponse", "properties": { "assignedTargetingOptions": { @@ -15504,8 +15491,7 @@ "CREATIVE_SIZE_NOT_IN_USE_FOR_TARGETED_DEALS", "NO_CREATIVE_FOR_TARGETED_DEALS", "TARGETING_DEPRECATED_GEO_TARGET", - "DEPRECATED_FIRST_PARTY_AUDIENCE_EXCLUSION", - "NO_INPUT_REVENUE_MODEL_TYPE_SPECIFIED" + "DEPRECATED_FIRST_PARTY_AUDIENCE_EXCLUSION" ], "enumDescriptions": [ "Not specified or is unknown.", @@ -15526,8 +15512,7 @@ "Deals targeted by this line item accept creative sizes which are not in use. This may limit the line item's delivery or performance.", "This line item does not contain any creative for the targeted deals.", "This line item targets a geo target that is deprecated.", - "This line item uses the exclude_first_party_audience setting, which is deprecated and scheduled to sunset after **March 25, 2023**. Update your API integration to directly exclude any first-party audiences using audience targeting before **March 25, 2023** to account for the sunset of the exclude_first_party_audience field.", - "The partner revenue model of the line item was updated without specifying the revenue model type, which is required for updating any of the revenue model fields." + "This line item uses the exclude_first_party_audience setting, which is deprecated and scheduled to sunset after **March 25, 2023**. Update your API integration to directly exclude any first-party audiences using audience targeting before **March 25, 2023** to account for the sunset of the exclude_first_party_audience field." ], "type": "string" }, @@ -15872,7 +15857,6 @@ "type": "object" }, "ListInsertionOrderAssignedTargetingOptionsResponse": { - "description": "Response message for ListInsertionOrderAssignedTargetingOptions.", "id": "ListInsertionOrderAssignedTargetingOptionsResponse", "properties": { "assignedTargetingOptions": { diff --git a/displayvideo/v1/displayvideo-gen.go b/displayvideo/v1/displayvideo-gen.go index 2c350cba1bb..b8202b11412 100644 --- a/displayvideo/v1/displayvideo-gen.go +++ b/displayvideo/v1/displayvideo-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/display-video/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // displayvideoService, err := displayvideo.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // displayvideoService, err := displayvideo.NewService(ctx, option.WithScopes(displayvideo.DoubleclickbidmanagerScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // displayvideoService, err := displayvideo.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // displayvideoService, err := displayvideo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package displayvideo // import "google.golang.org/api/displayvideo/v1" import ( @@ -1604,7 +1618,10 @@ type AssignedLocation struct { Name string `json:"name,omitempty"` // TargetingOptionId: Required. The ID of the targeting option assigned - // to the location list. Must be of type TARGETING_TYPE_GEO_REGION. + // to the location list. Assigned locations can only be modified in + // TARGETING_LOCATION_TYPE_REGIONAL location lists. When creating or + // deleting assigned locations, this value must be of type + // TARGETING_TYPE_GEO_REGION. TargetingOptionId string `json:"targetingOptionId,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -3290,8 +3307,6 @@ func (s *BulkListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BulkListCampaignAssignedTargetingOptionsResponse: Response message -// for BulkListCampaignAssignedTargetingOptions. type BulkListCampaignAssignedTargetingOptionsResponse struct { // AssignedTargetingOptions: The list of assigned targeting options. // This list will be absent if empty. @@ -3333,8 +3348,6 @@ func (s *BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BulkListInsertionOrderAssignedTargetingOptionsResponse: Response -// message for BulkListInsertionOrderAssignedTargetingOptions. type BulkListInsertionOrderAssignedTargetingOptionsResponse struct { // AssignedTargetingOptions: The list of assigned targeting options. // This list will be absent if empty. @@ -10753,9 +10766,6 @@ type LineItem struct { // integration to directly exclude any first-party audiences using // audience targeting before **March 25, 2023** to account for the // sunset of the exclude_first_party_audience field. - // "NO_INPUT_REVENUE_MODEL_TYPE_SPECIFIED" - The partner revenue model - // of the line item was updated without specifying the revenue model - // type, which is required for updating any of the revenue model fields. WarningMessages []string `json:"warningMessages,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -11504,8 +11514,6 @@ func (s *ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListInsertionOrderAssignedTargetingOptionsResponse: Response message -// for ListInsertionOrderAssignedTargetingOptions. type ListInsertionOrderAssignedTargetingOptionsResponse struct { // AssignedTargetingOptions: The list of assigned targeting options. // This list will be absent if empty. @@ -17227,16 +17235,6 @@ func (c *AdvertisersListCall) Filter(filter string) *AdvertisersListCall { return c } -// InternalDebuggingConfig sets the optional parameter -// "internalDebuggingConfig": The config used in internal debugging and -// manual testing. Use comma to separate multiple values. Examples: To -// allow entity search to go through tangle `searchUsingTangle` To get -// only the advertiser Ids use `idOnly` -func (c *AdvertisersListCall) InternalDebuggingConfig(internalDebuggingConfig string) *AdvertisersListCall { - c.urlParams_.Set("internalDebuggingConfig", internalDebuggingConfig) - return c -} - // OrderBy sets the optional parameter "orderBy": Field by which to sort // the list. Acceptable values are: * `displayName` (default) * // `entityStatus` * `updateTime` The default sorting order is ascending. @@ -17379,11 +17377,6 @@ func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisers // "location": "query", // "type": "string" // }, - // "internalDebuggingConfig": { - // "description": "The config used in internal debugging and manual testing. Use comma to separate multiple values. Examples: To allow entity search to go through tangle `searchUsingTangle` To get only the advertiser Ids use `idOnly`", - // "location": "query", - // "type": "string" - // }, // "orderBy": { // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", // "location": "query", @@ -24487,9 +24480,8 @@ type AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall struct { // then create the assigned targeting options provided in // BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. // Requests to this endpoint cannot be made concurrently with the -// following requests updating the same line item: * UpdateLineItem * -// CreateLineItemAssignedTargetingOption * -// DeleteLineItemAssignedTargetingOption +// following requests updating the same line item: * lineItems.patch * +// assignedTargetingOptions.create * assignedTargetingOptions.delete // // - advertiserId: The ID of the advertiser the line item belongs to. // - lineItemId: The ID of the line item the assigned targeting option @@ -24596,7 +24588,7 @@ func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Do(op } return ret, nil // { - // "description": "Bulk edits targeting options under a single line item. The operation will delete the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * UpdateLineItem * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + // "description": "Bulk edits targeting options under a single line item. The operation will delete the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.patch * assignedTargetingOptions.create * assignedTargetingOptions.delete", // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}:bulkEditLineItemAssignedTargetingOptions", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions", @@ -25760,8 +25752,7 @@ type AdvertisersLineItemsPatchCall struct { // if successful. Requests to this endpoint cannot be made concurrently // with the following requests updating the same line item: * // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * -// CreateLineItemAssignedTargetingOption * -// DeleteLineItemAssignedTargetingOption +// assignedTargetingOptions.create * assignedTargetingOptions.delete // // - advertiserId: Output only. The unique ID of the advertiser the line // item belongs to. @@ -25874,7 +25865,7 @@ func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineI } return ret, nil // { - // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete", // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", // "httpMethod": "PATCH", // "id": "displayvideo.advertisers.lineItems.patch", @@ -25936,8 +25927,9 @@ type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall struct // Create: Assigns a targeting option to a line item. Returns the // assigned targeting option if successful. Requests to this endpoint // cannot be made concurrently with the following requests updating the -// same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * -// UpdateLineItem * DeleteLineItemAssignedTargetingOption +// same line item: * lineItems.bulkEditAssignedTargetingOptions * +// lineItems.bulkUpdate * lineItems.patch * +// DeleteLineItemAssignedTargetingOption // // - advertiserId: The ID of the advertiser the line item belongs to. // - lineItemId: The ID of the line item the assigned targeting option @@ -26078,7 +26070,7 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) D } return ret, nil // { - // "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * DeleteLineItemAssignedTargetingOption", + // "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * DeleteLineItemAssignedTargetingOption", // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create", @@ -26238,8 +26230,8 @@ type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall struct // Delete: Deletes an assigned targeting option from a line item. // Requests to this endpoint cannot be made concurrently with the // following requests updating the same line item: * -// BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * -// CreateLineItemAssignedTargetingOption +// lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * +// lineItems.patch * CreateLineItemAssignedTargetingOption // // - advertiserId: The ID of the advertiser the line item belongs to. // - assignedTargetingOptionId: The ID of the assigned targeting option @@ -26378,7 +26370,7 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) D } return ret, nil // { - // "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * CreateLineItemAssignedTargetingOption", + // "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * CreateLineItemAssignedTargetingOption", // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", // "httpMethod": "DELETE", // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete", @@ -39433,14 +39425,6 @@ func (r *InventorySourcesService) Get(inventorySourceId int64) *InventorySources return c } -// AdvertiserId sets the optional parameter "advertiserId": The -// advertiser_id is optional, when it is provided, the advertiser access -// is used. -func (c *InventorySourcesGetCall) AdvertiserId(advertiserId int64) *InventorySourcesGetCall { - c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) - return c -} - // PartnerId sets the optional parameter "partnerId": Required. The ID // of the DV360 partner to which the fetched inventory source is // permissioned. @@ -39556,12 +39540,6 @@ func (c *InventorySourcesGetCall) Do(opts ...googleapi.CallOption) (*InventorySo // "inventorySourceId" // ], // "parameters": { - // "advertiserId": { - // "description": "Optional. The advertiser_id is optional, when it is provided, the advertiser access is used.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, // "inventorySourceId": { // "description": "Required. The ID of the inventory source to fetch.", // "format": "int64", diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 2d3e839dc73..2f8c8c5afb6 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -259,11 +259,6 @@ "location": "query", "type": "string" }, - "internalDebuggingConfig": { - "description": "The config used in internal debugging and manual testing. Use comma to separate multiple values. Examples: To allow entity search to go through tangle `searchUsingTangle` To get only the advertiser Ids use `idOnly`", - "location": "query", - "type": "string" - }, "orderBy": { "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", "location": "query", @@ -2594,7 +2589,7 @@ "lineItems": { "methods": { "bulkEditAssignedTargetingOptions": { - "description": "Bulk edits targeting options under multiple line items. The operation will delete the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkUpdate * UpdateLineItem * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + "description": "Bulk edits targeting options under multiple line items. The operation will delete the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkUpdate * lineItems.patch * assignedTargetingOptions.create * assignedTargetingOptions.delete", "flatPath": "v2/advertisers/{advertisersId}/lineItems:bulkEditAssignedTargetingOptions", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.bulkEditAssignedTargetingOptions", @@ -2677,7 +2672,7 @@ ] }, "bulkUpdate": { - "description": "Updates multiple line items. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * UpdateLineItem * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + "description": "Updates multiple line items. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * UpdateLineItem * assignedTargetingOptions.create * assignedTargetingOptions.delete", "flatPath": "v2/advertisers/{advertisersId}/lineItems:bulkUpdate", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.bulkUpdate", @@ -2919,7 +2914,7 @@ ] }, "patch": { - "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete", "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}", "httpMethod": "PATCH", "id": "displayvideo.advertisers.lineItems.patch", @@ -2969,7 +2964,7 @@ "assignedTargetingOptions": { "methods": { "create": { - "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * DeleteLineItemAssignedTargetingOption", + "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * DeleteLineItemAssignedTargetingOption", "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", "httpMethod": "POST", "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create", @@ -3117,7 +3112,7 @@ ] }, "delete": { - "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * CreateLineItemAssignedTargetingOption", + "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * CreateLineItemAssignedTargetingOption", "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", "httpMethod": "DELETE", "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete", @@ -7216,12 +7211,6 @@ "inventorySourceId" ], "parameters": { - "advertiserId": { - "description": "Optional. The advertiser_id is optional, when it is provided, the advertiser access is used.", - "format": "int64", - "location": "query", - "type": "string" - }, "inventorySourceId": { "description": "Required. The ID of the inventory source to fetch.", "format": "int64", @@ -9183,7 +9172,7 @@ } } }, - "revision": "20230817", + "revision": "20230831", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -9857,7 +9846,7 @@ "type": "string" }, "targetingOptionId": { - "description": "Required. The ID of the targeting option assigned to the location list. Must be of type TARGETING_TYPE_GEO_REGION.", + "description": "Required. The ID of the targeting option assigned to the location list. Assigned locations can only be modified in TARGETING_LOCATION_TYPE_REGIONAL location lists. When creating or deleting assigned locations, this value must be of type TARGETING_TYPE_GEO_REGION.", "type": "string" } }, @@ -10932,7 +10921,6 @@ "type": "object" }, "BulkListCampaignAssignedTargetingOptionsResponse": { - "description": "Response message for BulkListCampaignAssignedTargetingOptions.", "id": "BulkListCampaignAssignedTargetingOptionsResponse", "properties": { "assignedTargetingOptions": { @@ -10950,7 +10938,6 @@ "type": "object" }, "BulkListInsertionOrderAssignedTargetingOptionsResponse": { - "description": "Response message for BulkListInsertionOrderAssignedTargetingOptions.", "id": "BulkListInsertionOrderAssignedTargetingOptionsResponse", "properties": { "assignedTargetingOptions": { @@ -17092,8 +17079,7 @@ "NO_VALID_CREATIVE", "PARENT_INSERTION_ORDER_PAUSED", "PARENT_INSERTION_ORDER_EXPIRED", - "DEPRECATED_FIRST_PARTY_AUDIENCE_EXCLUSION", - "NO_INPUT_REVENUE_MODEL_TYPE_SPECIFIED" + "DEPRECATED_FIRST_PARTY_AUDIENCE_EXCLUSION" ], "enumDescriptions": [ "Not specified or is unknown.", @@ -17107,8 +17093,7 @@ "This line item does not contain any valid creative. The line item will not run.", "The insertion order of this line item is paused. The line item will not run.", "The insertion order of this line item has its end date set in the past. The line item will not run.", - "This line item uses the exclude_first_party_audience setting, which is deprecated and scheduled to sunset after **March 25, 2023**. Update your API integration to directly exclude any first-party audiences using audience targeting before **March 25, 2023** to account for the sunset of the exclude_first_party_audience field.", - "The partner revenue model of the line item was updated without specifying the revenue model type, which is required for updating any of the revenue model fields." + "This line item uses the exclude_first_party_audience setting, which is deprecated and scheduled to sunset after **March 25, 2023**. Update your API integration to directly exclude any first-party audiences using audience targeting before **March 25, 2023** to account for the sunset of the exclude_first_party_audience field." ], "type": "string" }, @@ -17467,7 +17452,6 @@ "type": "object" }, "ListInsertionOrderAssignedTargetingOptionsResponse": { - "description": "Response message for ListInsertionOrderAssignedTargetingOptions.", "id": "ListInsertionOrderAssignedTargetingOptionsResponse", "properties": { "assignedTargetingOptions": { @@ -21071,7 +21055,9 @@ "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA", "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPM", "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MAXIMIZE_LIFT", - "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MAXIMIZE_CONVERSIONS" + "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MAXIMIZE_CONVERSIONS", + "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS", + "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MAXIMIZE_CONVERSION_VALUE" ], "enumDescriptions": [ "Type is not specified or unknown.", @@ -21080,12 +21066,14 @@ "A bidding strategy that automatically optimizes conversions per dollar.", "A bidding strategy that pays a configurable amount per impression.", "An automated bidding strategy that sets bids to achieve maximum lift.", - "A bidding strategy that automatically maximizes number of conversions given a daily budget." + "A bidding strategy that automatically maximizes number of conversions given a daily budget.", + "A bidding strategy that automatically maximizes revenue while averaging a specific target Return On Ad Spend (ROAS).", + "A bidding strategy that automatically sets bids to maximize revenue while spending your budget." ], "type": "string" }, "value": { - "description": "The value used by the bidding strategy. When the bidding strategy is assigned at the line item level, this field is only applicable for the following strategy types: * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS` When the bidding strategy is assigned at the ad group level, this field is only applicable for the following strategy types: * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPM` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPV` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPM` If not using an applicable strategy, the value of this field will be 0.", + "description": "The value used by the bidding strategy. When the bidding strategy is assigned at the line item level, this field is only applicable for the following strategy types: * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS` When the bidding strategy is assigned at the ad group level, this field is only applicable for the following strategy types: * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPM` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPV` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPM` * `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS` If not using an applicable strategy, the value of this field will be 0.", "format": "int64", "type": "string" } @@ -21135,6 +21123,23 @@ ], "type": "string" }, + "effectiveContentCategory": { + "description": "Output only. The content category which takes effect when serving the line item. When content category is set in both line item and advertiser, the stricter one will take effect when serving the line item.", + "enum": [ + "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_UNSPECIFIED", + "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_STANDARD", + "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_EXPANDED", + "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_LIMITED" + ], + "enumDescriptions": [ + "Content category is not specified or is unknown in this version.", + "A category consisting of a wide range of content appropriate for most brands. The content is based off of YouTube's [advertiser-friendly content guidelines](https://support.google.com/youtube/answer/6162278).", + "A category including all content across YouTube and video partners that meets standards for monetization.", + "A category consisting of a reduced range of content that meets heightened requirements, especially regarding inappropriate language and sexual suggestiveness." + ], + "readOnly": true, + "type": "string" + }, "inventorySourceSettings": { "$ref": "YoutubeAndPartnersInventorySourceConfig", "description": "Settings that control what YouTube and Partners inventories the line item will target." diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index e928b3ce15f..544e8a217a4 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/display-video/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // displayvideoService, err := displayvideo.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // displayvideoService, err := displayvideo.NewService(ctx, option.WithScopes(displayvideo.DoubleclickbidmanagerScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // displayvideoService, err := displayvideo.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // displayvideoService, err := displayvideo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package displayvideo // import "google.golang.org/api/displayvideo/v2" import ( @@ -1785,7 +1799,10 @@ type AssignedLocation struct { Name string `json:"name,omitempty"` // TargetingOptionId: Required. The ID of the targeting option assigned - // to the location list. Must be of type TARGETING_TYPE_GEO_REGION. + // to the location list. Assigned locations can only be modified in + // TARGETING_LOCATION_TYPE_REGIONAL location lists. When creating or + // deleting assigned locations, this value must be of type + // TARGETING_TYPE_GEO_REGION. TargetingOptionId string `json:"targetingOptionId,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -3699,8 +3716,6 @@ func (s *BulkListAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BulkListCampaignAssignedTargetingOptionsResponse: Response message -// for BulkListCampaignAssignedTargetingOptions. type BulkListCampaignAssignedTargetingOptionsResponse struct { // AssignedTargetingOptions: The list of assigned targeting options. // This list will be absent if empty. @@ -3742,8 +3757,6 @@ func (s *BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// BulkListInsertionOrderAssignedTargetingOptionsResponse: Response -// message for BulkListInsertionOrderAssignedTargetingOptions. type BulkListInsertionOrderAssignedTargetingOptionsResponse struct { // AssignedTargetingOptions: The list of assigned targeting options. // This list will be absent if empty. @@ -11659,9 +11672,6 @@ type LineItem struct { // integration to directly exclude any first-party audiences using // audience targeting before **March 25, 2023** to account for the // sunset of the exclude_first_party_audience field. - // "NO_INPUT_REVENUE_MODEL_TYPE_SPECIFIED" - The partner revenue model - // of the line item was updated without specifying the revenue model - // type, which is required for updating any of the revenue model fields. WarningMessages []string `json:"warningMessages,omitempty"` // YoutubeAndPartnersSettings: Output only. Settings specific to YouTube @@ -12431,8 +12441,6 @@ func (s *ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListInsertionOrderAssignedTargetingOptionsResponse: Response message -// for ListInsertionOrderAssignedTargetingOptions. type ListInsertionOrderAssignedTargetingOptionsResponse struct { // AssignedTargetingOptions: The list of assigned targeting options. // This list will be absent if empty. @@ -18092,6 +18100,13 @@ type YoutubeAndPartnersBiddingStrategy struct { // "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MAXIMIZE_CONVERSIONS" - // A bidding strategy that automatically maximizes number of conversions // given a daily budget. + // "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS" - A + // bidding strategy that automatically maximizes revenue while averaging + // a specific target Return On Ad Spend (ROAS). + // + // "YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MAXIMIZE_CONVERSION_VALUE" + // - A bidding strategy that automatically sets bids to maximize + // revenue while spending your budget. Type string `json:"type,omitempty"` // Value: The value used by the bidding strategy. When the bidding @@ -18104,7 +18119,8 @@ type YoutubeAndPartnersBiddingStrategy struct { // `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPM` * // `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_MANUAL_CPV` * // `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPA` * - // `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPM` If not using + // `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_CPM` * + // `YOUTUBE_AND_PARTNERS_BIDDING_STRATEGY_TYPE_TARGET_ROAS` If not using // an applicable strategy, the value of this field will be 0. Value int64 `json:"value,omitempty,string"` @@ -18201,6 +18217,27 @@ type YoutubeAndPartnersSettings struct { // suggestiveness. ContentCategory string `json:"contentCategory,omitempty"` + // EffectiveContentCategory: Output only. The content category which + // takes effect when serving the line item. When content category is set + // in both line item and advertiser, the stricter one will take effect + // when serving the line item. + // + // Possible values: + // "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_UNSPECIFIED" - Content + // category is not specified or is unknown in this version. + // "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_STANDARD" - A category + // consisting of a wide range of content appropriate for most brands. + // The content is based off of YouTube's [advertiser-friendly content + // guidelines](https://support.google.com/youtube/answer/6162278). + // "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_EXPANDED" - A category + // including all content across YouTube and video partners that meets + // standards for monetization. + // "YOUTUBE_AND_PARTNERS_CONTENT_CATEGORY_LIMITED" - A category + // consisting of a reduced range of content that meets heightened + // requirements, especially regarding inappropriate language and sexual + // suggestiveness. + EffectiveContentCategory string `json:"effectiveContentCategory,omitempty"` + // InventorySourceSettings: Settings that control what YouTube and // Partners inventories the line item will target. InventorySourceSettings *YoutubeAndPartnersInventorySourceConfig `json:"inventorySourceSettings,omitempty"` @@ -19182,16 +19219,6 @@ func (c *AdvertisersListCall) Filter(filter string) *AdvertisersListCall { return c } -// InternalDebuggingConfig sets the optional parameter -// "internalDebuggingConfig": The config used in internal debugging and -// manual testing. Use comma to separate multiple values. Examples: To -// allow entity search to go through tangle `searchUsingTangle` To get -// only the advertiser Ids use `idOnly` -func (c *AdvertisersListCall) InternalDebuggingConfig(internalDebuggingConfig string) *AdvertisersListCall { - c.urlParams_.Set("internalDebuggingConfig", internalDebuggingConfig) - return c -} - // OrderBy sets the optional parameter "orderBy": Field by which to sort // the list. Acceptable values are: * `displayName` (default) * // `entityStatus` * `updateTime` The default sorting order is ascending. @@ -19334,11 +19361,6 @@ func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisers // "location": "query", // "type": "string" // }, - // "internalDebuggingConfig": { - // "description": "The config used in internal debugging and manual testing. Use comma to separate multiple values. Examples: To allow entity search to go through tangle `searchUsingTangle` To get only the advertiser Ids use `idOnly`", - // "location": "query", - // "type": "string" - // }, // "orderBy": { // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", // "location": "query", @@ -27292,9 +27314,8 @@ type AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall struct { // create the assigned targeting options provided in // BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to // this endpoint cannot be made concurrently with the following requests -// updating the same line item: * BulkUpdate * UpdateLineItem * -// CreateLineItemAssignedTargetingOption * -// DeleteLineItemAssignedTargetingOption +// updating the same line item: * lineItems.bulkUpdate * lineItems.patch +// * assignedTargetingOptions.create * assignedTargetingOptions.delete // // - advertiserId: The ID of the advertiser the line items belong to. func (r *AdvertisersLineItemsService) BulkEditAssignedTargetingOptions(advertiserId int64, bulkeditassignedtargetingoptionsrequest *BulkEditAssignedTargetingOptionsRequest) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall { @@ -27397,7 +27418,7 @@ func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Do(opts ...go } return ret, nil // { - // "description": "Bulk edits targeting options under multiple line items. The operation will delete the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkUpdate * UpdateLineItem * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + // "description": "Bulk edits targeting options under multiple line items. The operation will delete the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkUpdate * lineItems.patch * assignedTargetingOptions.create * assignedTargetingOptions.delete", // "flatPath": "v2/advertisers/{advertisersId}/lineItems:bulkEditAssignedTargetingOptions", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.bulkEditAssignedTargetingOptions", @@ -27703,8 +27724,7 @@ type AdvertisersLineItemsBulkUpdateCall struct { // BulkUpdate: Updates multiple line items. Requests to this endpoint // cannot be made concurrently with the following requests updating the // same line item: * BulkEditAssignedTargetingOptions * UpdateLineItem * -// CreateLineItemAssignedTargetingOption * -// DeleteLineItemAssignedTargetingOption +// assignedTargetingOptions.create * assignedTargetingOptions.delete // // - advertiserId: The ID of the advertiser this line item belongs to. func (r *AdvertisersLineItemsService) BulkUpdate(advertiserId int64, bulkupdatelineitemsrequest *BulkUpdateLineItemsRequest) *AdvertisersLineItemsBulkUpdateCall { @@ -27805,7 +27825,7 @@ func (c *AdvertisersLineItemsBulkUpdateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Updates multiple line items. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * UpdateLineItem * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + // "description": "Updates multiple line items. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * UpdateLineItem * assignedTargetingOptions.create * assignedTargetingOptions.delete", // "flatPath": "v2/advertisers/{advertisersId}/lineItems:bulkUpdate", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.bulkUpdate", @@ -28860,8 +28880,7 @@ type AdvertisersLineItemsPatchCall struct { // if successful. Requests to this endpoint cannot be made concurrently // with the following requests updating the same line item: * // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * -// CreateLineItemAssignedTargetingOption * -// DeleteLineItemAssignedTargetingOption +// assignedTargetingOptions.create * assignedTargetingOptions.delete // // - advertiserId: Output only. The unique ID of the advertiser the line // item belongs to. @@ -28974,7 +28993,7 @@ func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineI } return ret, nil // { - // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * CreateLineItemAssignedTargetingOption * DeleteLineItemAssignedTargetingOption", + // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete", // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}", // "httpMethod": "PATCH", // "id": "displayvideo.advertisers.lineItems.patch", @@ -29036,8 +29055,9 @@ type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall struct // Create: Assigns a targeting option to a line item. Returns the // assigned targeting option if successful. Requests to this endpoint // cannot be made concurrently with the following requests updating the -// same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * -// UpdateLineItem * DeleteLineItemAssignedTargetingOption +// same line item: * lineItems.bulkEditAssignedTargetingOptions * +// lineItems.bulkUpdate * lineItems.patch * +// DeleteLineItemAssignedTargetingOption // // - advertiserId: The ID of the advertiser the line item belongs to. // - lineItemId: The ID of the line item the assigned targeting option @@ -29178,7 +29198,7 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) D } return ret, nil // { - // "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * DeleteLineItemAssignedTargetingOption", + // "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * DeleteLineItemAssignedTargetingOption", // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", // "httpMethod": "POST", // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create", @@ -29344,8 +29364,8 @@ type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall struct // Delete: Deletes an assigned targeting option from a line item. // Requests to this endpoint cannot be made concurrently with the // following requests updating the same line item: * -// BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * -// CreateLineItemAssignedTargetingOption +// lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * +// lineItems.patch * CreateLineItemAssignedTargetingOption // // - advertiserId: The ID of the advertiser the line item belongs to. // - assignedTargetingOptionId: The ID of the assigned targeting option @@ -29484,7 +29504,7 @@ func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) D } return ret, nil // { - // "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdate * UpdateLineItem * CreateLineItemAssignedTargetingOption", + // "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * CreateLineItemAssignedTargetingOption", // "flatPath": "v2/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", // "httpMethod": "DELETE", // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete", @@ -44315,14 +44335,6 @@ func (r *InventorySourcesService) Get(inventorySourceId int64) *InventorySources return c } -// AdvertiserId sets the optional parameter "advertiserId": The -// advertiser_id is optional, when it is provided, the advertiser access -// is used. -func (c *InventorySourcesGetCall) AdvertiserId(advertiserId int64) *InventorySourcesGetCall { - c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) - return c -} - // PartnerId sets the optional parameter "partnerId": Required. The ID // of the DV360 partner to which the fetched inventory source is // permissioned. @@ -44438,12 +44450,6 @@ func (c *InventorySourcesGetCall) Do(opts ...googleapi.CallOption) (*InventorySo // "inventorySourceId" // ], // "parameters": { - // "advertiserId": { - // "description": "Optional. The advertiser_id is optional, when it is provided, the advertiser access is used.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, // "inventorySourceId": { // "description": "Required. The ID of the inventory source to fetch.", // "format": "int64", diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index fb8f9c725ba..ea7e4b46618 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20230806", + "revision": "20230903", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -6000,6 +6000,37 @@ }, "type": "object" }, + "GooglePrivacyDlpV2InfoTypeLikelihood": { + "description": "Configuration to control custom minimum likelihoods per infotype. Used when certain infotypes need to return with higher or lower precision than the baseline, i.e. when wanting PERSON_NAME to return all possible names without lowering the precision of other infotypes.", + "id": "GooglePrivacyDlpV2InfoTypeLikelihood", + "properties": { + "infoType": { + "$ref": "GooglePrivacyDlpV2InfoType", + "description": "Type of information the likelihood threshold applies to. Only one likelihood per info_type should be provided. If InfoTypeLikelihood does not have an info_type, the configuration fails." + }, + "minLikelihood": { + "description": "Only returns findings equal or above this threshold. This field is required or else the configuration fails.", + "enum": [ + "LIKELIHOOD_UNSPECIFIED", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "enumDescriptions": [ + "Default value; same as POSSIBLE.", + "Highest chance of a false positive.", + "High chance of a false positive.", + "Some matching signals. The default value.", + "Low chance of a false positive.", + "Confidence level is high. Lowest chance of a false positive." + ], + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2InfoTypeLimit": { "description": "Max findings configuration per infoType, per content item or long running DlpJob.", "id": "GooglePrivacyDlpV2InfoTypeLimit", @@ -6148,6 +6179,13 @@ ], "type": "string" }, + "minLikelihoodPerInfoType": { + "description": "Per infotype likelihoods. For each infotype, a user can specify a minimum likelihood, and only return that infotype if it is above that threshold. If an infotype is not included, it uses the InspectConfig min_likelihood.", + "items": { + "$ref": "GooglePrivacyDlpV2InfoTypeLikelihood" + }, + "type": "array" + }, "ruleSet": { "description": "Set of rules to apply to the findings for this InspectConfig. Exclusion rules, contained in the set are executed in the end, other rules are executed in the order they are specified for each info type.", "items": { diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 28ccbcd7233..bb5e7eec85b 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/dlp/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // dlpService, err := dlp.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dlpService, err := dlp.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dlpService, err := dlp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dlp // import "google.golang.org/api/dlp/v2" import ( @@ -4971,6 +4984,54 @@ func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2InfoTypeLikelihood: Configuration to control custom +// minimum likelihoods per infotype. Used when certain infotypes need to +// return with higher or lower precision than the baseline, i.e. when +// wanting PERSON_NAME to return all possible names without lowering the +// precision of other infotypes. +type GooglePrivacyDlpV2InfoTypeLikelihood struct { + // InfoType: Type of information the likelihood threshold applies to. + // Only one likelihood per info_type should be provided. If + // InfoTypeLikelihood does not have an info_type, the configuration + // fails. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` + + // MinLikelihood: Only returns findings equal or above this threshold. + // This field is required or else the configuration fails. + // + // Possible values: + // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. + // "VERY_UNLIKELY" - Highest chance of a false positive. + // "UNLIKELY" - High chance of a false positive. + // "POSSIBLE" - Some matching signals. The default value. + // "LIKELY" - Low chance of a false positive. + // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false + // positive. + MinLikelihood string `json:"minLikelihood,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InfoType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InfoType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2InfoTypeLikelihood) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeLikelihood + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per // infoType, per content item or long running DlpJob. type GooglePrivacyDlpV2InfoTypeLimit struct { @@ -5205,6 +5266,12 @@ type GooglePrivacyDlpV2InspectConfig struct { // positive. MinLikelihood string `json:"minLikelihood,omitempty"` + // MinLikelihoodPerInfoType: Per infotype likelihoods. For each + // infotype, a user can specify a minimum likelihood, and only return + // that infotype if it is above that threshold. If an infotype is not + // included, it uses the InspectConfig min_likelihood. + MinLikelihoodPerInfoType []*GooglePrivacyDlpV2InfoTypeLikelihood `json:"minLikelihoodPerInfoType,omitempty"` + // RuleSet: Set of rules to apply to the findings for this // InspectConfig. Exclusion rules, contained in the set are executed in // the end, other rules are executed in the order they are specified for diff --git a/dns/v1/dns-api.json b/dns/v1/dns-api.json index 19de0a0ad9c..2fb9463fb3e 100644 --- a/dns/v1/dns-api.json +++ b/dns/v1/dns-api.json @@ -1824,7 +1824,7 @@ } } }, - "revision": "20230807", + "revision": "20230831", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3043,7 +3043,7 @@ "id": "RRSetRoutingPolicyGeoPolicy", "properties": { "enableFencing": { - "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we'll failover to the next nearest geo bucket. With fencing, if health check is enabled, as long as some targets in the current geo bucket are healthy, we'll return only the healthy targets. However, if they're all unhealthy, we won't failover to the next nearest bucket, we'll simply return all the items in the current bucket even though they're unhealthy.", + "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we failover to the next nearest geo bucket. With fencing, if health checking is enabled, as long as some targets in the current geo bucket are healthy, we return only the healthy targets. However, if all targets are unhealthy, we don't failover to the next nearest bucket; instead, we return all the items in the current bucket even when all targets are unhealthy.", "type": "boolean" }, "items": { @@ -3083,7 +3083,7 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 ip per item. .", + "description": "DNSSEC generated signatures for all the rrdata within this item. If health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, @@ -3106,13 +3106,15 @@ "type": "object" }, "RRSetRoutingPolicyLoadBalancerTarget": { + "description": "The configuration for an individual load balancer to health check.", "id": "RRSetRoutingPolicyLoadBalancerTarget", "properties": { "ipAddress": { - "description": "The frontend IP address of the Load Balancer to health check.", + "description": "The frontend IP address of the load balancer to health check.", "type": "string" }, "ipProtocol": { + "description": "The protocol of the load balancer to health check.", "enum": [ "undefined", "tcp", @@ -3130,7 +3132,7 @@ "type": "string" }, "loadBalancerType": { - "description": "The type of Load Balancer specified by this target. Must match the configuration of the Load Balancer located at the LoadBalancerTarget's IP address/port and region.", + "description": "The type of load balancer specified by this target. This value must match the configuration of the load balancer located at the LoadBalancerTarget's IP address, port, and region. Use the following: - *regionalL4ilb*: for a regional internal passthrough Network Load Balancer. - *regionalL7ilb*: for a regional internal Application Load Balancer. - *globalL7ilb*: for a global internal Application Load Balancer. ", "enum": [ "none", "globalL7ilb", @@ -3139,26 +3141,26 @@ ], "enumDescriptions": [ "", - "Cross-region internal Application Load Balancer", - "Regional internal passthrough Network Load Balancer", - "Regional internal Application Load Balancer" + "", + "", + "" ], "type": "string" }, "networkUrl": { - "description": "The fully qualified url of the network on which the ILB is present. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} .", "type": "string" }, "port": { - "description": "The configured port of the Load Balancer.", + "description": "The configured port of the load balancer.", "type": "string" }, "project": { - "description": "The project ID in which the ILB exists.", + "description": "The project ID in which the load balancer is located.", "type": "string" }, "region": { - "description": "The region in which the ILB exists.", + "description": "The region in which the load balancer is located.", "type": "string" } }, @@ -3177,7 +3179,8 @@ "type": "string" }, "primaryTargets": { - "$ref": "RRSetRoutingPolicyHealthCheckTargets" + "$ref": "RRSetRoutingPolicyHealthCheckTargets", + "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the backup_geo_targets." }, "trickleTraffic": { "description": "When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets.", @@ -3210,7 +3213,7 @@ "properties": { "healthCheckedTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "endpoints that need to be health checked before making the routing decision. The unhealthy endpoints will be omitted from the result. If all endpoints within a buckete are unhealthy, we'll choose a different bucket (sampled w.r.t. its weight) for responding. Note that if DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." + "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." }, "kind": { "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", @@ -3223,14 +3226,14 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 ip per item. .", + "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, "type": "array" }, "weight": { - "description": "The weight corresponding to this subset of rrdata. When multiple WeightedRoundRobinPolicyItems are configured, the probability of returning an rrset is proportional to its weight relative to the sum of weights configured for all items. This weight should be non-negative.", + "description": "The weight corresponding to this WrrPolicyItem object. When multiple WrrPolicyItem objects are configured, the probability of returning an WrrPolicyItem object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", "format": "double", "type": "number" } @@ -3251,7 +3254,7 @@ }, "routingPolicy": { "$ref": "RRSetRoutingPolicy", - "description": "Configures dynamic query responses based on geo location of querying user or a weighted round robin based routing policy. A ResourceRecordSet should only have either rrdata (static) or routing_policy (dynamic). An error is returned otherwise." + "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid ResourceRecordSet contains only rrdata (for static resolution) or a routing_policy (for dynamic resolution)." }, "rrdatas": { "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", @@ -3296,7 +3299,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve complete contents of even larger collections, one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even larger collections, one page at a time. However, if the collection changes between paginated list requests, the set of elements returned is an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "rrsets": { diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go index fae09fcc4a9..54ab6724679 100644 --- a/dns/v1/dns-gen.go +++ b/dns/v1/dns-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dns/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // dnsService, err := dns.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dns // import "google.golang.org/api/dns/v1" import ( @@ -2376,12 +2390,12 @@ func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { // routes based on the geo location of the querying user. type RRSetRoutingPolicyGeoPolicy struct { // EnableFencing: Without fencing, if health check fails for all - // configured items in the current geo bucket, we'll failover to the - // next nearest geo bucket. With fencing, if health check is enabled, as - // long as some targets in the current geo bucket are healthy, we'll - // return only the healthy targets. However, if they're all unhealthy, - // we won't failover to the next nearest bucket, we'll simply return all - // the items in the current bucket even though they're unhealthy. + // configured items in the current geo bucket, we failover to the next + // nearest geo bucket. With fencing, if health checking is enabled, as + // long as some targets in the current geo bucket are healthy, we return + // only the healthy targets. However, if all targets are unhealthy, we + // don't failover to the next nearest bucket; instead, we return all the + // items in the current bucket even when all targets are unhealthy. EnableFencing bool `json:"enableFencing,omitempty"` // Items: The primary geo routing configuration. If there are multiple @@ -2431,8 +2445,8 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { Rrdatas []string `json:"rrdatas,omitempty"` // SignatureRrdatas: DNSSEC generated signatures for all the rrdata - // within this item. Note that if health checked targets are provided - // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . + // within this item. If health checked targets are provided for DNSSEC + // enabled zones, there's a restriction of 1 IP address per item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2491,11 +2505,15 @@ func (s *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RRSetRoutingPolicyLoadBalancerTarget: The configuration for an +// individual load balancer to health check. type RRSetRoutingPolicyLoadBalancerTarget struct { - // IpAddress: The frontend IP address of the Load Balancer to health + // IpAddress: The frontend IP address of the load balancer to health // check. IpAddress string `json:"ipAddress,omitempty"` + // IpProtocol: The protocol of the load balancer to health check. + // // Possible values: // "undefined" // "tcp" @@ -2504,30 +2522,34 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { Kind string `json:"kind,omitempty"` - // LoadBalancerType: The type of Load Balancer specified by this target. - // Must match the configuration of the Load Balancer located at the - // LoadBalancerTarget's IP address/port and region. + // LoadBalancerType: The type of load balancer specified by this target. + // This value must match the configuration of the load balancer located + // at the LoadBalancerTarget's IP address, port, and region. Use the + // following: - *regionalL4ilb*: for a regional internal passthrough + // Network Load Balancer. - *regionalL7ilb*: for a regional internal + // Application Load Balancer. - *globalL7ilb*: for a global internal + // Application Load Balancer. // // Possible values: // "none" - // "globalL7ilb" - Cross-region internal Application Load Balancer - // "regionalL4ilb" - Regional internal passthrough Network Load - // Balancer - // "regionalL7ilb" - Regional internal Application Load Balancer + // "globalL7ilb" + // "regionalL4ilb" + // "regionalL7ilb" LoadBalancerType string `json:"loadBalancerType,omitempty"` - // NetworkUrl: The fully qualified url of the network on which the ILB - // is present. This should be formatted like + // NetworkUrl: The fully qualified URL of the network that the load + // balancer is attached to. This should be formatted like // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // . NetworkUrl string `json:"networkUrl,omitempty"` - // Port: The configured port of the Load Balancer. + // Port: The configured port of the load balancer. Port string `json:"port,omitempty"` - // Project: The project ID in which the ILB exists. + // Project: The project ID in which the load balancer is located. Project string `json:"project,omitempty"` - // Region: The region in which the ILB exists. + // Region: The region in which the load balancer is located. Region string `json:"region,omitempty"` // ForceSendFields is a list of field names (e.g. "IpAddress") to @@ -2565,6 +2587,10 @@ type RRSetRoutingPolicyPrimaryBackupPolicy struct { Kind string `json:"kind,omitempty"` + // PrimaryTargets: Endpoints that are health checked before making the + // routing decision. Unhealthy endpoints are omitted from the results. + // If all endpoints are unhealthy, we serve a response based on the + // backup_geo_targets. PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` // TrickleTraffic: When serving state is PRIMARY, this field provides @@ -2643,12 +2669,12 @@ func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which // contains the routing information for one WRR item. type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { - // HealthCheckedTargets: endpoints that need to be health checked before - // making the routing decision. The unhealthy endpoints will be omitted - // from the result. If all endpoints within a buckete are unhealthy, - // we'll choose a different bucket (sampled w.r.t. its weight) for - // responding. Note that if DNSSEC is enabled for this zone, only one of - // rrdata or health_checked_targets can be set. + // HealthCheckedTargets: Endpoints that are health checked before making + // the routing decision. The unhealthy endpoints are omitted from the + // result. If all endpoints within a bucket are unhealthy, we choose a + // different bucket (sampled with respect to its weight) for responding. + // If DNSSEC is enabled for this zone, only one of rrdata or + // health_checked_targets can be set. HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` Kind string `json:"kind,omitempty"` @@ -2657,14 +2683,15 @@ type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { // SignatureRrdatas: DNSSEC generated signatures for all the rrdata // within this item. Note that if health checked targets are provided - // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . + // for DNSSEC enabled zones, there's a restriction of 1 IP address per + // item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Weight: The weight corresponding to this subset of rrdata. When - // multiple WeightedRoundRobinPolicyItems are configured, the - // probability of returning an rrset is proportional to its weight - // relative to the sum of weights configured for all items. This weight - // should be non-negative. + // Weight: The weight corresponding to this WrrPolicyItem object. When + // multiple WrrPolicyItem objects are configured, the probability of + // returning an WrrPolicyItem object's data is proportional to its + // weight relative to the sum of weights configured for all items. This + // weight must be non-negative. Weight float64 `json:"weight,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2714,10 +2741,10 @@ type ResourceRecordSet struct { // Name: For example, www.example.com. Name string `json:"name,omitempty"` - // RoutingPolicy: Configures dynamic query responses based on geo - // location of querying user or a weighted round robin based routing - // policy. A ResourceRecordSet should only have either rrdata (static) - // or routing_policy (dynamic). An error is returned otherwise. + // RoutingPolicy: Configures dynamic query responses based on either the + // geo location of the querying user or a weighted round robin based + // routing policy. A valid ResourceRecordSet contains only rrdata (for + // static resolution) or a routing_policy (for dynamic resolution). RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"` // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section @@ -2777,12 +2804,12 @@ type ResourceRecordSetsListResponse struct { // NextPageToken: The presence of this field indicates that there exist // more results following your last page of results in pagination order. // To fetch them, make another list request using this value as your - // pagination token. This lets you retrieve complete contents of even - // larger collections, one page at a time. However, if the contents of - // the collection change between the first and last paginated list - // request, the set of elements returned are an inconsistent view of the - // collection. You cannot retrieve a consistent snapshot of a collection - // larger than the maximum page size. + // pagination token. This lets you retrieve the complete contents of + // even larger collections, one page at a time. However, if the + // collection changes between paginated list requests, the set of + // elements returned is an inconsistent view of the collection. You + // cannot retrieve a consistent snapshot of a collection larger than the + // maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Rrsets: The resource record set resources. diff --git a/dns/v1beta2/dns-api.json b/dns/v1beta2/dns-api.json index 060bb734385..72f310b666e 100644 --- a/dns/v1beta2/dns-api.json +++ b/dns/v1beta2/dns-api.json @@ -1821,7 +1821,7 @@ } } }, - "revision": "20230807", + "revision": "20230831", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -3048,7 +3048,7 @@ "id": "RRSetRoutingPolicyGeoPolicy", "properties": { "enableFencing": { - "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we'll failover to the next nearest geo bucket. With fencing, if health check is enabled, as long as some targets in the current geo bucket are healthy, we'll return only the healthy targets. However, if they're all unhealthy, we won't failover to the next nearest bucket, we'll simply return all the items in the current bucket even though they're unhealthy.", + "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we failover to the next nearest geo bucket. With fencing, if health checking is enabled, as long as some targets in the current geo bucket are healthy, we return only the healthy targets. However, if all targets are unhealthy, we don't failover to the next nearest bucket; instead, we return all the items in the current bucket even when all targets are unhealthy.", "type": "boolean" }, "items": { @@ -3088,7 +3088,7 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 ip per item. .", + "description": "DNSSEC generated signatures for all the rrdata within this item. If health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, @@ -3111,13 +3111,15 @@ "type": "object" }, "RRSetRoutingPolicyLoadBalancerTarget": { + "description": "The configuration for an individual load balancer to health check.", "id": "RRSetRoutingPolicyLoadBalancerTarget", "properties": { "ipAddress": { - "description": "The frontend IP address of the Load Balancer to health check.", + "description": "The frontend IP address of the load balancer to health check.", "type": "string" }, "ipProtocol": { + "description": "The protocol of the load balancer to health check.", "enum": [ "undefined", "tcp", @@ -3135,7 +3137,7 @@ "type": "string" }, "loadBalancerType": { - "description": "The type of Load Balancer specified by this target. Must match the configuration of the Load Balancer located at the LoadBalancerTarget's IP address/port and region.", + "description": "The type of load balancer specified by this target. This value must match the configuration of the load balancer located at the LoadBalancerTarget's IP address, port, and region. Use the following: - *regionalL4ilb*: for a regional internal passthrough Network Load Balancer. - *regionalL7ilb*: for a regional internal Application Load Balancer. - *globalL7ilb*: for a global internal Application Load Balancer. ", "enum": [ "none", "globalL7ilb", @@ -3144,26 +3146,26 @@ ], "enumDescriptions": [ "", - "Cross-region internal Application Load Balancer", - "Regional internal passthrough Network Load Balancer", - "Regional internal Application Load Balancer" + "", + "", + "" ], "type": "string" }, "networkUrl": { - "description": "The fully qualified url of the network on which the ILB is present. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", + "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} .", "type": "string" }, "port": { - "description": "The configured port of the Load Balancer.", + "description": "The configured port of the load balancer.", "type": "string" }, "project": { - "description": "The project ID in which the ILB exists.", + "description": "The project ID in which the load balancer is located.", "type": "string" }, "region": { - "description": "The region in which the ILB exists.", + "description": "The region in which the load balancer is located.", "type": "string" } }, @@ -3182,7 +3184,8 @@ "type": "string" }, "primaryTargets": { - "$ref": "RRSetRoutingPolicyHealthCheckTargets" + "$ref": "RRSetRoutingPolicyHealthCheckTargets", + "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the backup_geo_targets." }, "trickleTraffic": { "description": "When serving state is PRIMARY, this field provides the option of sending a small percentage of the traffic to the backup targets.", @@ -3215,7 +3218,7 @@ "properties": { "healthCheckedTargets": { "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "endpoints that need to be health checked before making the routing decision. The unhealthy endpoints will be omitted from the result. If all endpoints within a buckete are unhealthy, we'll choose a different bucket (sampled w.r.t. its weight) for responding. Note that if DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." + "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of rrdata or health_checked_targets can be set." }, "kind": { "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", @@ -3228,14 +3231,14 @@ "type": "array" }, "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 ip per item. .", + "description": "DNSSEC generated signatures for all the rrdata within this item. Note that if health checked targets are provided for DNSSEC enabled zones, there's a restriction of 1 IP address per item.", "items": { "type": "string" }, "type": "array" }, "weight": { - "description": "The weight corresponding to this subset of rrdata. When multiple WeightedRoundRobinPolicyItems are configured, the probability of returning an rrset is proportional to its weight relative to the sum of weights configured for all items. This weight should be non-negative.", + "description": "The weight corresponding to this WrrPolicyItem object. When multiple WrrPolicyItem objects are configured, the probability of returning an WrrPolicyItem object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", "format": "double", "type": "number" } @@ -3256,7 +3259,7 @@ }, "routingPolicy": { "$ref": "RRSetRoutingPolicy", - "description": "Configures dynamic query responses based on geo location of querying user or a weighted round robin based routing policy. A ResourceRecordSet should only have either rrdata (static) or routing_policy (dynamic). An error is returned otherwise." + "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid ResourceRecordSet contains only rrdata (for static resolution) or a routing_policy (for dynamic resolution)." }, "rrdatas": { "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", @@ -3296,7 +3299,7 @@ "type": "string" }, "nextPageToken": { - "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve complete contents of even larger collections, one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of elements returned are an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", + "description": "The presence of this field indicates that there exist more results following your last page of results in pagination order. To fetch them, make another list request using this value as your pagination token. This lets you retrieve the complete contents of even larger collections, one page at a time. However, if the collection changes between paginated list requests, the set of elements returned is an inconsistent view of the collection. You cannot retrieve a consistent snapshot of a collection larger than the maximum page size.", "type": "string" }, "rrsets": { diff --git a/dns/v1beta2/dns-gen.go b/dns/v1beta2/dns-gen.go index 5cb71912f69..2edc973bfb7 100644 --- a/dns/v1beta2/dns-gen.go +++ b/dns/v1beta2/dns-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dns/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // dnsService, err := dns.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package dns // import "google.golang.org/api/dns/v1beta2" import ( @@ -2380,12 +2394,12 @@ func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { // routes based on the geo location of the querying user. type RRSetRoutingPolicyGeoPolicy struct { // EnableFencing: Without fencing, if health check fails for all - // configured items in the current geo bucket, we'll failover to the - // next nearest geo bucket. With fencing, if health check is enabled, as - // long as some targets in the current geo bucket are healthy, we'll - // return only the healthy targets. However, if they're all unhealthy, - // we won't failover to the next nearest bucket, we'll simply return all - // the items in the current bucket even though they're unhealthy. + // configured items in the current geo bucket, we failover to the next + // nearest geo bucket. With fencing, if health checking is enabled, as + // long as some targets in the current geo bucket are healthy, we return + // only the healthy targets. However, if all targets are unhealthy, we + // don't failover to the next nearest bucket; instead, we return all the + // items in the current bucket even when all targets are unhealthy. EnableFencing bool `json:"enableFencing,omitempty"` // Items: The primary geo routing configuration. If there are multiple @@ -2435,8 +2449,8 @@ type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { Rrdatas []string `json:"rrdatas,omitempty"` // SignatureRrdatas: DNSSEC generated signatures for all the rrdata - // within this item. Note that if health checked targets are provided - // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . + // within this item. If health checked targets are provided for DNSSEC + // enabled zones, there's a restriction of 1 IP address per item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2495,11 +2509,15 @@ func (s *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RRSetRoutingPolicyLoadBalancerTarget: The configuration for an +// individual load balancer to health check. type RRSetRoutingPolicyLoadBalancerTarget struct { - // IpAddress: The frontend IP address of the Load Balancer to health + // IpAddress: The frontend IP address of the load balancer to health // check. IpAddress string `json:"ipAddress,omitempty"` + // IpProtocol: The protocol of the load balancer to health check. + // // Possible values: // "undefined" // "tcp" @@ -2508,30 +2526,34 @@ type RRSetRoutingPolicyLoadBalancerTarget struct { Kind string `json:"kind,omitempty"` - // LoadBalancerType: The type of Load Balancer specified by this target. - // Must match the configuration of the Load Balancer located at the - // LoadBalancerTarget's IP address/port and region. + // LoadBalancerType: The type of load balancer specified by this target. + // This value must match the configuration of the load balancer located + // at the LoadBalancerTarget's IP address, port, and region. Use the + // following: - *regionalL4ilb*: for a regional internal passthrough + // Network Load Balancer. - *regionalL7ilb*: for a regional internal + // Application Load Balancer. - *globalL7ilb*: for a global internal + // Application Load Balancer. // // Possible values: // "none" - // "globalL7ilb" - Cross-region internal Application Load Balancer - // "regionalL4ilb" - Regional internal passthrough Network Load - // Balancer - // "regionalL7ilb" - Regional internal Application Load Balancer + // "globalL7ilb" + // "regionalL4ilb" + // "regionalL7ilb" LoadBalancerType string `json:"loadBalancerType,omitempty"` - // NetworkUrl: The fully qualified url of the network on which the ILB - // is present. This should be formatted like + // NetworkUrl: The fully qualified URL of the network that the load + // balancer is attached to. This should be formatted like // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + // . NetworkUrl string `json:"networkUrl,omitempty"` - // Port: The configured port of the Load Balancer. + // Port: The configured port of the load balancer. Port string `json:"port,omitempty"` - // Project: The project ID in which the ILB exists. + // Project: The project ID in which the load balancer is located. Project string `json:"project,omitempty"` - // Region: The region in which the ILB exists. + // Region: The region in which the load balancer is located. Region string `json:"region,omitempty"` // ForceSendFields is a list of field names (e.g. "IpAddress") to @@ -2569,6 +2591,10 @@ type RRSetRoutingPolicyPrimaryBackupPolicy struct { Kind string `json:"kind,omitempty"` + // PrimaryTargets: Endpoints that are health checked before making the + // routing decision. Unhealthy endpoints are omitted from the results. + // If all endpoints are unhealthy, we serve a response based on the + // backup_geo_targets. PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` // TrickleTraffic: When serving state is PRIMARY, this field provides @@ -2647,12 +2673,12 @@ func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) { // RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which // contains the routing information for one WRR item. type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { - // HealthCheckedTargets: endpoints that need to be health checked before - // making the routing decision. The unhealthy endpoints will be omitted - // from the result. If all endpoints within a buckete are unhealthy, - // we'll choose a different bucket (sampled w.r.t. its weight) for - // responding. Note that if DNSSEC is enabled for this zone, only one of - // rrdata or health_checked_targets can be set. + // HealthCheckedTargets: Endpoints that are health checked before making + // the routing decision. The unhealthy endpoints are omitted from the + // result. If all endpoints within a bucket are unhealthy, we choose a + // different bucket (sampled with respect to its weight) for responding. + // If DNSSEC is enabled for this zone, only one of rrdata or + // health_checked_targets can be set. HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` Kind string `json:"kind,omitempty"` @@ -2661,14 +2687,15 @@ type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { // SignatureRrdatas: DNSSEC generated signatures for all the rrdata // within this item. Note that if health checked targets are provided - // for DNSSEC enabled zones, there's a restriction of 1 ip per item. . + // for DNSSEC enabled zones, there's a restriction of 1 IP address per + // item. SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Weight: The weight corresponding to this subset of rrdata. When - // multiple WeightedRoundRobinPolicyItems are configured, the - // probability of returning an rrset is proportional to its weight - // relative to the sum of weights configured for all items. This weight - // should be non-negative. + // Weight: The weight corresponding to this WrrPolicyItem object. When + // multiple WrrPolicyItem objects are configured, the probability of + // returning an WrrPolicyItem object's data is proportional to its + // weight relative to the sum of weights configured for all items. This + // weight must be non-negative. Weight float64 `json:"weight,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -2718,10 +2745,10 @@ type ResourceRecordSet struct { // Name: For example, www.example.com. Name string `json:"name,omitempty"` - // RoutingPolicy: Configures dynamic query responses based on geo - // location of querying user or a weighted round robin based routing - // policy. A ResourceRecordSet should only have either rrdata (static) - // or routing_policy (dynamic). An error is returned otherwise. + // RoutingPolicy: Configures dynamic query responses based on either the + // geo location of the querying user or a weighted round robin based + // routing policy. A valid ResourceRecordSet contains only rrdata (for + // static resolution) or a routing_policy (for dynamic resolution). RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"` // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section @@ -2775,12 +2802,12 @@ type ResourceRecordSetsListResponse struct { // NextPageToken: The presence of this field indicates that there exist // more results following your last page of results in pagination order. // To fetch them, make another list request using this value as your - // pagination token. This lets you retrieve complete contents of even - // larger collections, one page at a time. However, if the contents of - // the collection change between the first and last paginated list - // request, the set of elements returned are an inconsistent view of the - // collection. You cannot retrieve a consistent snapshot of a collection - // larger than the maximum page size. + // pagination token. This lets you retrieve the complete contents of + // even larger collections, one page at a time. However, if the + // collection changes between paginated list requests, the set of + // elements returned is an inconsistent view of the collection. You + // cannot retrieve a consistent snapshot of a collection larger than the + // maximum page size. NextPageToken string `json:"nextPageToken,omitempty"` // Rrsets: The resource record set resources. diff --git a/docs/v1/docs-gen.go b/docs/v1/docs-gen.go index da55a83e35e..73a55e810c4 100644 --- a/docs/v1/docs-gen.go +++ b/docs/v1/docs-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // docsService, err := docs.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // docsService, err := docs.NewService(ctx, option.WithScopes(docs.DriveReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // docsService, err := docs.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // docsService, err := docs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package docs // import "google.golang.org/api/docs/v1" import ( diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 59802098807..bb5d69cbf68 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20230814", + "revision": "20230831", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -4025,7 +4025,7 @@ }, "computeStyleInfo": { "deprecated": true, - "description": "Turn on font id model and returns font style information. Use PremiumFeatures.compute_style_info instead.", + "description": "Turn on font identification model and return font style information.", "type": "boolean" }, "enableImageQualityScores": { @@ -4374,7 +4374,7 @@ "type": "string" }, "displayName": { - "description": "The display name of the document, it supports all Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\\\"`, `,` `~`, `=` and `:` are reserved. If not specified, a default ID will be generated.", + "description": "The display name of the document, it supports all Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\\\"`, `,` `~`, `=` and `:` are reserved. If not specified, a default ID is generated.", "type": "string" }, "mimeType": { diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 292c5557345..aa173440ff0 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/document-ai/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // documentaiService, err := documentai.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // documentaiService, err := documentai.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // documentaiService, err := documentai.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package documentai // import "google.golang.org/api/documentai/v1" import ( @@ -5356,8 +5369,8 @@ type GoogleCloudDocumentaiV1OcrConfig struct { // their situation. AdvancedOcrOptions []string `json:"advancedOcrOptions,omitempty"` - // ComputeStyleInfo: Turn on font id model and returns font style - // information. Use PremiumFeatures.compute_style_info instead. + // ComputeStyleInfo: Turn on font identification model and return font + // style information. ComputeStyleInfo bool `json:"computeStyleInfo,omitempty"` // EnableImageQualityScores: Enables intelligent document quality scores @@ -5920,7 +5933,7 @@ type GoogleCloudDocumentaiV1RawDocument struct { // DisplayName: The display name of the document, it supports all // Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, // `{`, `}`,`'`, `\", `,` `~`, `=` and `:` are reserved. If not - // specified, a default ID will be generated. + // specified, a default ID is generated. DisplayName string `json:"displayName,omitempty"` // MimeType: An IANA MIME type (RFC6838) indicating the nature and diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 67673e5ced3..18dbde74dc9 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/document-ai/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // documentaiService, err := documentai.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // documentaiService, err := documentai.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // documentaiService, err := documentai.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package documentai // import "google.golang.org/api/documentai/v1beta2" import ( diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index cb020c552bb..24b9cd268a8 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1256,7 +1256,7 @@ } } }, - "revision": "20230814", + "revision": "20230831", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -7531,6 +7531,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3FieldExtractionMetadata": { + "description": "Metadata for how this field value is extracted.", + "id": "GoogleCloudDocumentaiV1beta3FieldExtractionMetadata", + "properties": { + "summaryOptions": { + "$ref": "GoogleCloudDocumentaiV1beta3SummaryOptions", + "description": "Summary options config." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3GcsDocument": { "description": "Specifies a document stored on Cloud Storage.", "id": "GoogleCloudDocumentaiV1beta3GcsDocument", @@ -7751,12 +7762,12 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest": { - "description": "The request message for the ImportProcessorVersion method. Requirements: - The Document AI [Service Agent](https://cloud.google.com/iam/docs/service-agents) of the destination project must have [Document AI Editor role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on the source project. The destination project is specified as part of the parent field. The source project is specified as part of the source field.", + "description": "The request message for the ImportProcessorVersion method. The Document AI [Service Agent](https://cloud.google.com/iam/docs/service-agents) of the destination project must have [Document AI Editor role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on the source project. The destination project is specified as part of the parent field. The source project is specified as part of the source or external_processor_version_source field.", "id": "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest", "properties": { "externalProcessorVersionSource": { "$ref": "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource", - "description": "The source processor version to import from, and can be from different environment and region than the destination processor." + "description": "The source processor version to import from. It can be from a different environment and region than the destination processor." }, "processorVersionSource": { "description": "The source processor version to import from. The source processor version and destination processor need to be in the same environment and region.", @@ -7893,7 +7904,7 @@ }, "computeStyleInfo": { "deprecated": true, - "description": "Turn on font id model and returns font style information. Use PremiumFeatures.compute_style_info instead.", + "description": "Turn on font identification model and return font style information.", "type": "boolean" }, "enableImageQualityScores": { @@ -7936,6 +7947,10 @@ "ocrConfig": { "$ref": "GoogleCloudDocumentaiV1beta3OcrConfig", "description": "Only applicable to `OCR_PROCESSOR`. Returns error if set on other processor types." + }, + "schemaOverride": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchema", + "description": "Optional. Override the schema of the ProcessorVersion. Will return an Invalid Argument error if this field is set when the underlying ProcessorVersion doesn't support schema override." } }, "type": "object" @@ -8246,6 +8261,10 @@ "description": "Metadata about a property.", "id": "GoogleCloudDocumentaiV1beta3PropertyMetadata", "properties": { + "fieldExtractionMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3FieldExtractionMetadata", + "description": "Field extraction metadata on the property." + }, "inactive": { "description": "Whether the property should be considered as \"inactive\".", "type": "boolean" @@ -8263,7 +8282,7 @@ "type": "string" }, "displayName": { - "description": "The display name of the document, it supports all Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\\\"`, `,` `~`, `=` and `:` are reserved. If not specified, a default ID will be generated.", + "description": "The display name of the document, it supports all Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\\\"`, `,` `~`, `=` and `:` are reserved. If not specified, a default ID is generated.", "type": "string" }, "mimeType": { @@ -8446,6 +8465,43 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3SummaryOptions": { + "description": "Metadata for document summarization.", + "id": "GoogleCloudDocumentaiV1beta3SummaryOptions", + "properties": { + "format": { + "description": "The format the summary should be in.", + "enum": [ + "FORMAT_UNSPECIFIED", + "PARAGRAPH", + "BULLETS" + ], + "enumDescriptions": [ + "Default.", + "Format the output in paragraphs.", + "Format the output in bullets." + ], + "type": "string" + }, + "length": { + "description": "How long the summary should be.", + "enum": [ + "LENGTH_UNSPECIFIED", + "BRIEF", + "MODERATE", + "COMPREHENSIVE" + ], + "enumDescriptions": [ + "Default.", + "A brief summary of one or two sentences.", + "A paragraph-length summary.", + "The longest option available." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata": { "description": "The metadata that represents a processor version being created.", "id": "GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata", diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index ab5a2716c05..3cddb6401de 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/document-ai/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // documentaiService, err := documentai.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // documentaiService, err := documentai.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // documentaiService, err := documentai.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package documentai // import "google.golang.org/api/documentai/v1beta3" import ( @@ -10749,6 +10762,36 @@ func (s *GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3FieldExtractionMetadata: Metadata for how +// this field value is extracted. +type GoogleCloudDocumentaiV1beta3FieldExtractionMetadata struct { + // SummaryOptions: Summary options config. + SummaryOptions *GoogleCloudDocumentaiV1beta3SummaryOptions `json:"summaryOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SummaryOptions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SummaryOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3FieldExtractionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3FieldExtractionMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3GcsDocument: Specifies a document stored // on Cloud Storage. type GoogleCloudDocumentaiV1beta3GcsDocument struct { @@ -11197,17 +11240,16 @@ func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata) MarshalJSON } // GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest: The -// request message for the ImportProcessorVersion method. Requirements: -// - The Document AI Service Agent -// (https://cloud.google.com/iam/docs/service-agents) of the destination -// project must have Document AI Editor role +// request message for the ImportProcessorVersion method. The Document +// AI Service Agent (https://cloud.google.com/iam/docs/service-agents) +// of the destination project must have Document AI Editor role // (https://cloud.google.com/document-ai/docs/access-control/iam-roles) // on the source project. The destination project is specified as part // of the parent field. The source project is specified as part of the -// source field. +// source or external_processor_version_source field. type GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest struct { // ExternalProcessorVersionSource: The source processor version to - // import from, and can be from different environment and region than + // import from. It can be from a different environment and region than // the destination processor. ExternalProcessorVersionSource *GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource `json:"externalProcessorVersionSource,omitempty"` @@ -11512,8 +11554,8 @@ type GoogleCloudDocumentaiV1beta3OcrConfig struct { // their situation. AdvancedOcrOptions []string `json:"advancedOcrOptions,omitempty"` - // ComputeStyleInfo: Turn on font id model and returns font style - // information. Use PremiumFeatures.compute_style_info instead. + // ComputeStyleInfo: Turn on font identification model and return font + // style information. ComputeStyleInfo bool `json:"computeStyleInfo,omitempty"` // EnableImageQualityScores: Enables intelligent document quality scores @@ -11597,6 +11639,12 @@ type GoogleCloudDocumentaiV1beta3ProcessOptions struct { // on other processor types. OcrConfig *GoogleCloudDocumentaiV1beta3OcrConfig `json:"ocrConfig,omitempty"` + // SchemaOverride: Optional. Override the schema of the + // ProcessorVersion. Will return an Invalid Argument error if this field + // is set when the underlying ProcessorVersion doesn't support schema + // override. + SchemaOverride *GoogleCloudDocumentaiV1beta3DocumentSchema `json:"schemaOverride,omitempty"` + // ForceSendFields is a list of field names (e.g. "OcrConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -12080,23 +12128,28 @@ func (s *GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo) MarshalJSO // GoogleCloudDocumentaiV1beta3PropertyMetadata: Metadata about a // property. type GoogleCloudDocumentaiV1beta3PropertyMetadata struct { + // FieldExtractionMetadata: Field extraction metadata on the property. + FieldExtractionMetadata *GoogleCloudDocumentaiV1beta3FieldExtractionMetadata `json:"fieldExtractionMetadata,omitempty"` + // Inactive: Whether the property should be considered as "inactive". Inactive bool `json:"inactive,omitempty"` - // ForceSendFields is a list of field names (e.g. "Inactive") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "FieldExtractionMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Inactive") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FieldExtractionMetadata") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -12115,7 +12168,7 @@ type GoogleCloudDocumentaiV1beta3RawDocument struct { // DisplayName: The display name of the document, it supports all // Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, // `{`, `}`,`'`, `\", `,` `~`, `=` and `:` are reserved. If not - // specified, a default ID will be generated. + // specified, a default ID is generated. DisplayName string `json:"displayName,omitempty"` // MimeType: An IANA MIME type (RFC6838) indicating the nature and @@ -12409,6 +12462,49 @@ func (s *GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionRequest) MarshalJ type GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse struct { } +// GoogleCloudDocumentaiV1beta3SummaryOptions: Metadata for document +// summarization. +type GoogleCloudDocumentaiV1beta3SummaryOptions struct { + // Format: The format the summary should be in. + // + // Possible values: + // "FORMAT_UNSPECIFIED" - Default. + // "PARAGRAPH" - Format the output in paragraphs. + // "BULLETS" - Format the output in bullets. + Format string `json:"format,omitempty"` + + // Length: How long the summary should be. + // + // Possible values: + // "LENGTH_UNSPECIFIED" - Default. + // "BRIEF" - A brief summary of one or two sentences. + // "MODERATE" - A paragraph-length summary. + // "COMPREHENSIVE" - The longest option available. + Length string `json:"length,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Format") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Format") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3SummaryOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3SummaryOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata: The // metadata that represents a processor version being created. type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata struct { diff --git a/domains/v1/domains-gen.go b/domains/v1/domains-gen.go index 2eabeb9e8a5..c6e12b35c38 100644 --- a/domains/v1/domains-gen.go +++ b/domains/v1/domains-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/domains/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // domainsService, err := domains.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // domainsService, err := domains.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // domainsService, err := domains.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package domains // import "google.golang.org/api/domains/v1" import ( diff --git a/domains/v1alpha2/domains-gen.go b/domains/v1alpha2/domains-gen.go index 829a292b2a2..0b91d9c0fb3 100644 --- a/domains/v1alpha2/domains-gen.go +++ b/domains/v1alpha2/domains-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/domains/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // domainsService, err := domains.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // domainsService, err := domains.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // domainsService, err := domains.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package domains // import "google.golang.org/api/domains/v1alpha2" import ( diff --git a/domains/v1beta1/domains-gen.go b/domains/v1beta1/domains-gen.go index c3f24f5e2d9..efc2e47b0d6 100644 --- a/domains/v1beta1/domains-gen.go +++ b/domains/v1beta1/domains-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/domains/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // domainsService, err := domains.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // domainsService, err := domains.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // domainsService, err := domains.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package domains // import "google.golang.org/api/domains/v1beta1" import ( diff --git a/domainsrdap/v1/domainsrdap-gen.go b/domainsrdap/v1/domainsrdap-gen.go index 5273d87e5fe..e6f846e04e2 100644 --- a/domainsrdap/v1/domainsrdap-gen.go +++ b/domainsrdap/v1/domainsrdap-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/domains/rdap/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // domainsrdapService, err := domainsrdap.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // domainsrdapService, err := domainsrdap.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // domainsrdapService, err := domainsrdap.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package domainsrdap // import "google.golang.org/api/domainsrdap/v1" import ( diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go index f8d06548e32..6ca6decd920 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/bid-manager/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package doubleclickbidmanager // import "google.golang.org/api/doubleclickbidmanager/v2" import ( diff --git a/doubleclicksearch/v2/doubleclicksearch-gen.go b/doubleclicksearch/v2/doubleclicksearch-gen.go index f7e09e9c1dd..cf8ce20f12b 100644 --- a/doubleclicksearch/v2/doubleclicksearch-gen.go +++ b/doubleclicksearch/v2/doubleclicksearch-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/search-ads // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // doubleclicksearchService, err := doubleclicksearch.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // doubleclicksearchService, err := doubleclicksearch.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // doubleclicksearchService, err := doubleclicksearch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package doubleclicksearch // import "google.golang.org/api/doubleclicksearch/v2" import ( diff --git a/drive/v2/drive-api.json b/drive/v2/drive-api.json index 0518f114516..9e16e862f7f 100644 --- a/drive/v2/drive-api.json +++ b/drive/v2/drive-api.json @@ -1007,7 +1007,7 @@ "drives": { "methods": { "delete": { - "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", + "description": "Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items.", "flatPath": "drives/{driveId}", "httpMethod": "DELETE", "id": "drive.drives.delete", @@ -1333,7 +1333,7 @@ ] }, "delete": { - "description": "Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.", + "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.", "flatPath": "files/{fileId}", "httpMethod": "DELETE", "id": "drive.files.delete", @@ -1822,7 +1822,7 @@ ], "parameters": { "fileId": { - "description": "The ID for the file or shared drive.", + "description": "The ID for the file.", "location": "path", "required": true, "type": "string" @@ -2086,7 +2086,7 @@ ] }, "trash": { - "description": " Moves a file to the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files. Only the owner may trash a file. The trashed item is excluded from all `files.list` responses returned for any user who doesn't own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. *Note:* Files moved to the trash still appear by default in results from the `files.list` method. To permanently remove a file, use `files.delete`.", + "description": "Moves a file to the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files.", "flatPath": "files/{fileId}/trash", "httpMethod": "POST", "id": "drive.files.trash", @@ -2136,7 +2136,7 @@ ] }, "untrash": { - "description": "Restores a file from the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files. Only the owner may untrash a file.", + "description": "Restores a file from the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files.", "flatPath": "files/{fileId}/untrash", "httpMethod": "POST", "id": "drive.files.untrash", @@ -3842,7 +3842,7 @@ } } }, - "revision": "20230714", + "revision": "20230822", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -4117,7 +4117,7 @@ "type": "object" }, "App": { - "description": "The apps resource provides a list of the apps that a user has installed, with information about each app's supported MIME types, file extensions, and other details.", + "description": "The apps resource provides a list of the apps that a user has installed, with information about each app's supported MIME types, file extensions, and other details. Some resource methods (such as `apps.get`) require an `appId`. Use the `apps.list` method to retrieve the ID for an installed application.", "id": "App", "properties": { "authorized": { @@ -4481,7 +4481,7 @@ "type": "object" }, "ChildReference": { - "description": "A reference to a folder's child.", + "description": "A reference to a folder's child. Some resource methods (such as `children.get`) require a `childId`. Use the `children.list` method to retrieve the ID of the child.", "id": "ChildReference", "properties": { "childLink": { @@ -4510,7 +4510,7 @@ "type": "object" }, "Comment": { - "description": "A comment on a file in Google Drive.", + "description": "A comment on a file in Google Drive. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.", "id": "Comment", "properties": { "anchor": { @@ -4631,7 +4631,7 @@ "type": "object" }, "CommentReply": { - "description": "A comment on a file in Google Drive.", + "description": "A comment on a file in Google Drive. Some resource methods (such as `replies.update`) require a `replyId`. Use the `replies.list` method to retrieve the ID for a reply.", "id": "CommentReply", "properties": { "author": { @@ -4746,7 +4746,7 @@ "type": "object" }, "Drive": { - "description": "Representation of a shared drive.", + "description": "Representation of a shared drive. Some resource methods (such as `drives.update`) require a `driveId`. Use the `drives.list` method to retrieve the ID for a shared drive.", "id": "Drive", "properties": { "backgroundImageFile": { @@ -4956,7 +4956,7 @@ "type": "object" }, "File": { - "description": "The metadata for a file.", + "description": "The metadata for a file. Some resource methods (such as `files.update`) require a `fileId`. Use the `files.list` method to retrieve the ID for a file.", "id": "File", "properties": { "alternateLink": { @@ -6018,7 +6018,7 @@ "type": "object" }, "ParentReference": { - "description": "A reference to a file's parent.", + "description": "A reference to a file's parent. Some resource methods (such as `parents.get`) require a `parentId`. Use the `parents.list` method to retrieve the ID for a parent.", "id": "ParentReference", "properties": { "id": { @@ -6051,7 +6051,7 @@ "type": "object" }, "Permission": { - "description": "A permission for a file.", + "description": "A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.", "id": "Permission", "properties": { "additionalRoles": { @@ -6265,7 +6265,7 @@ "type": "object" }, "Property": { - "description": "A key-value pair attached to a file that is either public or private to an application. The following limits apply to file properties: * Maximum of 100 properties total per file * Maximum of 30 private properties per app * Maximum of 30 public properties * Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property", + "description": "A key-value pair attached to a file that is either public or private to an application. The following limits apply to file properties: * Maximum of 100 properties total per file * Maximum of 30 private properties per app * Maximum of 30 public properties * Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property Some resource methods (such as `properties.update`) require a `propertyKey`. Use the `properties.list` method to retrieve the key for a property.", "id": "Property", "properties": { "etag": { @@ -6329,7 +6329,7 @@ "type": "object" }, "Revision": { - "description": "A revision of a file.", + "description": "A revision of a file. Some resource methods (such as `revisions.update`) require a `revisionId`. Use the `revisions.list` method to retrieve the ID for a revision.", "id": "Revision", "properties": { "downloadUrl": { diff --git a/drive/v2/drive-gen.go b/drive/v2/drive-gen.go index c140225b24a..2410d12b0fd 100644 --- a/drive/v2/drive-gen.go +++ b/drive/v2/drive-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/drive/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // driveService, err := drive.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // driveService, err := drive.NewService(ctx, option.WithScopes(drive.DriveScriptsScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // driveService, err := drive.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // driveService, err := drive.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package drive // import "google.golang.org/api/drive/v2" import ( @@ -767,7 +781,9 @@ func (s *AboutTeamDriveThemes) MarshalJSON() ([]byte, error) { // App: The apps resource provides a list of the apps that a user has // installed, with information about each app's supported MIME types, -// file extensions, and other details. +// file extensions, and other details. Some resource methods (such as +// `apps.get`) require an `appId`. Use the `apps.list` method to +// retrieve the ID for an installed application. type App struct { // Authorized: Whether the app is authorized to access data on the // user's Drive. @@ -1213,7 +1229,9 @@ func (s *ChildList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ChildReference: A reference to a folder's child. +// ChildReference: A reference to a folder's child. Some resource +// methods (such as `children.get`) require a `childId`. Use the +// `children.list` method to retrieve the ID of the child. type ChildReference struct { // ChildLink: Output only. A link to the child. ChildLink string `json:"childLink,omitempty"` @@ -1254,7 +1272,9 @@ func (s *ChildReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Comment: A comment on a file in Google Drive. +// Comment: A comment on a file in Google Drive. Some resource methods +// (such as `comments.update`) require a `commentId`. Use the +// `comments.list` method to retrieve the ID for a comment in a file. type Comment struct { // Anchor: A region of the document represented as a JSON string. For // details on defining anchor properties, refer to Add comments and @@ -1422,7 +1442,9 @@ func (s *CommentList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// CommentReply: A comment on a file in Google Drive. +// CommentReply: A comment on a file in Google Drive. Some resource +// methods (such as `replies.update`) require a `replyId`. Use the +// `replies.list` method to retrieve the ID for a reply. type CommentReply struct { // Author: Output only. The author of the reply. The author's email // address and permission ID will not be populated. @@ -1592,7 +1614,9 @@ func (s *ContentRestriction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Drive: Representation of a shared drive. +// Drive: Representation of a shared drive. Some resource methods (such +// as `drives.update`) require a `driveId`. Use the `drives.list` method +// to retrieve the ID for a shared drive. type Drive struct { // BackgroundImageFile: An image file and cropping parameters from which // a background image for this shared drive is set. This is a write only @@ -1959,7 +1983,9 @@ func (s *DriveList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// File: The metadata for a file. +// File: The metadata for a file. Some resource methods (such as +// `files.update`) require a `fileId`. Use the `files.list` method to +// retrieve the ID for a file. type File struct { // AlternateLink: Output only. A link for opening the file in a relevant // Google editor or viewer. @@ -3404,7 +3430,9 @@ func (s *ParentList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ParentReference: A reference to a file's parent. +// ParentReference: A reference to a file's parent. Some resource +// methods (such as `parents.get`) require a `parentId`. Use the +// `parents.list` method to retrieve the ID for a parent. type ParentReference struct { // Id: The ID of the parent. Id string `json:"id,omitempty"` @@ -3448,7 +3476,11 @@ func (s *ParentReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Permission: A permission for a file. +// Permission: A permission for a file. A permission grants a user, +// group, domain, or the world access to a file or a folder hierarchy. +// Some resource methods (such as `permissions.update`) require a +// `permissionId`. Use the `permissions.list` method to retrieve the ID +// for a file, folder, or shared drive. type Permission struct { // AdditionalRoles: Additional roles for this user. Only `commenter` is // currently allowed, though more may be supported in the future. @@ -3748,7 +3780,9 @@ func (s *PermissionList) MarshalJSON() ([]byte, error) { // properties: * Maximum of 100 properties total per file * Maximum of // 30 private properties per app * Maximum of 30 public properties * // Maximum of 124 bytes size limit on (key + value) string in UTF-8 -// encoding for a single property +// encoding for a single property Some resource methods (such as +// `properties.update`) require a `propertyKey`. Use the +// `properties.list` method to retrieve the key for a property. type Property struct { // Etag: Output only. ETag of the property. Etag string `json:"etag,omitempty"` @@ -3841,7 +3875,9 @@ func (s *PropertyList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Revision: A revision of a file. +// Revision: A revision of a file. Some resource methods (such as +// `revisions.update`) require a `revisionId`. Use the `revisions.list` +// method to retrieve the ID for a revision. type Revision struct { // DownloadUrl: Output only. Short term download URL for the file. This // will only be populated on files with content stored in Drive. @@ -7876,7 +7912,7 @@ type DrivesDeleteCall struct { } // Delete: Permanently deletes a shared drive for which the user is an -// organizer. The shared drive cannot contain any untrashed items. +// `organizer`. The shared drive cannot contain any untrashed items. // // - driveId: The ID of the shared drive. func (r *DrivesService) Delete(driveId string) *DrivesDeleteCall { @@ -7964,7 +8000,7 @@ func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", + // "description": "Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items.", // "flatPath": "drives/{driveId}", // "httpMethod": "DELETE", // "id": "drive.drives.delete", @@ -9261,9 +9297,10 @@ type FilesDeleteCall struct { header_ http.Header } -// Delete: Permanently deletes a file by ID. Skips the trash. The -// currently authenticated user must own the file or be an organizer on -// the parent for shared drive files. +// Delete: Permanently deletes a file owned by the user without moving +// it to the trash. If the file belongs to a shared drive, the user must +// be an `organizer` on the parent folder. If the target is a folder, +// all descendants owned by the user are also deleted. // // - fileId: The ID of the file to delete. func (r *FilesService) Delete(fileId string) *FilesDeleteCall { @@ -9357,7 +9394,7 @@ func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Permanently deletes a file by ID. Skips the trash. The currently authenticated user must own the file or be an organizer on the parent for shared drive files.", + // "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.", // "flatPath": "files/{fileId}", // "httpMethod": "DELETE", // "id": "drive.files.delete", @@ -10988,7 +11025,7 @@ type FilesListLabelsCall struct { // ListLabels: Lists the labels on a file. // -// - fileId: The ID for the file or shared drive. +// - fileId: The ID for the file. func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall { c := &FilesListLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.fileId = fileId @@ -11118,7 +11155,7 @@ func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, erro // ], // "parameters": { // "fileId": { - // "description": "The ID for the file or shared drive.", + // "description": "The ID for the file.", // "location": "path", // "required": true, // "type": "string" @@ -11951,16 +11988,9 @@ type FilesTrashCall struct { header_ http.Header } -// Trash: Moves a file to the trash. The currently authenticated user +// Trash: Moves a file to the trash. The currently authenticated user // must own the file or be at least a `fileOrganizer` on the parent for -// shared drive files. Only the owner may trash a file. The trashed item -// is excluded from all `files.list` responses returned for any user who -// doesn't own the file. However, all users with access to the file can -// see the trashed item metadata in an API response. All users with -// access can copy, download, export, and share the file. *Note:* Files -// moved to the trash still appear by default in results from the -// `files.list` method. To permanently remove a file, use -// `files.delete`. +// shared drive files. // // - fileId: The ID of the file to trash. func (r *FilesService) Trash(fileId string) *FilesTrashCall { @@ -12087,7 +12117,7 @@ func (c *FilesTrashCall) Do(opts ...googleapi.CallOption) (*File, error) { } return ret, nil // { - // "description": " Moves a file to the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files. Only the owner may trash a file. The trashed item is excluded from all `files.list` responses returned for any user who doesn't own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file. *Note:* Files moved to the trash still appear by default in results from the `files.list` method. To permanently remove a file, use `files.delete`.", + // "description": "Moves a file to the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files.", // "flatPath": "files/{fileId}/trash", // "httpMethod": "POST", // "id": "drive.files.trash", @@ -12151,7 +12181,7 @@ type FilesUntrashCall struct { // Untrash: Restores a file from the trash. The currently authenticated // user must own the file or be at least a `fileOrganizer` on the parent -// for shared drive files. Only the owner may untrash a file. +// for shared drive files. // // - fileId: The ID of the file to untrash. func (r *FilesService) Untrash(fileId string) *FilesUntrashCall { @@ -12278,7 +12308,7 @@ func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File, error) { } return ret, nil // { - // "description": "Restores a file from the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files. Only the owner may untrash a file.", + // "description": "Restores a file from the trash. The currently authenticated user must own the file or be at least a `fileOrganizer` on the parent for shared drive files.", // "flatPath": "files/{fileId}/untrash", // "httpMethod": "POST", // "id": "drive.files.untrash", diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index 6838acc3cca..1133789619c 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -667,7 +667,7 @@ ] }, "delete": { - "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", + "description": "Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items.", "flatPath": "drives/{driveId}", "httpMethod": "DELETE", "id": "drive.drives.delete", @@ -1024,7 +1024,7 @@ "supportsMediaUpload": true }, "delete": { - "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.", + "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.", "flatPath": "files/{fileId}", "httpMethod": "DELETE", "id": "drive.files.delete", @@ -1352,7 +1352,7 @@ ], "parameters": { "fileId": { - "description": "The ID for the file or shared drive.", + "description": "The ID for the file.", "location": "path", "required": true, "type": "string" @@ -2433,7 +2433,7 @@ } } }, - "revision": "20230714", + "revision": "20230822", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -2713,7 +2713,7 @@ "type": "object" }, "Comment": { - "description": "A comment on a file.", + "description": "A comment on a file. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.", "id": "Comment", "properties": { "anchor": { @@ -2845,7 +2845,7 @@ "type": "object" }, "Drive": { - "description": "Representation of a shared drive.", + "description": "Representation of a shared drive. Some resource methods (such as `drives.update`) require a `driveId`. Use the `drives.list` method to retrieve the ID for a shared drive.", "id": "Drive", "properties": { "backgroundImageFile": { @@ -3050,7 +3050,7 @@ "type": "object" }, "File": { - "description": "The metadata for a file.", + "description": "The metadata for a file. Some resource methods (such as `files.update`) require a `fileId`. Use the `files.list` method to retrieve the ID for a file.", "id": "File", "properties": { "appProperties": { @@ -3982,7 +3982,7 @@ "type": "object" }, "Permission": { - "description": "A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.", + "description": "A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. Some resource methods (such as `permissions.update`) require a `permissionId`. Use the `permissions.list` method to retrieve the ID for a file, folder, or shared drive.", "id": "Permission", "properties": { "allowFileDiscovery": { @@ -4133,7 +4133,7 @@ "type": "object" }, "Reply": { - "description": "A reply to a comment on a file.", + "description": "A reply to a comment on a file. Some resource methods (such as `replies.update`) require a `replyId`. Use the `replies.list` method to retrieve the ID for a reply.", "id": "Reply", "properties": { "action": { @@ -4207,7 +4207,7 @@ "type": "object" }, "Revision": { - "description": "The metadata for a revision to a file.", + "description": "The metadata for a revision to a file. Some resource methods (such as `revisions.update`) require a `revisionId`. Use the `revisions.list` method to retrieve the ID for a revision.", "id": "Revision", "properties": { "exportLinks": { diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index 5bd3a6a3f46..ac322093785 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/drive/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // driveService, err := drive.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // driveService, err := drive.NewService(ctx, option.WithScopes(drive.DriveScriptsScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // driveService, err := drive.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // driveService, err := drive.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package drive // import "google.golang.org/api/drive/v3" import ( @@ -648,7 +662,9 @@ func (s *Channel) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Comment: A comment on a file. +// Comment: A comment on a file. Some resource methods (such as +// `comments.update`) require a `commentId`. Use the `comments.list` +// method to retrieve the ID for a comment in a file. type Comment struct { // Anchor: A region of the document represented as a JSON string. For // details on defining anchor properties, refer to Manage comments and @@ -861,7 +877,9 @@ func (s *ContentRestriction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Drive: Representation of a shared drive. +// Drive: Representation of a shared drive. Some resource methods (such +// as `drives.update`) require a `driveId`. Use the `drives.list` method +// to retrieve the ID for a shared drive. type Drive struct { // BackgroundImageFile: An image file and cropping parameters from which // a background image for this shared drive is set. This is a write only @@ -1232,7 +1250,9 @@ func (s *DriveList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// File: The metadata for a file. +// File: The metadata for a file. Some resource methods (such as +// `files.update`) require a `fileId`. Use the `files.list` method to +// retrieve the ID for a file. type File struct { // AppProperties: A collection of arbitrary key-value pairs which are // private to the requesting app. @@ -2551,7 +2571,10 @@ func (s *ModifyLabelsResponse) MarshalJSON() ([]byte, error) { } // Permission: A permission for a file. A permission grants a user, -// group, domain or the world access to a file or a folder hierarchy. +// group, domain, or the world access to a file or a folder hierarchy. +// Some resource methods (such as `permissions.update`) require a +// `permissionId`. Use the `permissions.list` method to retrieve the ID +// for a file, folder, or shared drive. type Permission struct { // AllowFileDiscovery: Whether the permission allows the file to be // discovered through search. This is only applicable for permissions of @@ -2786,7 +2809,9 @@ func (s *PermissionList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Reply: A reply to a comment on a file. +// Reply: A reply to a comment on a file. Some resource methods (such as +// `replies.update`) require a `replyId`. Use the `replies.list` method +// to retrieve the ID for a reply. type Reply struct { // Action: The action the reply performed to the parent comment. Valid // values are: * `resolve` * `reopen` @@ -2897,7 +2922,9 @@ func (s *ReplyList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Revision: The metadata for a revision to a file. +// Revision: The metadata for a revision to a file. Some resource +// methods (such as `revisions.update`) require a `revisionId`. Use the +// `revisions.list` method to retrieve the ID for a revision. type Revision struct { // ExportLinks: Output only. Links for exporting Docs Editors files to // specific formats. @@ -5544,7 +5571,7 @@ type DrivesDeleteCall struct { } // Delete: Permanently deletes a shared drive for which the user is an -// organizer. The shared drive cannot contain any untrashed items. +// `organizer`. The shared drive cannot contain any untrashed items. // // - driveId: The ID of the shared drive. func (r *DrivesService) Delete(driveId string) *DrivesDeleteCall { @@ -5632,7 +5659,7 @@ func (c *DrivesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.", + // "description": "Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items.", // "flatPath": "drives/{driveId}", // "httpMethod": "DELETE", // "id": "drive.drives.delete", @@ -7085,9 +7112,9 @@ type FilesDeleteCall struct { } // Delete: Permanently deletes a file owned by the user without moving -// it to the trash. If the file belongs to a shared drive the user must -// be an organizer on the parent. If the target is a folder, all -// descendants owned by the user are also deleted. +// it to the trash. If the file belongs to a shared drive, the user must +// be an `organizer` on the parent folder. If the target is a folder, +// all descendants owned by the user are also deleted. // // - fileId: The ID of the file. func (r *FilesService) Delete(fileId string) *FilesDeleteCall { @@ -7181,7 +7208,7 @@ func (c *FilesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.", + // "description": "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.", // "flatPath": "files/{fileId}", // "httpMethod": "DELETE", // "id": "drive.files.delete", @@ -8315,7 +8342,7 @@ type FilesListLabelsCall struct { // ListLabels: Lists the labels on a file. // -// - fileId: The ID for the file or shared drive. +// - fileId: The ID for the file. func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall { c := &FilesListLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.fileId = fileId @@ -8445,7 +8472,7 @@ func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, erro // ], // "parameters": { // "fileId": { - // "description": "The ID for the file or shared drive.", + // "description": "The ID for the file.", // "location": "path", // "required": true, // "type": "string" diff --git a/driveactivity/v2/driveactivity-gen.go b/driveactivity/v2/driveactivity-gen.go index 32698555050..7bc6752bce2 100644 --- a/driveactivity/v2/driveactivity-gen.go +++ b/driveactivity/v2/driveactivity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/drive/activity/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // driveactivityService, err := driveactivity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // driveactivityService, err := driveactivity.NewService(ctx, option.WithScopes(driveactivity.DriveActivityReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // driveactivityService, err := driveactivity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // driveactivityService, err := driveactivity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package driveactivity // import "google.golang.org/api/driveactivity/v2" import ( diff --git a/drivelabels/v2/drivelabels-gen.go b/drivelabels/v2/drivelabels-gen.go index b15b09abd3d..2f4e57eab1a 100644 --- a/drivelabels/v2/drivelabels-gen.go +++ b/drivelabels/v2/drivelabels-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/drive/labels // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // drivelabelsService, err := drivelabels.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // drivelabelsService, err := drivelabels.NewService(ctx, option.WithScopes(drivelabels.DriveLabelsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // drivelabelsService, err := drivelabels.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // drivelabelsService, err := drivelabels.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package drivelabels // import "google.golang.org/api/drivelabels/v2" import ( diff --git a/drivelabels/v2beta/drivelabels-gen.go b/drivelabels/v2beta/drivelabels-gen.go index 674b609495c..c8a66faf240 100644 --- a/drivelabels/v2beta/drivelabels-gen.go +++ b/drivelabels/v2beta/drivelabels-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/drive/labels // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // drivelabelsService, err := drivelabels.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // drivelabelsService, err := drivelabels.NewService(ctx, option.WithScopes(drivelabels.DriveLabelsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // drivelabelsService, err := drivelabels.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // drivelabelsService, err := drivelabels.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package drivelabels // import "google.golang.org/api/drivelabels/v2beta" import ( diff --git a/essentialcontacts/v1/essentialcontacts-gen.go b/essentialcontacts/v1/essentialcontacts-gen.go index 88c45cb593e..3cd3b4a4d60 100644 --- a/essentialcontacts/v1/essentialcontacts-gen.go +++ b/essentialcontacts/v1/essentialcontacts-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/essentialcontacts/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // essentialcontactsService, err := essentialcontacts.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // essentialcontactsService, err := essentialcontacts.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // essentialcontactsService, err := essentialcontacts.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package essentialcontacts // import "google.golang.org/api/essentialcontacts/v1" import ( diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 1f48309470a..c17ffad8b6b 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -1197,7 +1197,7 @@ } } }, - "revision": "20230804", + "revision": "20230811", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -1393,7 +1393,7 @@ "id": "Destination", "properties": { "cloudFunction": { - "description": "The Cloud Function resource name. Only Cloud Functions V2 is supported. Format: `projects/{project}/locations/{location}/functions/{function}` This is a read-only field. Creating Cloud Functions V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.", + "description": "The Cloud Function resource name. Cloud Functions V1 and V2 are supported. Format: `projects/{project}/locations/{location}/functions/{function}` This is a read-only field. Creating Cloud Functions V1/V2 triggers is only supported via the Cloud Functions product. An error will be returned if the user sets this value.", "type": "string" }, "cloudRun": { diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index d546732b6ea..c349d823b32 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/eventarc // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // eventarcService, err := eventarc.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // eventarcService, err := eventarc.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // eventarcService, err := eventarc.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package eventarc // import "google.golang.org/api/eventarc/v1" import ( @@ -587,10 +600,10 @@ func (s *CloudRun) MarshalJSON() ([]byte, error) { // Destination: Represents a target of an invocation over HTTP. type Destination struct { - // CloudFunction: The Cloud Function resource name. Only Cloud Functions - // V2 is supported. Format: + // CloudFunction: The Cloud Function resource name. Cloud Functions V1 + // and V2 are supported. Format: // `projects/{project}/locations/{location}/functions/{function}` This - // is a read-only field. Creating Cloud Functions V2 triggers is only + // is a read-only field. Creating Cloud Functions V1/V2 triggers is only // supported via the Cloud Functions product. An error will be returned // if the user sets this value. CloudFunction string `json:"cloudFunction,omitempty"` diff --git a/eventarc/v1beta1/eventarc-gen.go b/eventarc/v1beta1/eventarc-gen.go index 09993a80286..2026617badf 100644 --- a/eventarc/v1beta1/eventarc-gen.go +++ b/eventarc/v1beta1/eventarc-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/eventarc // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // eventarcService, err := eventarc.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // eventarcService, err := eventarc.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // eventarcService, err := eventarc.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package eventarc // import "google.golang.org/api/eventarc/v1beta1" import ( diff --git a/factchecktools/v1alpha1/factchecktools-gen.go b/factchecktools/v1alpha1/factchecktools-gen.go index bc979cabd4f..78ebee472d2 100644 --- a/factchecktools/v1alpha1/factchecktools-gen.go +++ b/factchecktools/v1alpha1/factchecktools-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/fact-check/tools/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // factchecktoolsService, err := factchecktools.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // factchecktoolsService, err := factchecktools.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // factchecktoolsService, err := factchecktools.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package factchecktools // import "google.golang.org/api/factchecktools/v1alpha1" import ( diff --git a/fcm/v1/fcm-gen.go b/fcm/v1/fcm-gen.go index 1e36afe79ae..5122c5f68c0 100644 --- a/fcm/v1/fcm-gen.go +++ b/fcm/v1/fcm-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/cloud-messaging // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // fcmService, err := fcm.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // fcmService, err := fcm.NewService(ctx, option.WithScopes(fcm.FirebaseMessagingScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // fcmService, err := fcm.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // fcmService, err := fcm.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package fcm // import "google.golang.org/api/fcm/v1" import ( diff --git a/fcmdata/v1beta1/fcmdata-gen.go b/fcmdata/v1beta1/fcmdata-gen.go index ad96bed284a..2b070fc4fce 100644 --- a/fcmdata/v1beta1/fcmdata-gen.go +++ b/fcmdata/v1beta1/fcmdata-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/cloud-messaging // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // fcmdataService, err := fcmdata.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // fcmdataService, err := fcmdata.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // fcmdataService, err := fcmdata.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package fcmdata // import "google.golang.org/api/fcmdata/v1beta1" import ( diff --git a/file/v1/file-gen.go b/file/v1/file-gen.go index ab6544e6bdb..4d2b2ac5012 100644 --- a/file/v1/file-gen.go +++ b/file/v1/file-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/filestore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // fileService, err := file.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // fileService, err := file.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // fileService, err := file.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package file // import "google.golang.org/api/file/v1" import ( diff --git a/file/v1beta1/file-gen.go b/file/v1beta1/file-gen.go index 8d7613944ed..cbf163acbad 100644 --- a/file/v1beta1/file-gen.go +++ b/file/v1beta1/file-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/filestore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // fileService, err := file.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // fileService, err := file.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // fileService, err := file.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package file // import "google.golang.org/api/file/v1beta1" import ( diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index be216f4dab4..eabc7b1dc6d 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebaseService, err := firebase.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebaseService, err := firebase.NewService(ctx, option.WithScopes(firebase.FirebaseReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebaseService, err := firebase.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebaseService, err := firebase.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebase // import "google.golang.org/api/firebase/v1beta1" import ( diff --git a/firebaseappcheck/v1/firebaseappcheck-api.json b/firebaseappcheck/v1/firebaseappcheck-api.json index 6aac61e8c92..03c18ccc860 100644 --- a/firebaseappcheck/v1/firebaseappcheck-api.json +++ b/firebaseappcheck/v1/firebaseappcheck-api.json @@ -1343,7 +1343,7 @@ } } }, - "revision": "20230703", + "revision": "20230825", "rootUrl": "https://firebaseappcheck.googleapis.com/", "schemas": { "GoogleFirebaseAppcheckV1AppAttestConfig": { @@ -1930,7 +1930,7 @@ "ENFORCED" ], "enumDescriptions": [ - "Firebase App Check is not enforced for the service, nor are App Check metrics collected. Though the service is not protected by App Check in this mode, other applicable protections, such as user authorization, are still enforced. An unconfigured service is in this mode by default.", + "Firebase App Check is not enforced for the service, nor are App Check metrics collected. Though the service is not protected by App Check in this mode, other applicable protections, such as user authorization, are still enforced. An unconfigured service is in this mode by default. Note that resource policies behave slightly differently as an unconfigured resource policy means that the resource will inherit the EnforcementMode configured for the service it belongs to and will not be considered as being in OFF mode by default.", "Firebase App Check is not enforced for the service. App Check metrics are collected to help you decide when to turn on enforcement for the service. Though the service is not protected by App Check in this mode, other applicable protections, such as user authorization, are still enforced. Some services require certain conditions to be met before they will work with App Check, such as requiring you to upgrade to a specific service tier. Until those requirements are met for a service, this `UNENFORCED` setting will have no effect and App Check will not work with that service.", "Firebase App Check is enforced for the service. The service will reject any request that attempts to access your project's resources if it does not have valid App Check token attached, with some exceptions depending on the service; for example, some services will still allow requests bearing the developer's privileged service account credentials without an App Check token. App Check metrics continue to be collected to help you detect issues with your App Check integration and monitor the composition of your callers. While the service is protected by App Check, other applicable protections, such as user authorization, continue to be enforced at the same time. Use caution when choosing to enforce App Check on a Firebase service. If your users have not updated to an App Check capable version of your app, their apps will no longer be able to use your Firebase services that are enforcing App Check. App Check metrics can help you decide whether to enforce App Check on your Firebase services. If your app has not launched yet, you should enable enforcement immediately, since there are no outdated clients in use. Some services require certain conditions to be met before they will work with App Check, such as requiring you to upgrade to a specific service tier or requiring you to enable the service first. Until those requirements are met for a service, this `ENFORCED` setting will have no effect and App Check will not work with that service." ], diff --git a/firebaseappcheck/v1/firebaseappcheck-gen.go b/firebaseappcheck/v1/firebaseappcheck-gen.go index 9b5b6b54888..94fcf70f7f5 100644 --- a/firebaseappcheck/v1/firebaseappcheck-gen.go +++ b/firebaseappcheck/v1/firebaseappcheck-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/app-check // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebaseappcheckService, err := firebaseappcheck.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebaseappcheckService, err := firebaseappcheck.NewService(ctx, option.WithScopes(firebaseappcheck.FirebaseScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebaseappcheckService, err := firebaseappcheck.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebaseappcheckService, err := firebaseappcheck.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebaseappcheck // import "google.golang.org/api/firebaseappcheck/v1" import ( @@ -1593,7 +1607,11 @@ type GoogleFirebaseAppcheckV1Service struct { // App Check metrics collected. Though the service is not protected by // App Check in this mode, other applicable protections, such as user // authorization, are still enforced. An unconfigured service is in this - // mode by default. + // mode by default. Note that resource policies behave slightly + // differently as an unconfigured resource policy means that the + // resource will inherit the EnforcementMode configured for the service + // it belongs to and will not be considered as being in OFF mode by + // default. // "UNENFORCED" - Firebase App Check is not enforced for the service. // App Check metrics are collected to help you decide when to turn on // enforcement for the service. Though the service is not protected by diff --git a/firebaseappcheck/v1beta/firebaseappcheck-gen.go b/firebaseappcheck/v1beta/firebaseappcheck-gen.go index ced39ab1d70..6ee1bf6c472 100644 --- a/firebaseappcheck/v1beta/firebaseappcheck-gen.go +++ b/firebaseappcheck/v1beta/firebaseappcheck-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/app-check // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebaseappcheckService, err := firebaseappcheck.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebaseappcheckService, err := firebaseappcheck.NewService(ctx, option.WithScopes(firebaseappcheck.FirebaseScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebaseappcheckService, err := firebaseappcheck.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebaseappcheckService, err := firebaseappcheck.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebaseappcheck // import "google.golang.org/api/firebaseappcheck/v1beta" import ( diff --git a/firebaseappdistribution/v1/firebaseappdistribution-gen.go b/firebaseappdistribution/v1/firebaseappdistribution-gen.go index 6d8c9a57848..e777907a0e7 100644 --- a/firebaseappdistribution/v1/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1/firebaseappdistribution-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/products/app-distribution // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // firebaseappdistributionService, err := firebaseappdistribution.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebaseappdistributionService, err := firebaseappdistribution.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebaseappdistributionService, err := firebaseappdistribution.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebaseappdistribution // import "google.golang.org/api/firebaseappdistribution/v1" import ( diff --git a/firebasedatabase/v1beta/firebasedatabase-gen.go b/firebasedatabase/v1beta/firebasedatabase-gen.go index ebdfb21ac0e..d85207d87cc 100644 --- a/firebasedatabase/v1beta/firebasedatabase-gen.go +++ b/firebasedatabase/v1beta/firebasedatabase-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/reference/rest/database/database-management/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebasedatabaseService, err := firebasedatabase.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebasedatabaseService, err := firebasedatabase.NewService(ctx, option.WithScopes(firebasedatabase.FirebaseReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasedatabaseService, err := firebasedatabase.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasedatabaseService, err := firebasedatabase.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebasedatabase // import "google.golang.org/api/firebasedatabase/v1beta" import ( diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json index 4e8fc99f1ef..5b56704def1 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json @@ -224,7 +224,7 @@ } } }, - "revision": "20230703", + "revision": "20230906", "rootUrl": "https://firebasedynamiclinks.googleapis.com/", "schemas": { "AnalyticsInfo": { @@ -636,8 +636,8 @@ ], "enumDescriptions": [ "Unknown method.", - "iSDK performs a server lookup by device fingerprint in the background when app is first-opened; no API called by developer.", - "iSDK performs a server lookup by device fingerprint upon a dev API call.", + "iSDK performs a server lookup by device heuristics in the background when app is first-opened; no API called by developer.", + "iSDK performs a server lookup by device heuristics upon a dev API call.", "iSDK performs a strong match only if weak match is found upon a dev API call." ], "type": "string" @@ -647,7 +647,7 @@ "type": "string" }, "uniqueMatchLinkToCheck": { - "description": "Possible unique matched link that server need to check before performing fingerprint match. If passed link is short server need to expand the link. If link is long server need to vslidate the link.", + "description": "Possible unique matched link that server need to check before performing device heuristics match. If passed link is short server need to expand the link. If link is long server need to vslidate the link.", "type": "string" }, "visualStyle": { @@ -685,14 +685,14 @@ ], "enumDescriptions": [ "Unset.", - "Weak confidence, more than one matching link found or link suspected to be false positive", - "Default confidence, match based on fingerprint", - "Unique confidence, match based on \"unique match link to check\" or other means" + "Weak confidence, more than one matching link found or link suspected to be false positive.", + "Default confidence, match based on device heuristics.", + "Unique confidence, match based on \"unique match link to check\" or other means." ], "type": "string" }, "deepLink": { - "description": "The deep-link attributed post-install via one of several techniques (fingerprint, copy unique).", + "description": "The deep-link attributed post-install via one of several techniques (device heuristics, copy unique).", "type": "string" }, "externalBrowserDestinationLink": { @@ -704,7 +704,7 @@ "type": "string" }, "invitationId": { - "description": "Invitation ID attributed post-install via one of several techniques (fingerprint, copy unique).", + "description": "Invitation ID attributed post-install via one of several techniques (device heuristics, copy unique).", "type": "string" }, "isStrongMatchExecutable": { @@ -730,7 +730,7 @@ "type": "string" }, "requestedLink": { - "description": "Entire FDL (short or long) attributed post-install via one of several techniques (fingerprint, copy unique).", + "description": "Entire FDL (short or long) attributed post-install via one of several techniques (device heuristics, copy unique).", "type": "string" }, "resolvedLink": { diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go index 282b73980cf..2f5aa5fa399 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/dynamic-links/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // firebasedynamiclinksService, err := firebasedynamiclinks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasedynamiclinksService, err := firebasedynamiclinks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasedynamiclinksService, err := firebasedynamiclinks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebasedynamiclinks // import "google.golang.org/api/firebasedynamiclinks/v1" import ( @@ -777,10 +790,10 @@ type GetIosPostInstallAttributionRequest struct { // Possible values: // "UNKNOWN_PAYLOAD_RETRIEVAL_METHOD" - Unknown method. // "IMPLICIT_WEAK_MATCH" - iSDK performs a server lookup by device - // fingerprint in the background when app is first-opened; no API called + // heuristics in the background when app is first-opened; no API called // by developer. // "EXPLICIT_WEAK_MATCH" - iSDK performs a server lookup by device - // fingerprint upon a dev API call. + // heuristics upon a dev API call. // "EXPLICIT_STRONG_AFTER_WEAK_MATCH" - iSDK performs a strong match // only if weak match is found upon a dev API call. RetrievalMethod string `json:"retrievalMethod,omitempty"` @@ -790,8 +803,8 @@ type GetIosPostInstallAttributionRequest struct { SdkVersion string `json:"sdkVersion,omitempty"` // UniqueMatchLinkToCheck: Possible unique matched link that server need - // to check before performing fingerprint match. If passed link is short - // server need to expand the link. If link is long server need to + // to check before performing device heuristics match. If passed link is + // short server need to expand the link. If link is long server need to // vslidate the link. UniqueMatchLinkToCheck string `json:"uniqueMatchLinkToCheck,omitempty"` @@ -842,14 +855,14 @@ type GetIosPostInstallAttributionResponse struct { // Possible values: // "UNKNOWN_ATTRIBUTION_CONFIDENCE" - Unset. // "WEAK" - Weak confidence, more than one matching link found or link - // suspected to be false positive - // "DEFAULT" - Default confidence, match based on fingerprint + // suspected to be false positive. + // "DEFAULT" - Default confidence, match based on device heuristics. // "UNIQUE" - Unique confidence, match based on "unique match link to - // check" or other means + // check" or other means. AttributionConfidence string `json:"attributionConfidence,omitempty"` // DeepLink: The deep-link attributed post-install via one of several - // techniques (fingerprint, copy unique). + // techniques (device heuristics, copy unique). DeepLink string `json:"deepLink,omitempty"` // ExternalBrowserDestinationLink: User-agent specific custom-scheme @@ -868,7 +881,7 @@ type GetIosPostInstallAttributionResponse struct { FallbackLink string `json:"fallbackLink,omitempty"` // InvitationId: Invitation ID attributed post-install via one of - // several techniques (fingerprint, copy unique). + // several techniques (device heuristics, copy unique). InvitationId string `json:"invitationId,omitempty"` // IsStrongMatchExecutable: Instruction for iSDK to attemmpt to perform @@ -889,7 +902,7 @@ type GetIosPostInstallAttributionResponse struct { RequestIpVersion string `json:"requestIpVersion,omitempty"` // RequestedLink: Entire FDL (short or long) attributed post-install via - // one of several techniques (fingerprint, copy unique). + // one of several techniques (device heuristics, copy unique). RequestedLink string `json:"requestedLink,omitempty"` // ResolvedLink: The entire FDL, expanded from a short link. It is the diff --git a/firebasehosting/v1/firebasehosting-gen.go b/firebasehosting/v1/firebasehosting-gen.go index ad88bb3c620..217e9f8cad1 100644 --- a/firebasehosting/v1/firebasehosting-gen.go +++ b/firebasehosting/v1/firebasehosting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/hosting/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // firebasehostingService, err := firebasehosting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasehostingService, err := firebasehosting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasehostingService, err := firebasehosting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebasehosting // import "google.golang.org/api/firebasehosting/v1" import ( diff --git a/firebasehosting/v1beta1/firebasehosting-api.json b/firebasehosting/v1beta1/firebasehosting-api.json index 126e0358fae..3d73820e0fc 100644 --- a/firebasehosting/v1beta1/firebasehosting-api.json +++ b/firebasehosting/v1beta1/firebasehosting-api.json @@ -170,6 +170,11 @@ "description": "Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label.", "location": "query", "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validates that the site_id is available and that the request would succeed, returning the expected resulting site or error.", + "location": "query", + "type": "boolean" } }, "path": "v1beta1/{+parent}/sites", @@ -2109,7 +2114,7 @@ } } }, - "revision": "20230806", + "revision": "20230906", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "ActingUser": { diff --git a/firebasehosting/v1beta1/firebasehosting-gen.go b/firebasehosting/v1beta1/firebasehosting-gen.go index d5edb1f688c..0074b903513 100644 --- a/firebasehosting/v1beta1/firebasehosting-gen.go +++ b/firebasehosting/v1beta1/firebasehosting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/hosting/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebasehostingService, err := firebasehosting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebasehostingService, err := firebasehosting.NewService(ctx, option.WithScopes(firebasehosting.FirebaseReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasehostingService, err := firebasehosting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasehostingService, err := firebasehosting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebasehosting // import "google.golang.org/api/firebasehosting/v1beta1" import ( @@ -1979,6 +1993,14 @@ func (c *ProjectsSitesCreateCall) SiteId(siteId string) *ProjectsSitesCreateCall return c } +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates that the site_id is available and that the request would +// succeed, returning the expected resulting site or error. +func (c *ProjectsSitesCreateCall) ValidateOnly(validateOnly bool) *ProjectsSitesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -2089,6 +2111,11 @@ func (c *ProjectsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error // "description": "Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label.", // "location": "query", // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates that the site_id is available and that the request would succeed, returning the expected resulting site or error.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1beta1/{+parent}/sites", diff --git a/firebaseml/v1/firebaseml-gen.go b/firebaseml/v1/firebaseml-gen.go index f75e3cc90ed..83c0e557492 100644 --- a/firebaseml/v1/firebaseml-gen.go +++ b/firebaseml/v1/firebaseml-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // firebasemlService, err := firebaseml.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasemlService, err := firebaseml.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasemlService, err := firebaseml.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebaseml // import "google.golang.org/api/firebaseml/v1" import ( diff --git a/firebaseml/v1beta2/firebaseml-gen.go b/firebaseml/v1beta2/firebaseml-gen.go index 62b64fe0975..99597ec8818 100644 --- a/firebaseml/v1beta2/firebaseml-gen.go +++ b/firebaseml/v1beta2/firebaseml-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // firebasemlService, err := firebaseml.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasemlService, err := firebaseml.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasemlService, err := firebaseml.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebaseml // import "google.golang.org/api/firebaseml/v1beta2" import ( diff --git a/firebaserules/v1/firebaserules-gen.go b/firebaserules/v1/firebaserules-gen.go index 72cc957c778..6fb007868a0 100644 --- a/firebaserules/v1/firebaserules-gen.go +++ b/firebaserules/v1/firebaserules-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/storage/security // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebaserulesService, err := firebaserules.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebaserulesService, err := firebaserules.NewService(ctx, option.WithScopes(firebaserules.FirebaseReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebaserulesService, err := firebaserules.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebaserulesService, err := firebaserules.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebaserules // import "google.golang.org/api/firebaserules/v1" import ( diff --git a/firebasestorage/v1beta/firebasestorage-api.json b/firebasestorage/v1beta/firebasestorage-api.json index 6a9f1a2c39f..1ccb34e769a 100644 --- a/firebasestorage/v1beta/firebasestorage-api.json +++ b/firebasestorage/v1beta/firebasestorage-api.json @@ -238,7 +238,7 @@ } } }, - "revision": "20230515", + "revision": "20230825", "rootUrl": "https://firebasestorage.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -252,7 +252,8 @@ "id": "Bucket", "properties": { "name": { - "description": "Resource name of the bucket.", + "description": "Output only. Resource name of the bucket.", + "readOnly": true, "type": "string" } }, diff --git a/firebasestorage/v1beta/firebasestorage-gen.go b/firebasestorage/v1beta/firebasestorage-gen.go index b907a983d61..9e5c2d8be9a 100644 --- a/firebasestorage/v1beta/firebasestorage-gen.go +++ b/firebasestorage/v1beta/firebasestorage-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/storage // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // firebasestorageService, err := firebasestorage.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firebasestorageService, err := firebasestorage.NewService(ctx, option.WithScopes(firebasestorage.FirebaseScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firebasestorageService, err := firebasestorage.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firebasestorageService, err := firebasestorage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firebasestorage // import "google.golang.org/api/firebasestorage/v1beta" import ( @@ -175,7 +189,7 @@ type AddFirebaseRequest struct { // Bucket: A storage bucket and its relation to a parent Firebase // project. type Bucket struct { - // Name: Resource name of the bucket. + // Name: Output only. Resource name of the bucket. Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 09ea3febe94..d837a34ad00 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/firestore // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // firestoreService, err := firestore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firestoreService, err := firestore.NewService(ctx, option.WithScopes(firestore.DatastoreScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firestoreService, err := firestore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firestoreService, err := firestore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firestore // import "google.golang.org/api/firestore/v1" import ( diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 466947171fe..e50f1a1aec5 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/firestore // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // firestoreService, err := firestore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firestoreService, err := firestore.NewService(ctx, option.WithScopes(firestore.DatastoreScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firestoreService, err := firestore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firestoreService, err := firestore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firestore // import "google.golang.org/api/firestore/v1beta1" import ( diff --git a/firestore/v1beta2/firestore-gen.go b/firestore/v1beta2/firestore-gen.go index 60e3611bd01..c4f3d0e31c6 100644 --- a/firestore/v1beta2/firestore-gen.go +++ b/firestore/v1beta2/firestore-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/firestore // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // firestoreService, err := firestore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // firestoreService, err := firestore.NewService(ctx, option.WithScopes(firestore.DatastoreScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // firestoreService, err := firestore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // firestoreService, err := firestore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package firestore // import "google.golang.org/api/firestore/v1beta2" import ( diff --git a/fitness/v1/fitness-gen.go b/fitness/v1/fitness-gen.go index 9822a82d552..94968176b74 100644 --- a/fitness/v1/fitness-gen.go +++ b/fitness/v1/fitness-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/fit/rest/v1/get-started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // fitnessService, err := fitness.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // fitnessService, err := fitness.NewService(ctx, option.WithScopes(fitness.FitnessSleepWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // fitnessService, err := fitness.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // fitnessService, err := fitness.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package fitness // import "google.golang.org/api/fitness/v1" import ( diff --git a/forms/v1/forms-gen.go b/forms/v1/forms-gen.go index 3dec47f2b9b..8b7b71e0d53 100644 --- a/forms/v1/forms-gen.go +++ b/forms/v1/forms-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/forms/api // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // formsService, err := forms.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // formsService, err := forms.NewService(ctx, option.WithScopes(forms.FormsResponsesReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // formsService, err := forms.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // formsService, err := forms.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package forms // import "google.golang.org/api/forms/v1" import ( diff --git a/games/v1/games-api.json b/games/v1/games-api.json index bb333cae1a3..4f46f1bc042 100644 --- a/games/v1/games-api.json +++ b/games/v1/games-api.json @@ -2,6 +2,9 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/androidpublisher": { + "description": "View and manage your Google Play Developer account" + }, "https://www.googleapis.com/auth/drive.appdata": { "description": "See, create, and delete its own configuration data in your Google Drive" }, @@ -168,7 +171,7 @@ "type": "string" }, "stepsToIncrement": { - "description": "The number of steps to increment.", + "description": "Required. The number of steps to increment.", "format": "int32", "location": "query", "required": true, @@ -281,7 +284,7 @@ "type": "string" }, "steps": { - "description": "The minimum value to set the steps to.", + "description": "Required. The minimum value to set the steps to.", "format": "int32", "location": "query", "required": true, @@ -365,13 +368,11 @@ "platformType": { "description": "Restrict application details returned to the specific platform.", "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", "ANDROID", "IOS", "WEB_APP" ], "enumDescriptions": [ - "Default value, don't use.", "Retrieve applications that can be played on Android.", "Retrieve applications that can be played on iOS.", "Retrieve applications that can be played on desktop web." @@ -403,12 +404,10 @@ "endPointType": { "description": "Type of endpoint being requested.", "enum": [ - "END_POINT_TYPE_UNSPECIFIED", "PROFILE_CREATION", "PROFILE_SETTINGS" ], "enumDescriptions": [ - "Default value. This value is unused.", "Request a URL to create a new profile.", "Request a URL for the Settings view." ], @@ -649,11 +648,9 @@ "collection": { "description": "The collection of categories for which data will be returned.", "enum": [ - "COLLECTION_UNSPECIFIED", "ALL" ], "enumDescriptions": [ - "Default value. This value is unused.", "Retrieve data for all categories. This is the default." ], "location": "path", @@ -823,6 +820,88 @@ } } }, + "recall": { + "methods": { + "linkPersona": { + "description": "Associate the PGS Player principal encoded in the provided recall session id with an in-game account", + "flatPath": "games/v1/recall:linkPersona", + "httpMethod": "POST", + "id": "games.recall.linkPersona", + "parameterOrder": [], + "parameters": {}, + "path": "games/v1/recall:linkPersona", + "request": { + "$ref": "LinkPersonaRequest" + }, + "response": { + "$ref": "LinkPersonaResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "resetPersona": { + "description": "Delete all Recall tokens linking the given persona to any player (with or without a profile).", + "flatPath": "games/v1/recall:resetPersona", + "httpMethod": "POST", + "id": "games.recall.resetPersona", + "parameterOrder": [], + "parameters": {}, + "path": "games/v1/recall:resetPersona", + "request": { + "$ref": "ResetPersonaRequest" + }, + "response": { + "$ref": "ResetPersonaResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "retrieveTokens": { + "description": "Retrieve all Recall tokens associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.", + "flatPath": "games/v1/recall/tokens/{sessionId}", + "httpMethod": "GET", + "id": "games.recall.retrieveTokens", + "parameterOrder": [ + "sessionId" + ], + "parameters": { + "sessionId": { + "description": "Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "games/v1/recall/tokens/{sessionId}", + "response": { + "$ref": "RetrievePlayerTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "unlinkPersona": { + "description": "Delete a Recall token linking the PGS Player principal identified by the Recall session and an in-game account identified either by the 'persona' or by the token value.", + "flatPath": "games/v1/recall:unlinkPersona", + "httpMethod": "POST", + "id": "games.recall.unlinkPersona", + "parameterOrder": [], + "parameters": {}, + "path": "games/v1/recall:unlinkPersona", + "request": { + "$ref": "UnlinkPersonaRequest" + }, + "response": { + "$ref": "UnlinkPersonaResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + } + } + }, "revisions": { "methods": { "check": { @@ -835,7 +914,7 @@ ], "parameters": { "clientRevision": { - "description": "The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App.", + "description": "Required. The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App.", "location": "query", "required": true, "type": "string" @@ -867,21 +946,18 @@ "includeRankType": { "description": "The types of ranks to return. If the parameter is omitted, no ranks will be returned.", "enum": [ - "INCLUDE_RANK_TYPE_UNSPECIFIED", "ALL", "PUBLIC", "SOCIAL", "FRIENDS" ], "enumDeprecated": [ - false, false, false, true, false ], "enumDescriptions": [ - "Default value. Should be unused.", "Retrieve all supported ranks. In HTTP, this parameter value can also be specified as `ALL`.", "Retrieve public ranks, if the player is sharing their gameplay activity publicly.", "(Obsolete) Retrieve the social rank.", @@ -921,14 +997,12 @@ "timeSpan": { "description": "The time span for the scores and ranks you're requesting.", "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "Get the high scores for all time spans. If this is used, maxResults values will be ignored.", "Get the all time high score.", "List the top scores for the current day.", @@ -961,19 +1035,16 @@ "collection": { "description": "The collection of scores you're requesting.", "enum": [ - "SCORE_COLLECTION_UNSPECIFIED", "PUBLIC", "SOCIAL", "FRIENDS" ], "enumDeprecated": [ - false, false, true, false ], "enumDescriptions": [ - "Default value. This value is unused.", "List all scores in the public leaderboard.", "(Obsolete) Legacy G+ social scores.", "List only scores of friends." @@ -1005,15 +1076,13 @@ "type": "string" }, "timeSpan": { - "description": "The time span for the scores and ranks you're requesting.", + "description": "Required. The time span for the scores and ranks you're requesting.", "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "The score is an all-time score.", "The score is a weekly score.", "The score is a daily score." @@ -1045,19 +1114,16 @@ "collection": { "description": "The collection of scores you're requesting.", "enum": [ - "SCORE_COLLECTION_UNSPECIFIED", "PUBLIC", "SOCIAL", "FRIENDS" ], "enumDeprecated": [ - false, false, true, false ], "enumDescriptions": [ - "Default value. This value is unused.", "List all scores in the public leaderboard.", "(Obsolete) Legacy G+ social scores.", "List only scores of friends." @@ -1100,15 +1166,13 @@ "type": "boolean" }, "timeSpan": { - "description": "The time span for the scores and ranks you're requesting.", + "description": "Required. The time span for the scores and ranks you're requesting.", "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "The score is an all-time score.", "The score is a weekly score.", "The score is a daily score." @@ -1148,7 +1212,7 @@ "type": "string" }, "score": { - "description": "The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.", + "description": "Required. The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.", "format": "int64", "location": "query", "required": true, @@ -1290,7 +1354,7 @@ } } }, - "revision": "20230712", + "revision": "20230830", "rootUrl": "https://games.googleapis.com/", "schemas": { "AchievementDefinition": { @@ -1300,12 +1364,10 @@ "achievementType": { "description": "The type of the achievement.", "enum": [ - "ACHIEVEMENT_TYPE_UNSPECIFIED", "STANDARD", "INCREMENTAL" ], "enumDescriptions": [ - "Safe default, don't use.", "Achievement is either locked or unlocked.", "Achievement is incremental." ], @@ -1331,13 +1393,11 @@ "initialState": { "description": "The initial state of the achievement.", "enum": [ - "INITIAL_ACHIEVEMENT_STATE_UNSPECIFIED", "HIDDEN", "REVEALED", "UNLOCKED" ], "enumDescriptions": [ - "Safe default, don't use.", "Achievement is hidden.", "Achievement is revealed.", "Achievement is unlocked." @@ -1425,12 +1485,10 @@ "currentState": { "description": "The current state of the achievement for which a reveal was attempted. This might be `UNLOCKED` if the achievement was already unlocked.", "enum": [ - "REVEAL_ACHIEVEMENT_STATE_UNSPECIFIED", "REVEALED", "UNLOCKED" ], "enumDescriptions": [ - "Safe default, don't use.", "Achievement is revealed.", "Achievement is unlocked." ], @@ -1537,14 +1595,12 @@ "updateType": { "description": "The type of update being applied.", "enum": [ - "ACHIEVEMENT_UPDATE_TYPE_UNSPECIFIED", "REVEAL", "UNLOCK", "INCREMENT", "SET_STEPS_AT_LEAST" ], "enumDescriptions": [ - "Safe default, don't use.", "Achievement is revealed.", "Achievement is unlocked.", "Achievement is incremented.", @@ -1566,13 +1622,11 @@ "currentState": { "description": "The current state of the achievement.", "enum": [ - "UPDATED_ACHIEVEMENT_STATE_UNSPECIFIED", "HIDDEN", "REVEALED", "UNLOCKED" ], "enumDescriptions": [ - "Safe default, don't use.", "Achievement is hidden.", "Achievement is revealed.", "Achievement is unlocked." @@ -1631,11 +1685,9 @@ "description": "A list of features that have been enabled for the application.", "items": { "enum": [ - "APPLICATION_FEATURE_UNSPECIFIED", "SNAPSHOTS" ], "enumDescriptions": [ - "Safe default, don't use.", "Saved Games (snapshots)." ], "type": "string" @@ -1791,7 +1843,6 @@ "failureCause": { "description": "The cause for the update failure.", "enum": [ - "EVENT_FAILURE_CAUSE_UNSPECIFIED", "TOO_LARGE", "TIME_PERIOD_EXPIRED", "TIME_PERIOD_SHORT", @@ -1800,7 +1851,6 @@ "RECORD_RATE_HIGH" ], "enumDescriptions": [ - "Default value. Should not be used.", "A batch request was issued with more events than are allowed in a single batch.", "A batch was sent with data too far in the past to record.", "A batch was sent with a time range that was too short.", @@ -1874,12 +1924,10 @@ "visibility": { "description": "The visibility of event being tracked in this definition.", "enum": [ - "EVENT_VISIBILITY_UNSPECIFIED", "REVEALED", "HIDDEN" ], "enumDescriptions": [ - "Default value. Should not be used.", "This event should be visible to all users.", "This event should only be shown to users that have recorded this event at least once." ], @@ -1964,12 +2012,10 @@ "failureCause": { "description": "The cause for the update failure.", "enum": [ - "EVENT_UPDATE_FAILURE_CAUSE_UNSPECIFIED", "NOT_FOUND", "INVALID_UPDATE_VALUE" ], "enumDescriptions": [ - "Default value. Should not use.", "An attempt was made to set an event that was not defined.", "An attempt was made to increment an event by a non-positive value." ], @@ -2170,13 +2216,11 @@ "platformType": { "description": "The platform type.", "enum": [ - "PLATFORM_TYPE_UNSPECIFIED", "ANDROID", "IOS", "WEB_APP" ], "enumDescriptions": [ - "Default value. Should be unused.", "Instance is for Android.", "Instance is for iOS.", "Instance is for Web App." @@ -2302,12 +2346,10 @@ "order": { "description": "How scores are ordered.", "enum": [ - "SCORE_ORDER_UNSPECIFIED", "LARGER_IS_BETTER", "SMALLER_IS_BETTER" ], "enumDescriptions": [ - "Default value. This value is unused.", "Larger values are better; scores are sorted in descending order", "Smaller values are better; scores are sorted in ascending order" ], @@ -2353,13 +2395,11 @@ "timeSpan": { "description": "The time span of this high score.", "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "The score is an all-time score.", "The score is a weekly score.", "The score is a daily score." @@ -2460,6 +2500,77 @@ }, "type": "object" }, + "LinkPersonaRequest": { + "description": "Request to link an in-game account with a PGS principal (encoded in the session id).", + "id": "LinkPersonaRequest", + "properties": { + "cardinalityConstraint": { + "description": "Required. Cardinality constraint to observe when linking a persona to a player in the scope of a game.", + "enum": [ + "ONE_PERSONA_TO_ONE_PLAYER" + ], + "enumDescriptions": [ + "1:1 cardinality between in-game personas and Play Games Services players. By the end of the linking operation only one entry for the player and the persona should remain in the scope of the application. Whether a new link is created or not when this constraint is specified is determined by the chosen `ConflictingLinksResolutionPolicy`: * If `KEEP_EXISTING_LINKS` is specified and the provided persona is already linked to a different player, or the player is already linked to a different persona, no new link will be created and the already existing link(s) will remain as is(are). * If `CREATE_NEW_LINK` is specified and the provided persona is already linked to a different player, or the player is already linked to another persona, the older link(s) will be removed in favour of the new link being created." + ], + "type": "string" + }, + "conflictingLinksResolutionPolicy": { + "description": "Required. Resolution policy to apply when the linking of a persona to a player would result in violating the specified cardinality constraint.", + "enum": [ + "KEEP_EXISTING_LINKS", + "CREATE_NEW_LINK" + ], + "enumDescriptions": [ + "If link(s) between a player and persona already exists which would result in violating the specified `RecallTokensCardinalityConstraint` if the new link was created, keep the already existing link(s). For example, if Persona1-Player1 is already linked in the scope of application1 and a new link Persona1-Player2 is attempted to be created in the scope of application1, then the old link will remain and no new link will be added. Note that if the already existing links do violate the specified policy (which could occur if not all `LinkPersona` calls use the same `RecallTokensCardinalityConstraint`) this policy will leave these violations unresolved; in order to resolve conflicts, the {@link `CREATE_NEW_LINK` policy needs to be used to rewrite links resolving conflicts.", + "If an existing link between a player and persona already exists which would result in violating the specified `RecallTokensCardinalityConstraint` if the new link was created, replace the already existing link(s) with the new link. For example, if Persona1-Player1 is already linked in the scope of application1 and a new link Persona1-Player2 is attempted to be created in the scope of application1, then the old link will be removed and the new link will be added to replace it." + ], + "type": "string" + }, + "expireTime": { + "description": "Input only. Optional expiration time.", + "format": "google-datetime", + "type": "string" + }, + "persona": { + "description": "Required. Stable identifier of the in-game account. Please refrain from re-using the same persona for different games.", + "type": "string" + }, + "sessionId": { + "description": "Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application.", + "type": "string" + }, + "token": { + "description": "Required. Value of the token to create. Opaque to Play Games and assumed to be non-stable (encrypted with key rotation).", + "type": "string" + }, + "ttl": { + "description": "Input only. Optional time-to-live.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "LinkPersonaResponse": { + "description": "Outcome of a persona linking attempt.", + "id": "LinkPersonaResponse", + "properties": { + "state": { + "description": "Output only. State of a persona linking attempt.", + "enum": [ + "LINK_CREATED", + "PERSONA_OR_PLAYER_ALREADY_LINKED" + ], + "enumDescriptions": [ + "The link specified in the request was created.", + "The link specified in the request was not created because already existing links would result in the new link violating the specified `RecallTokensCardinalityConstraint` if created." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "MetagameConfig": { "description": "The metagame config resource", "id": "MetagameConfig", @@ -2510,12 +2621,10 @@ "friendStatus": { "description": "The friend status of the given player, relative to the requester. This is unset if the player is not sharing their friends list with the game.", "enum": [ - "FRIEND_STATUS_UNSPECIFIED", "NO_RELATIONSHIP", "FRIEND" ], "enumDescriptions": [ - "Default value. This value is unused.", "There is no relationship between the players.", "The player and requester are friends." ], @@ -2569,13 +2678,11 @@ "achievementState": { "description": "The state of the achievement.", "enum": [ - "STATE_UNSPECIFIED", "HIDDEN", "REVEALED", "UNLOCKED" ], "enumDescriptions": [ - "Default value. This value is unused.", "Achievement is hidden.", "Achievement is revealed.", "Achievement is unlocked." @@ -2753,13 +2860,11 @@ "timeSpan": { "description": "The time span of this score.", "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "The score is an all-time score.", "The score is a weekly score.", "The score is a daily score." @@ -2872,13 +2977,11 @@ "timeSpan": { "description": "The time span for this player score.", "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "The score is an all-time score.", "The score is a weekly score.", "The score is a daily score." @@ -2914,13 +3017,11 @@ "description": "The time spans where the submitted score is better than the existing score for that time span.", "items": { "enum": [ - "SCORE_TIME_SPAN_UNSPECIFIED", "ALL_TIME", "WEEKLY", "DAILY" ], "enumDescriptions": [ - "Default value. This value is unused.", "The score is an all-time score.", "The score is a weekly score.", "The score is a daily score." @@ -2979,13 +3080,11 @@ "properties": { "friendsListVisibility": { "enum": [ - "FRIENDS_LIST_VISIBILITY_UNSPECIFIED", "VISIBLE", "REQUEST_REQUIRED", "UNAVAILABLE" ], "enumDescriptions": [ - "Unused.", "The friends list is currently visible to the game.", "The developer does not have access to the friends list, but can call the Android API to show a consent dialog.", "The friends list is currently unavailable for this user, and it is not possible to request access at this time, either because the user has permanently declined or the friends feature is not available to them. In this state, any attempts to request access to the friends list will be unsuccessful." @@ -3003,6 +3102,62 @@ }, "type": "object" }, + "RecallToken": { + "description": "Recall token data returned from RetrievePlayerTokens RPC", + "id": "RecallToken", + "properties": { + "expireTime": { + "description": "Optional. Optional expiration time of the token", + "format": "google-datetime", + "type": "string" + }, + "multiPlayerPersona": { + "description": "Required. Whether the persona identified by the token is linked to multiple PGS Players", + "type": "boolean" + }, + "token": { + "description": "Required. Value of the Recall token as it is provided by the client via LinkPersona RPC", + "type": "string" + } + }, + "type": "object" + }, + "ResetPersonaRequest": { + "description": "Request to remove all Recall tokens associated with a persona for an app.", + "id": "ResetPersonaRequest", + "properties": { + "persona": { + "description": "Value of the 'persona' field as it was provided by the client in LinkPersona RPC", + "type": "string" + } + }, + "type": "object" + }, + "ResetPersonaResponse": { + "description": "Response for the ResetPersona RPC", + "id": "ResetPersonaResponse", + "properties": { + "unlinked": { + "description": "Required. Whether any tokens were unlinked as a result of this request.", + "type": "boolean" + } + }, + "type": "object" + }, + "RetrievePlayerTokensResponse": { + "description": "Response for the RetrievePlayerTokens RPC", + "id": "RetrievePlayerTokensResponse", + "properties": { + "tokens": { + "description": "Required. Recall tokens associated with the requested PGS Player principal", + "items": { + "$ref": "RecallToken" + }, + "type": "array" + } + }, + "type": "object" + }, "RevisionCheckResponse": { "description": "A third party checking a revision response.", "id": "RevisionCheckResponse", @@ -3018,13 +3173,11 @@ "revisionStatus": { "description": "The result of the revision check.", "enum": [ - "REVISION_STATUS_UNSPECIFIED", "OK", "DEPRECATED", "INVALID" ], "enumDescriptions": [ - "Default value. This value is unused.", "The revision being used is current.", "There is currently a newer version available, but the revision being used still works.", "The revision being used is not supported in any released version." @@ -3123,11 +3276,9 @@ "type": { "description": "The type of this snapshot.", "enum": [ - "SNAPSHOT_TYPE_UNSPECIFIED", "SAVE_GAME" ], "enumDescriptions": [ - "Default value. This value is unused.", "A snapshot representing a save game." ], "type": "string" @@ -3250,6 +3401,36 @@ } }, "type": "object" + }, + "UnlinkPersonaRequest": { + "description": "Request to remove a Recall token linking PGS principal and an in-game account", + "id": "UnlinkPersonaRequest", + "properties": { + "persona": { + "description": "Value of the 'persona' field as it was provided by the client in LinkPersona RPC", + "type": "string" + }, + "sessionId": { + "description": "Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application.", + "type": "string" + }, + "token": { + "description": "Value of the Recall token as it was provided by the client in LinkPersona RPC", + "type": "string" + } + }, + "type": "object" + }, + "UnlinkPersonaResponse": { + "description": "Response for the UnlinkPersona RPC", + "id": "UnlinkPersonaResponse", + "properties": { + "unlinked": { + "description": "Required. Whether a Recall token specified by the request was deleted. Can be 'false' when there were no Recall tokens satisfied the criteria from the request.", + "type": "boolean" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/games/v1/games-gen.go b/games/v1/games-gen.go index 8704f4dbad3..eca5b08d078 100644 --- a/games/v1/games-gen.go +++ b/games/v1/games-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/games/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // gamesService, err := games.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // gamesService, err := games.NewService(ctx, option.WithScopes(games.GamesScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gamesService, err := games.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gamesService, err := games.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package games // import "google.golang.org/api/games/v1" import ( @@ -85,6 +99,9 @@ const mtlsBasePath = "https://games.mtls.googleapis.com/" // OAuth2 scopes used by this API. const ( + // View and manage your Google Play Developer account + AndroidpublisherScope = "https://www.googleapis.com/auth/androidpublisher" + // See, create, and delete its own configuration data in your Google // Drive DriveAppdataScope = "https://www.googleapis.com/auth/drive.appdata" @@ -96,6 +113,7 @@ const ( // NewService creates a new Service. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/androidpublisher", "https://www.googleapis.com/auth/drive.appdata", "https://www.googleapis.com/auth/games", ) @@ -134,6 +152,7 @@ func New(client *http.Client) (*Service, error) { s.Leaderboards = NewLeaderboardsService(s) s.Metagame = NewMetagameService(s) s.Players = NewPlayersService(s) + s.Recall = NewRecallService(s) s.Revisions = NewRevisionsService(s) s.Scores = NewScoresService(s) s.Snapshots = NewSnapshotsService(s) @@ -160,6 +179,8 @@ type Service struct { Players *PlayersService + Recall *RecallService + Revisions *RevisionsService Scores *ScoresService @@ -239,6 +260,15 @@ type PlayersService struct { s *Service } +func NewRecallService(s *Service) *RecallService { + rs := &RecallService{s: s} + return rs +} + +type RecallService struct { + s *Service +} + func NewRevisionsService(s *Service) *RevisionsService { rs := &RevisionsService{s: s} return rs @@ -280,7 +310,6 @@ type AchievementDefinition struct { // AchievementType: The type of the achievement. // // Possible values: - // "ACHIEVEMENT_TYPE_UNSPECIFIED" - Safe default, don't use. // "STANDARD" - Achievement is either locked or unlocked. // "INCREMENTAL" - Achievement is incremental. AchievementType string `json:"achievementType,omitempty"` @@ -302,7 +331,6 @@ type AchievementDefinition struct { // InitialState: The initial state of the achievement. // // Possible values: - // "INITIAL_ACHIEVEMENT_STATE_UNSPECIFIED" - Safe default, don't use. // "HIDDEN" - Achievement is hidden. // "REVEALED" - Achievement is revealed. // "UNLOCKED" - Achievement is unlocked. @@ -444,7 +472,6 @@ type AchievementRevealResponse struct { // already unlocked. // // Possible values: - // "REVEAL_ACHIEVEMENT_STATE_UNSPECIFIED" - Safe default, don't use. // "REVEALED" - Achievement is revealed. // "UNLOCKED" - Achievement is unlocked. CurrentState string `json:"currentState,omitempty"` @@ -650,7 +677,6 @@ type AchievementUpdateRequest struct { // UpdateType: The type of update being applied. // // Possible values: - // "ACHIEVEMENT_UPDATE_TYPE_UNSPECIFIED" - Safe default, don't use. // "REVEAL" - Achievement is revealed. // "UNLOCK" - Achievement is unlocked. // "INCREMENT" - Achievement is incremented. @@ -689,7 +715,6 @@ type AchievementUpdateResponse struct { // CurrentState: The current state of the achievement. // // Possible values: - // "UPDATED_ACHIEVEMENT_STATE_UNSPECIFIED" - Safe default, don't use. // "HIDDEN" - Achievement is hidden. // "REVEALED" - Achievement is revealed. // "UNLOCKED" - Achievement is unlocked. @@ -757,7 +782,6 @@ type Application struct { // application. // // Possible values: - // "APPLICATION_FEATURE_UNSPECIFIED" - Safe default, don't use. // "SNAPSHOTS" - Saved Games (snapshots). EnabledFeatures []string `json:"enabledFeatures,omitempty"` @@ -1038,8 +1062,6 @@ type EventBatchRecordFailure struct { // FailureCause: The cause for the update failure. // // Possible values: - // "EVENT_FAILURE_CAUSE_UNSPECIFIED" - Default value. Should not be - // used. // "TOO_LARGE" - A batch request was issued with more events than are // allowed in a single batch. // "TIME_PERIOD_EXPIRED" - A batch was sent with data too far in the @@ -1145,7 +1167,6 @@ type EventDefinition struct { // Visibility: The visibility of event being tracked in this definition. // // Possible values: - // "EVENT_VISIBILITY_UNSPECIFIED" - Default value. Should not be used. // "REVEALED" - This event should be visible to all users. // "HIDDEN" - This event should only be shown to users that have // recorded this event at least once. @@ -1293,8 +1314,6 @@ type EventRecordFailure struct { // FailureCause: The cause for the update failure. // // Possible values: - // "EVENT_UPDATE_FAILURE_CAUSE_UNSPECIFIED" - Default value. Should - // not use. // "NOT_FOUND" - An attempt was made to set an event that was not // defined. // "INVALID_UPDATE_VALUE" - An attempt was made to increment an event @@ -1617,7 +1636,6 @@ type Instance struct { // PlatformType: The platform type. // // Possible values: - // "PLATFORM_TYPE_UNSPECIFIED" - Default value. Should be unused. // "ANDROID" - Instance is for Android. // "IOS" - Instance is for iOS. // "WEB_APP" - Instance is for Web App. @@ -1807,7 +1825,6 @@ type Leaderboard struct { // Order: How scores are ordered. // // Possible values: - // "SCORE_ORDER_UNSPECIFIED" - Default value. This value is unused. // "LARGER_IS_BETTER" - Larger values are better; scores are sorted in // descending order // "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted @@ -1872,8 +1889,6 @@ type LeaderboardEntry struct { // TimeSpan: The time span of this high score. // // Possible values: - // "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is - // unused. // "ALL_TIME" - The score is an all-time score. // "WEEKLY" - The score is a weekly score. // "DAILY" - The score is a daily score. @@ -2041,6 +2056,139 @@ func (s *LeaderboardScores) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// LinkPersonaRequest: Request to link an in-game account with a PGS +// principal (encoded in the session id). +type LinkPersonaRequest struct { + // CardinalityConstraint: Required. Cardinality constraint to observe + // when linking a persona to a player in the scope of a game. + // + // Possible values: + // "ONE_PERSONA_TO_ONE_PLAYER" - 1:1 cardinality between in-game + // personas and Play Games Services players. By the end of the linking + // operation only one entry for the player and the persona should remain + // in the scope of the application. Whether a new link is created or not + // when this constraint is specified is determined by the chosen + // `ConflictingLinksResolutionPolicy`: * If `KEEP_EXISTING_LINKS` is + // specified and the provided persona is already linked to a different + // player, or the player is already linked to a different persona, no + // new link will be created and the already existing link(s) will remain + // as is(are). * If `CREATE_NEW_LINK` is specified and the provided + // persona is already linked to a different player, or the player is + // already linked to another persona, the older link(s) will be removed + // in favour of the new link being created. + CardinalityConstraint string `json:"cardinalityConstraint,omitempty"` + + // ConflictingLinksResolutionPolicy: Required. Resolution policy to + // apply when the linking of a persona to a player would result in + // violating the specified cardinality constraint. + // + // Possible values: + // "KEEP_EXISTING_LINKS" - If link(s) between a player and persona + // already exists which would result in violating the specified + // `RecallTokensCardinalityConstraint` if the new link was created, keep + // the already existing link(s). For example, if Persona1-Player1 is + // already linked in the scope of application1 and a new link + // Persona1-Player2 is attempted to be created in the scope of + // application1, then the old link will remain and no new link will be + // added. Note that if the already existing links do violate the + // specified policy (which could occur if not all `LinkPersona` calls + // use the same `RecallTokensCardinalityConstraint`) this policy will + // leave these violations unresolved; in order to resolve conflicts, the + // {@link `CREATE_NEW_LINK` policy needs to be used to rewrite links + // resolving conflicts. + // "CREATE_NEW_LINK" - If an existing link between a player and + // persona already exists which would result in violating the specified + // `RecallTokensCardinalityConstraint` if the new link was created, + // replace the already existing link(s) with the new link. For example, + // if Persona1-Player1 is already linked in the scope of application1 + // and a new link Persona1-Player2 is attempted to be created in the + // scope of application1, then the old link will be removed and the new + // link will be added to replace it. + ConflictingLinksResolutionPolicy string `json:"conflictingLinksResolutionPolicy,omitempty"` + + // ExpireTime: Input only. Optional expiration time. + ExpireTime string `json:"expireTime,omitempty"` + + // Persona: Required. Stable identifier of the in-game account. Please + // refrain from re-using the same persona for different games. + Persona string `json:"persona,omitempty"` + + // SessionId: Required. Opaque server-generated string that encodes all + // the necessary information to identify the PGS player / Google user + // and application. + SessionId string `json:"sessionId,omitempty"` + + // Token: Required. Value of the token to create. Opaque to Play Games + // and assumed to be non-stable (encrypted with key rotation). + Token string `json:"token,omitempty"` + + // Ttl: Input only. Optional time-to-live. + Ttl string `json:"ttl,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CardinalityConstraint") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CardinalityConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LinkPersonaRequest) MarshalJSON() ([]byte, error) { + type NoMethod LinkPersonaRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LinkPersonaResponse: Outcome of a persona linking attempt. +type LinkPersonaResponse struct { + // State: Output only. State of a persona linking attempt. + // + // Possible values: + // "LINK_CREATED" - The link specified in the request was created. + // "PERSONA_OR_PLAYER_ALREADY_LINKED" - The link specified in the + // request was not created because already existing links would result + // in the new link violating the specified + // `RecallTokensCardinalityConstraint` if created. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "State") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LinkPersonaResponse) MarshalJSON() ([]byte, error) { + type NoMethod LinkPersonaResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MetagameConfig: The metagame config resource type MetagameConfig struct { // CurrentVersion: Current version of the metagame configuration data. @@ -2108,7 +2256,6 @@ type Player struct { // list with the game. // // Possible values: - // "FRIEND_STATUS_UNSPECIFIED" - Default value. This value is unused. // "NO_RELATIONSHIP" - There is no relationship between the players. // "FRIEND" - The player and requester are friends. FriendStatus string `json:"friendStatus,omitempty"` @@ -2207,7 +2354,6 @@ type PlayerAchievement struct { // AchievementState: The state of the achievement. // // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. // "HIDDEN" - Achievement is hidden. // "REVEALED" - Achievement is revealed. // "UNLOCKED" - Achievement is unlocked. @@ -2463,8 +2609,6 @@ type PlayerLeaderboardScore struct { // TimeSpan: The time span of this score. // // Possible values: - // "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is - // unused. // "ALL_TIME" - The score is an all-time score. // "WEEKLY" - The score is a weekly score. // "DAILY" - The score is a daily score. @@ -2637,8 +2781,6 @@ type PlayerScore struct { // TimeSpan: The time span for this player score. // // Possible values: - // "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is - // unused. // "ALL_TIME" - The score is an all-time score. // "WEEKLY" - The score is a weekly score. // "DAILY" - The score is a daily score. @@ -2710,8 +2852,6 @@ type PlayerScoreResponse struct { // better than the existing score for that time span. // // Possible values: - // "SCORE_TIME_SPAN_UNSPECIFIED" - Default value. This value is - // unused. // "ALL_TIME" - The score is an all-time score. // "WEEKLY" - The score is a weekly score. // "DAILY" - The score is a daily score. @@ -2802,7 +2942,6 @@ func (s *PlayerScoreSubmissionList) MarshalJSON() ([]byte, error) { // ProfileSettings: Profile settings type ProfileSettings struct { // Possible values: - // "FRIENDS_LIST_VISIBILITY_UNSPECIFIED" - Unused. // "VISIBLE" - The friends list is currently visible to the game. // "REQUEST_REQUIRED" - The developer does not have access to the // friends list, but can call the Android API to show a consent dialog. @@ -2846,6 +2985,139 @@ func (s *ProfileSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RecallToken: Recall token data returned from RetrievePlayerTokens RPC +type RecallToken struct { + // ExpireTime: Optional. Optional expiration time of the token + ExpireTime string `json:"expireTime,omitempty"` + + // MultiPlayerPersona: Required. Whether the persona identified by the + // token is linked to multiple PGS Players + MultiPlayerPersona bool `json:"multiPlayerPersona,omitempty"` + + // Token: Required. Value of the Recall token as it is provided by the + // client via LinkPersona RPC + Token string `json:"token,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpireTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpireTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RecallToken) MarshalJSON() ([]byte, error) { + type NoMethod RecallToken + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResetPersonaRequest: Request to remove all Recall tokens associated +// with a persona for an app. +type ResetPersonaRequest struct { + // Persona: Value of the 'persona' field as it was provided by the + // client in LinkPersona RPC + Persona string `json:"persona,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Persona") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Persona") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResetPersonaRequest) MarshalJSON() ([]byte, error) { + type NoMethod ResetPersonaRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ResetPersonaResponse: Response for the ResetPersona RPC +type ResetPersonaResponse struct { + // Unlinked: Required. Whether any tokens were unlinked as a result of + // this request. + Unlinked bool `json:"unlinked,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Unlinked") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Unlinked") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResetPersonaResponse) MarshalJSON() ([]byte, error) { + type NoMethod ResetPersonaResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RetrievePlayerTokensResponse: Response for the RetrievePlayerTokens +// RPC +type RetrievePlayerTokensResponse struct { + // Tokens: Required. Recall tokens associated with the requested PGS + // Player principal + Tokens []*RecallToken `json:"tokens,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Tokens") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Tokens") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RetrievePlayerTokensResponse) MarshalJSON() ([]byte, error) { + type NoMethod RetrievePlayerTokensResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RevisionCheckResponse: A third party checking a revision response. type RevisionCheckResponse struct { // ApiVersion: The version of the API this client revision should use @@ -2859,8 +3131,6 @@ type RevisionCheckResponse struct { // RevisionStatus: The result of the revision check. // // Possible values: - // "REVISION_STATUS_UNSPECIFIED" - Default value. This value is - // unused. // "OK" - The revision being used is current. // "DEPRECATED" - There is currently a newer version available, but // the revision being used still works. @@ -3019,7 +3289,6 @@ type Snapshot struct { // Type: The type of this snapshot. // // Possible values: - // "SNAPSHOT_TYPE_UNSPECIFIED" - Default value. This value is unused. // "SAVE_GAME" - A snapshot representing a save game. Type string `json:"type,omitempty"` @@ -3249,6 +3518,79 @@ func (s *StatsResponse) UnmarshalJSON(data []byte) error { return nil } +// UnlinkPersonaRequest: Request to remove a Recall token linking PGS +// principal and an in-game account +type UnlinkPersonaRequest struct { + // Persona: Value of the 'persona' field as it was provided by the + // client in LinkPersona RPC + Persona string `json:"persona,omitempty"` + + // SessionId: Required. Opaque server-generated string that encodes all + // the necessary information to identify the PGS player / Google user + // and application. + SessionId string `json:"sessionId,omitempty"` + + // Token: Value of the Recall token as it was provided by the client in + // LinkPersona RPC + Token string `json:"token,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Persona") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Persona") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UnlinkPersonaRequest) MarshalJSON() ([]byte, error) { + type NoMethod UnlinkPersonaRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// UnlinkPersonaResponse: Response for the UnlinkPersona RPC +type UnlinkPersonaResponse struct { + // Unlinked: Required. Whether a Recall token specified by the request + // was deleted. Can be 'false' when there were no Recall tokens + // satisfied the criteria from the request. + Unlinked bool `json:"unlinked,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Unlinked") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Unlinked") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UnlinkPersonaResponse) MarshalJSON() ([]byte, error) { + type NoMethod UnlinkPersonaResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "games.achievementDefinitions.list": type AchievementDefinitionsListCall struct { @@ -3579,7 +3921,7 @@ func (c *AchievementsIncrementCall) Do(opts ...googleapi.CallOption) (*Achieveme // "type": "string" // }, // "stepsToIncrement": { - // "description": "The number of steps to increment.", + // "description": "Required. The number of steps to increment.", // "format": "int32", // "location": "query", // "required": true, @@ -4095,7 +4437,7 @@ func (c *AchievementsSetStepsAtLeastCall) Do(opts ...googleapi.CallOption) (*Ach // "type": "string" // }, // "steps": { - // "description": "The minimum value to set the steps to.", + // "description": "Required. The minimum value to set the steps to.", // "format": "int32", // "location": "query", // "required": true, @@ -4408,7 +4750,6 @@ func (c *ApplicationsGetCall) Language(language string) *ApplicationsGetCall { // // Possible values: // -// "PLATFORM_TYPE_UNSPECIFIED" - Default value, don't use. // "ANDROID" - Retrieve applications that can be played on Android. // "IOS" - Retrieve applications that can be played on iOS. // "WEB_APP" - Retrieve applications that can be played on desktop @@ -4540,13 +4881,11 @@ func (c *ApplicationsGetCall) Do(opts ...googleapi.CallOption) (*Application, er // "platformType": { // "description": "Restrict application details returned to the specific platform.", // "enum": [ - // "PLATFORM_TYPE_UNSPECIFIED", // "ANDROID", // "IOS", // "WEB_APP" // ], // "enumDescriptions": [ - // "Default value, don't use.", // "Retrieve applications that can be played on Android.", // "Retrieve applications that can be played on iOS.", // "Retrieve applications that can be played on desktop web." @@ -4593,7 +4932,6 @@ func (c *ApplicationsGetEndPointCall) ApplicationId(applicationId string) *Appli // // Possible values: // -// "END_POINT_TYPE_UNSPECIFIED" - Default value. This value is unused. // "PROFILE_CREATION" - Request a URL to create a new profile. // "PROFILE_SETTINGS" - Request a URL for the Settings view. func (c *ApplicationsGetEndPointCall) EndPointType(endPointType string) *ApplicationsGetEndPointCall { @@ -4698,12 +5036,10 @@ func (c *ApplicationsGetEndPointCall) Do(opts ...googleapi.CallOption) (*EndPoin // "endPointType": { // "description": "Type of endpoint being requested.", // "enum": [ - // "END_POINT_TYPE_UNSPECIFIED", // "PROFILE_CREATION", // "PROFILE_SETTINGS" // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "Request a URL to create a new profile.", // "Request a URL for the Settings view." // ], @@ -6117,11 +6453,9 @@ func (c *MetagameListCategoriesByPlayerCall) Do(opts ...googleapi.CallOption) (* // "collection": { // "description": "The collection of categories for which data will be returned.", // "enum": [ - // "COLLECTION_UNSPECIFIED", // "ALL" // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "Retrieve data for all categories. This is the default." // ], // "location": "path", @@ -6857,80 +7191,67 @@ func (c *PlayersListCall) Pages(ctx context.Context, f func(*PlayerListResponse) } } -// method id "games.revisions.check": +// method id "games.recall.linkPersona": -type RevisionsCheckCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RecallLinkPersonaCall struct { + s *Service + linkpersonarequest *LinkPersonaRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Check: Checks whether the games client is out of date. -// -// - clientRevision: The revision of the client SDK used by your -// application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible -// values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the -// Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - -// Client is running as a Web App. -func (r *RevisionsService) Check(clientRevision string) *RevisionsCheckCall { - c := &RevisionsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.urlParams_.Set("clientRevision", clientRevision) +// LinkPersona: Associate the PGS Player principal encoded in the +// provided recall session id with an in-game account +func (r *RecallService) LinkPersona(linkpersonarequest *LinkPersonaRequest) *RecallLinkPersonaCall { + c := &RecallLinkPersonaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.linkpersonarequest = linkpersonarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *RevisionsCheckCall) Fields(s ...googleapi.Field) *RevisionsCheckCall { +func (c *RecallLinkPersonaCall) Fields(s ...googleapi.Field) *RecallLinkPersonaCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *RevisionsCheckCall) IfNoneMatch(entityTag string) *RevisionsCheckCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *RevisionsCheckCall) Context(ctx context.Context) *RevisionsCheckCall { +func (c *RecallLinkPersonaCall) Context(ctx context.Context) *RecallLinkPersonaCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *RevisionsCheckCall) Header() http.Header { +func (c *RecallLinkPersonaCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) { +func (c *RecallLinkPersonaCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.linkpersonarequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/revisions/check") + urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall:linkPersona") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -6938,14 +7259,14 @@ func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "games.revisions.check" call. -// Exactly one of *RevisionCheckResponse or error will be non-nil. Any +// Do executes the "games.recall.linkPersona" call. +// Exactly one of *LinkPersonaResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *RevisionCheckResponse.ServerResponse.Header or (if a response was +// *LinkPersonaResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckResponse, error) { +func (c *RecallLinkPersonaCall) Do(opts ...googleapi.CallOption) (*LinkPersonaResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6964,7 +7285,7 @@ func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckRes if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RevisionCheckResponse{ + ret := &LinkPersonaResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6976,16 +7297,557 @@ func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckRes } return ret, nil // { - // "description": "Checks whether the games client is out of date.", - // "flatPath": "games/v1/revisions/check", - // "httpMethod": "GET", - // "id": "games.revisions.check", - // "parameterOrder": [ + // "description": "Associate the PGS Player principal encoded in the provided recall session id with an in-game account", + // "flatPath": "games/v1/recall:linkPersona", + // "httpMethod": "POST", + // "id": "games.recall.linkPersona", + // "parameterOrder": [], + // "parameters": {}, + // "path": "games/v1/recall:linkPersona", + // "request": { + // "$ref": "LinkPersonaRequest" + // }, + // "response": { + // "$ref": "LinkPersonaResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// method id "games.recall.resetPersona": + +type RecallResetPersonaCall struct { + s *Service + resetpersonarequest *ResetPersonaRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResetPersona: Delete all Recall tokens linking the given persona to +// any player (with or without a profile). +func (r *RecallService) ResetPersona(resetpersonarequest *ResetPersonaRequest) *RecallResetPersonaCall { + c := &RecallResetPersonaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resetpersonarequest = resetpersonarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RecallResetPersonaCall) Fields(s ...googleapi.Field) *RecallResetPersonaCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RecallResetPersonaCall) Context(ctx context.Context) *RecallResetPersonaCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RecallResetPersonaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RecallResetPersonaCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetpersonarequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall:resetPersona") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "games.recall.resetPersona" call. +// Exactly one of *ResetPersonaResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ResetPersonaResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RecallResetPersonaCall) Do(opts ...googleapi.CallOption) (*ResetPersonaResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ResetPersonaResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete all Recall tokens linking the given persona to any player (with or without a profile).", + // "flatPath": "games/v1/recall:resetPersona", + // "httpMethod": "POST", + // "id": "games.recall.resetPersona", + // "parameterOrder": [], + // "parameters": {}, + // "path": "games/v1/recall:resetPersona", + // "request": { + // "$ref": "ResetPersonaRequest" + // }, + // "response": { + // "$ref": "ResetPersonaResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// method id "games.recall.retrieveTokens": + +type RecallRetrieveTokensCall struct { + s *Service + sessionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// RetrieveTokens: Retrieve all Recall tokens associated with the PGS +// Player principal encoded in the provided recall session id. The API +// is only available for users that have active PGS Player profile. +// +// - sessionId: Opaque server-generated string that encodes all the +// necessary information to identify the PGS player / Google user and +// application. +func (r *RecallService) RetrieveTokens(sessionId string) *RecallRetrieveTokensCall { + c := &RecallRetrieveTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sessionId = sessionId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RecallRetrieveTokensCall) Fields(s ...googleapi.Field) *RecallRetrieveTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RecallRetrieveTokensCall) IfNoneMatch(entityTag string) *RecallRetrieveTokensCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RecallRetrieveTokensCall) Context(ctx context.Context) *RecallRetrieveTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RecallRetrieveTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RecallRetrieveTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall/tokens/{sessionId}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sessionId": c.sessionId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "games.recall.retrieveTokens" call. +// Exactly one of *RetrievePlayerTokensResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *RetrievePlayerTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RecallRetrieveTokensCall) Do(opts ...googleapi.CallOption) (*RetrievePlayerTokensResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RetrievePlayerTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieve all Recall tokens associated with the PGS Player principal encoded in the provided recall session id. The API is only available for users that have active PGS Player profile.", + // "flatPath": "games/v1/recall/tokens/{sessionId}", + // "httpMethod": "GET", + // "id": "games.recall.retrieveTokens", + // "parameterOrder": [ + // "sessionId" + // ], + // "parameters": { + // "sessionId": { + // "description": "Required. Opaque server-generated string that encodes all the necessary information to identify the PGS player / Google user and application.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "games/v1/recall/tokens/{sessionId}", + // "response": { + // "$ref": "RetrievePlayerTokensResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// method id "games.recall.unlinkPersona": + +type RecallUnlinkPersonaCall struct { + s *Service + unlinkpersonarequest *UnlinkPersonaRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UnlinkPersona: Delete a Recall token linking the PGS Player principal +// identified by the Recall session and an in-game account identified +// either by the 'persona' or by the token value. +func (r *RecallService) UnlinkPersona(unlinkpersonarequest *UnlinkPersonaRequest) *RecallUnlinkPersonaCall { + c := &RecallUnlinkPersonaCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.unlinkpersonarequest = unlinkpersonarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RecallUnlinkPersonaCall) Fields(s ...googleapi.Field) *RecallUnlinkPersonaCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RecallUnlinkPersonaCall) Context(ctx context.Context) *RecallUnlinkPersonaCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RecallUnlinkPersonaCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RecallUnlinkPersonaCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.unlinkpersonarequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/recall:unlinkPersona") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "games.recall.unlinkPersona" call. +// Exactly one of *UnlinkPersonaResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *UnlinkPersonaResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RecallUnlinkPersonaCall) Do(opts ...googleapi.CallOption) (*UnlinkPersonaResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &UnlinkPersonaResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Delete a Recall token linking the PGS Player principal identified by the Recall session and an in-game account identified either by the 'persona' or by the token value.", + // "flatPath": "games/v1/recall:unlinkPersona", + // "httpMethod": "POST", + // "id": "games.recall.unlinkPersona", + // "parameterOrder": [], + // "parameters": {}, + // "path": "games/v1/recall:unlinkPersona", + // "request": { + // "$ref": "UnlinkPersonaRequest" + // }, + // "response": { + // "$ref": "UnlinkPersonaResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/androidpublisher" + // ] + // } + +} + +// method id "games.revisions.check": + +type RevisionsCheckCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Check: Checks whether the games client is out of date. +// +// - clientRevision: The revision of the client SDK used by your +// application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible +// values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the +// Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - +// Client is running as a Web App. +func (r *RevisionsService) Check(clientRevision string) *RevisionsCheckCall { + c := &RevisionsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.urlParams_.Set("clientRevision", clientRevision) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RevisionsCheckCall) Fields(s ...googleapi.Field) *RevisionsCheckCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RevisionsCheckCall) IfNoneMatch(entityTag string) *RevisionsCheckCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RevisionsCheckCall) Context(ctx context.Context) *RevisionsCheckCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RevisionsCheckCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1/revisions/check") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "games.revisions.check" call. +// Exactly one of *RevisionCheckResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *RevisionCheckResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RevisionsCheckCall) Do(opts ...googleapi.CallOption) (*RevisionCheckResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &RevisionCheckResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Checks whether the games client is out of date.", + // "flatPath": "games/v1/revisions/check", + // "httpMethod": "GET", + // "id": "games.revisions.check", + // "parameterOrder": [ // "clientRevision" // ], // "parameters": { // "clientRevision": { - // "description": "The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App.", + // "description": "Required. The revision of the client SDK used by your application. Format: `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: * `ANDROID` - Client is running the Android SDK. * `IOS` - Client is running the iOS SDK. * `WEB_APP` - Client is running as a Web App.", // "location": "query", // "required": true, // "type": "string" @@ -7041,7 +7903,6 @@ func (r *ScoresService) Get(playerId string, leaderboardId string, timeSpan stri // // Possible values: // -// "INCLUDE_RANK_TYPE_UNSPECIFIED" - Default value. Should be unused. // "ALL" - Retrieve all supported ranks. In HTTP, this parameter value // // can also be specified as `ALL`. @@ -7195,7 +8056,6 @@ func (c *ScoresGetCall) Do(opts ...googleapi.CallOption) (*PlayerLeaderboardScor // "includeRankType": { // "description": "The types of ranks to return. If the parameter is omitted, no ranks will be returned.", // "enum": [ - // "INCLUDE_RANK_TYPE_UNSPECIFIED", // "ALL", // "PUBLIC", // "SOCIAL", @@ -7204,12 +8064,10 @@ func (c *ScoresGetCall) Do(opts ...googleapi.CallOption) (*PlayerLeaderboardScor // "enumDeprecated": [ // false, // false, - // false, // true, // false // ], // "enumDescriptions": [ - // "Default value. Should be unused.", // "Retrieve all supported ranks. In HTTP, this parameter value can also be specified as `ALL`.", // "Retrieve public ranks, if the player is sharing their gameplay activity publicly.", // "(Obsolete) Retrieve the social rank.", @@ -7249,14 +8107,12 @@ func (c *ScoresGetCall) Do(opts ...googleapi.CallOption) (*PlayerLeaderboardScor // "timeSpan": { // "description": "The time span for the scores and ranks you're requesting.", // "enum": [ - // "SCORE_TIME_SPAN_UNSPECIFIED", // "ALL", // "ALL_TIME", // "WEEKLY", // "DAILY" // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "Get the high scores for all time spans. If this is used, maxResults values will be ignored.", // "Get the all time high score.", // "List the top scores for the current day.", @@ -7460,19 +8316,16 @@ func (c *ScoresListCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, e // "collection": { // "description": "The collection of scores you're requesting.", // "enum": [ - // "SCORE_COLLECTION_UNSPECIFIED", // "PUBLIC", // "SOCIAL", // "FRIENDS" // ], // "enumDeprecated": [ // false, - // false, // true, // false // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "List all scores in the public leaderboard.", // "(Obsolete) Legacy G+ social scores.", // "List only scores of friends." @@ -7504,15 +8357,13 @@ func (c *ScoresListCall) Do(opts ...googleapi.CallOption) (*LeaderboardScores, e // "type": "string" // }, // "timeSpan": { - // "description": "The time span for the scores and ranks you're requesting.", + // "description": "Required. The time span for the scores and ranks you're requesting.", // "enum": [ - // "SCORE_TIME_SPAN_UNSPECIFIED", // "ALL_TIME", // "WEEKLY", // "DAILY" // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "The score is an all-time score.", // "The score is a weekly score.", // "The score is a daily score." @@ -7734,19 +8585,16 @@ func (c *ScoresListWindowCall) Do(opts ...googleapi.CallOption) (*LeaderboardSco // "collection": { // "description": "The collection of scores you're requesting.", // "enum": [ - // "SCORE_COLLECTION_UNSPECIFIED", // "PUBLIC", // "SOCIAL", // "FRIENDS" // ], // "enumDeprecated": [ // false, - // false, // true, // false // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "List all scores in the public leaderboard.", // "(Obsolete) Legacy G+ social scores.", // "List only scores of friends." @@ -7789,15 +8637,13 @@ func (c *ScoresListWindowCall) Do(opts ...googleapi.CallOption) (*LeaderboardSco // "type": "boolean" // }, // "timeSpan": { - // "description": "The time span for the scores and ranks you're requesting.", + // "description": "Required. The time span for the scores and ranks you're requesting.", // "enum": [ - // "SCORE_TIME_SPAN_UNSPECIFIED", // "ALL_TIME", // "WEEKLY", // "DAILY" // ], // "enumDescriptions": [ - // "Default value. This value is unused.", // "The score is an all-time score.", // "The score is a weekly score.", // "The score is a daily score." @@ -7989,7 +8835,7 @@ func (c *ScoresSubmitCall) Do(opts ...googleapi.CallOption) (*PlayerScoreRespons // "type": "string" // }, // "score": { - // "description": "The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.", + // "description": "Required. The score you're submitting. The submitted score is ignored if it is worse than a previously submitted score, where worse depends on the leaderboard sort order. The meaning of the score value depends on the leaderboard format type. For fixed-point, the score represents the raw value. For time, the score represents elapsed time in milliseconds. For currency, the score represents a value in micro units.", // "format": "int64", // "location": "query", // "required": true, diff --git a/gamesconfiguration/v1configuration/gamesconfiguration-gen.go b/gamesconfiguration/v1configuration/gamesconfiguration-gen.go index d28646fd4dd..6949dffd825 100644 --- a/gamesconfiguration/v1configuration/gamesconfiguration-gen.go +++ b/gamesconfiguration/v1configuration/gamesconfiguration-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/games/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gamesconfigurationService, err := gamesconfiguration.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gamesconfigurationService, err := gamesconfiguration.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gamesconfigurationService, err := gamesconfiguration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gamesconfiguration // import "google.golang.org/api/gamesconfiguration/v1configuration" import ( diff --git a/gamesmanagement/v1management/gamesmanagement-gen.go b/gamesmanagement/v1management/gamesmanagement-gen.go index d41d4065197..c8e806d8a01 100644 --- a/gamesmanagement/v1management/gamesmanagement-gen.go +++ b/gamesmanagement/v1management/gamesmanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/games/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gamesmanagementService, err := gamesmanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gamesmanagementService, err := gamesmanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gamesmanagementService, err := gamesmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gamesmanagement // import "google.golang.org/api/gamesmanagement/v1management" import ( diff --git a/gkebackup/v1/gkebackup-api.json b/gkebackup/v1/gkebackup-api.json index 010ca98efa8..1c0557d7e66 100644 --- a/gkebackup/v1/gkebackup-api.json +++ b/gkebackup/v1/gkebackup-api.json @@ -1688,7 +1688,7 @@ } } }, - "revision": "20230802", + "revision": "20230816", "rootUrl": "https://gkebackup.googleapis.com/", "schemas": { "AuditConfig": { @@ -2884,7 +2884,7 @@ "type": "integer" }, "backupRetainDays": { - "description": "Optional. The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value \u003e= 0 and \u003c= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (create_time + backup_retain_days). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backup_retain_days must be \u003e= backup_delete_lock_days. If cron_schedule is defined, then this must be \u003c= 360 * the creation interval. Default: 0 (no automatic deletion)", + "description": "Optional. The default maximum age of a Backup created via this BackupPlan. This field MUST be an integer value \u003e= 0 and \u003c= 365. If specified, a Backup created under this BackupPlan will be automatically deleted after its age reaches (create_time + backup_retain_days). If not specified, Backups created under this BackupPlan will NOT be subject to automatic deletion. Updating this field does NOT affect existing Backups under it. Backups created AFTER a successful update will automatically pick up the new value. NOTE: backup_retain_days must be \u003e= backup_delete_lock_days. If cron_schedule is defined, then this must be \u003c= 360 * the creation interval. If rpo_config is defined, then this must be \u003c= 360 * target_rpo_minutes / (1440minutes/day). Default: 0 (no automatic deletion)", "format": "int32", "type": "integer" }, diff --git a/gkebackup/v1/gkebackup-gen.go b/gkebackup/v1/gkebackup-gen.go index b6ea40f3724..f236945fde8 100644 --- a/gkebackup/v1/gkebackup-gen.go +++ b/gkebackup/v1/gkebackup-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkebackupService, err := gkebackup.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkebackupService, err := gkebackup.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkebackupService, err := gkebackup.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkebackup // import "google.golang.org/api/gkebackup/v1" import ( @@ -2146,7 +2159,9 @@ type RetentionPolicy struct { // AFTER a successful update will automatically pick up the new value. // NOTE: backup_retain_days must be >= backup_delete_lock_days. If // cron_schedule is defined, then this must be <= 360 * the creation - // interval. Default: 0 (no automatic deletion) + // interval. If rpo_config is defined, then this must be <= 360 * + // target_rpo_minutes / (1440minutes/day). Default: 0 (no automatic + // deletion) BackupRetainDays int64 `json:"backupRetainDays,omitempty"` // Locked: Optional. This flag denotes whether the retention policy of diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index c13467c8cf0..e18fa9aaeca 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkehubService, err := gkehub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkehub // import "google.golang.org/api/gkehub/v1" import ( diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 2bbafa4a681..6d48c6d8d24 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkehubService, err := gkehub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkehub // import "google.golang.org/api/gkehub/v1alpha" import ( diff --git a/gkehub/v1alpha2/gkehub-gen.go b/gkehub/v1alpha2/gkehub-gen.go index c144fa794c7..98af4ab3da4 100644 --- a/gkehub/v1alpha2/gkehub-gen.go +++ b/gkehub/v1alpha2/gkehub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkehubService, err := gkehub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkehub // import "google.golang.org/api/gkehub/v1alpha2" import ( diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 2ab6a679869..926649ef1e8 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkehubService, err := gkehub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkehub // import "google.golang.org/api/gkehub/v1beta" import ( diff --git a/gkehub/v1beta1/gkehub-gen.go b/gkehub/v1beta1/gkehub-gen.go index 8b64da74fc0..e1597c40e39 100644 --- a/gkehub/v1beta1/gkehub-gen.go +++ b/gkehub/v1beta1/gkehub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkehubService, err := gkehub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkehub // import "google.golang.org/api/gkehub/v1beta1" import ( diff --git a/gkehub/v2alpha/gkehub-gen.go b/gkehub/v2alpha/gkehub-gen.go index cc276ed7ef6..0066bd89bec 100644 --- a/gkehub/v2alpha/gkehub-gen.go +++ b/gkehub/v2alpha/gkehub-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkehubService, err := gkehub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkehub // import "google.golang.org/api/gkehub/v2alpha" import ( diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index 1182274062d..93b1aa2476d 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -2996,7 +2996,7 @@ } } }, - "revision": "20230724", + "revision": "20230815", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -3043,6 +3043,10 @@ "description": "The Anthos clusters on bare metal version for the bare metal admin cluster.", "type": "string" }, + "binaryAuthorization": { + "$ref": "BinaryAuthorization", + "description": "Binary Authorization related configurations." + }, "clusterOperations": { "$ref": "BareMetalAdminClusterOperationsConfig", "description": "Cluster operations configuration." @@ -3207,7 +3211,7 @@ }, "controlPlaneNodePoolConfig": { "$ref": "BareMetalAdminControlPlaneNodePoolConfig", - "description": "Configures the node pool running the control plane. If specified the corresponding NodePool will be created for the cluster's control plane. The NodePool will have the same name and namespace as the cluster." + "description": "Required. Configures the node pool running the control plane. If specified the corresponding NodePool will be created for the cluster's control plane. The NodePool will have the same name and namespace as the cluster." } }, "type": "object" @@ -3218,7 +3222,7 @@ "properties": { "nodePoolConfig": { "$ref": "BareMetalNodePoolConfig", - "description": "The generic configuration for a node pool running the control plane." + "description": "Required. The generic configuration for a node pool running the control plane." } }, "type": "object" @@ -3551,6 +3555,10 @@ "description": "Required. The Anthos clusters on bare metal version for your user cluster.", "type": "string" }, + "binaryAuthorization": { + "$ref": "BinaryAuthorization", + "description": "Binary Authorization related configurations." + }, "clusterOperations": { "$ref": "BareMetalClusterOperationsConfig", "description": "Cluster operations configuration." @@ -4360,6 +4368,27 @@ }, "type": "object" }, + "BinaryAuthorization": { + "description": "Configuration for Binary Authorization.", + "id": "BinaryAuthorization", + "properties": { + "evaluationMode": { + "description": "Mode of operation for binauthz policy evaluation. If unspecified, defaults to DISABLED.", + "enum": [ + "EVALUATION_MODE_UNSPECIFIED", + "DISABLED", + "PROJECT_SINGLETON_POLICY_ENFORCE" + ], + "enumDescriptions": [ + "Default value", + "Disable BinaryAuthorization", + "Enforce Kubernetes admission requests with BinaryAuthorization using the project's singleton policy." + ], + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -4875,7 +4904,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -5034,7 +5063,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { @@ -5706,6 +5735,10 @@ "description": "MasterIP is the IP announced by the master of Seesaw group.", "type": "string" }, + "stackdriverName": { + "description": "Name to be used by Stackdriver.", + "type": "string" + }, "vms": { "description": "Names of the VMs created for this Seesaw group.", "items": { @@ -5864,6 +5897,10 @@ "description": "A human readable description of this VMware user cluster.", "type": "string" }, + "disableBundledIngress": { + "description": "Disable bundled ingress.", + "type": "boolean" + }, "enableControlPlaneV2": { "description": "Enable control plane V2. Default to false.", "type": "boolean" @@ -5951,6 +5988,10 @@ "readOnly": true, "type": "string" }, + "upgradePolicy": { + "$ref": "VmwareClusterUpgradePolicy", + "description": "Specifies upgrade policy for the cluster." + }, "validationCheck": { "$ref": "ValidationCheck", "description": "Output only. ValidationCheck represents the result of the preflight check job.", @@ -5968,6 +6009,17 @@ }, "type": "object" }, + "VmwareClusterUpgradePolicy": { + "description": "VmwareClusterUpgradePolicy defines the cluster upgrade policy.", + "id": "VmwareClusterUpgradePolicy", + "properties": { + "controlPlaneOnly": { + "description": "Controls whether the upgrade applies to the control plane only.", + "type": "boolean" + } + }, + "type": "object" + }, "VmwareControlPlaneNodeConfig": { "description": "Specifies control plane node config for the VMware user cluster.", "id": "VmwareControlPlaneNodeConfig", @@ -6016,6 +6068,10 @@ "datastore": { "description": "The Vsphere datastore used by the control plane Node.", "type": "string" + }, + "storagePolicyName": { + "description": "The Vsphere storage policy used by the control plane Node.", + "type": "string" } }, "type": "object" @@ -6150,6 +6206,11 @@ "$ref": "VmwareMetalLbConfig", "description": "Configuration for MetalLB typed load balancers." }, + "seesawConfig": { + "$ref": "VmwareSeesawConfig", + "description": "Output only. Configuration for Seesaw typed load balancers.", + "readOnly": true + }, "vipConfig": { "$ref": "VmwareVipConfig", "description": "The VIPs used by the load balancer." @@ -6437,6 +6498,43 @@ }, "type": "object" }, + "VmwareSeesawConfig": { + "description": "VmwareSeesawConfig represents configuration parameters for an already existing Seesaw load balancer. IMPORTANT: Please note that the Anthos On-Prem API will not generate or update Seesaw configurations it can only bind a pre-existing configuration to a new user cluster. IMPORTANT: When attempting to create a user cluster with a pre-existing Seesaw load balancer you will need to follow some preparation steps before calling the 'CreateVmwareCluster' API method. First you will need to create the user cluster's namespace via kubectl. The namespace will need to use the following naming convention : -gke-onprem-mgmt or -gke-onprem-mgmt depending on whether you used the 'VmwareCluster.local_name' to disambiguate collisions; for more context see the documentation of 'VmwareCluster.local_name'. Once the namespace is created you will need to create a secret resource via kubectl. This secret will contain copies of your Seesaw credentials. The Secret must be called 'user-cluster-creds' and contain Seesaw's SSH and Cert credentials. The credentials must be keyed with the following names: 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', 'seesaw-ssh-ca-key', 'seesaw-ssh-ca-cert'.", + "id": "VmwareSeesawConfig", + "properties": { + "enableHa": { + "description": "Enable two load balancer VMs to achieve a highly-available Seesaw load balancer.", + "type": "boolean" + }, + "group": { + "description": "Required. In general the following format should be used for the Seesaw group name: seesaw-for-[cluster_name].", + "type": "string" + }, + "ipBlocks": { + "description": "Required. The IP Blocks to be used by the Seesaw load balancer", + "items": { + "$ref": "VmwareIpBlock" + }, + "type": "array" + }, + "masterIp": { + "description": "Required. MasterIP is the IP announced by the master of Seesaw group.", + "type": "string" + }, + "stackdriverName": { + "description": "Name to be used by Stackdriver.", + "type": "string" + }, + "vms": { + "description": "Names of the VMs created for this Seesaw group.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "VmwareStaticIpConfig": { "description": "Represents the network configuration required for the VMware user clusters with Static IP configurations.", "id": "VmwareStaticIpConfig", @@ -6493,6 +6591,10 @@ "resourcePool": { "description": "The name of the vCenter resource pool for the user cluster.", "type": "string" + }, + "storagePolicyName": { + "description": "The name of the vCenter storage policy for the user cluster.", + "type": "string" } }, "type": "object" diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index 6cbf4701cd7..ed8defbb68d 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/anthos/clusters/docs/on-prem/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gkeonpremService, err := gkeonprem.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gkeonpremService, err := gkeonprem.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gkeonpremService, err := gkeonprem.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gkeonprem // import "google.golang.org/api/gkeonprem/v1" import ( @@ -401,6 +414,9 @@ type BareMetalAdminCluster struct { // bare metal admin cluster. BareMetalVersion string `json:"bareMetalVersion,omitempty"` + // BinaryAuthorization: Binary Authorization related configurations. + BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` + // ClusterOperations: Cluster operations configuration. ClusterOperations *BareMetalAdminClusterOperationsConfig `json:"clusterOperations,omitempty"` @@ -588,10 +604,10 @@ type BareMetalAdminControlPlaneConfig struct { // https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ ApiServerArgs []*BareMetalAdminApiServerArgument `json:"apiServerArgs,omitempty"` - // ControlPlaneNodePoolConfig: Configures the node pool running the - // control plane. If specified the corresponding NodePool will be - // created for the cluster's control plane. The NodePool will have the - // same name and namespace as the cluster. + // ControlPlaneNodePoolConfig: Required. Configures the node pool + // running the control plane. If specified the corresponding NodePool + // will be created for the cluster's control plane. The NodePool will + // have the same name and namespace as the cluster. ControlPlaneNodePoolConfig *BareMetalAdminControlPlaneNodePoolConfig `json:"controlPlaneNodePoolConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "ApiServerArgs") to @@ -623,8 +639,8 @@ func (s *BareMetalAdminControlPlaneConfig) MarshalJSON() ([]byte, error) { // config so that we can flexible about supporting control plane // specific fields in the future. type BareMetalAdminControlPlaneNodePoolConfig struct { - // NodePoolConfig: The generic configuration for a node pool running the - // control plane. + // NodePoolConfig: Required. The generic configuration for a node pool + // running the control plane. NodePoolConfig *BareMetalNodePoolConfig `json:"nodePoolConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "NodePoolConfig") to @@ -1361,6 +1377,9 @@ type BareMetalCluster struct { // for your user cluster. BareMetalVersion string `json:"bareMetalVersion,omitempty"` + // BinaryAuthorization: Binary Authorization related configurations. + BinaryAuthorization *BinaryAuthorization `json:"binaryAuthorization,omitempty"` + // ClusterOperations: Cluster operations configuration. ClusterOperations *BareMetalClusterOperationsConfig `json:"clusterOperations,omitempty"` @@ -2808,6 +2827,43 @@ func (s *BareMetalWorkloadNodeConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BinaryAuthorization: Configuration for Binary Authorization. +type BinaryAuthorization struct { + // EvaluationMode: Mode of operation for binauthz policy evaluation. If + // unspecified, defaults to DISABLED. + // + // Possible values: + // "EVALUATION_MODE_UNSPECIFIED" - Default value + // "DISABLED" - Disable BinaryAuthorization + // "PROJECT_SINGLETON_POLICY_ENFORCE" - Enforce Kubernetes admission + // requests with BinaryAuthorization using the project's singleton + // policy. + EvaluationMode string `json:"evaluationMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EvaluationMode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EvaluationMode") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BinaryAuthorization) MarshalJSON() ([]byte, error) { + type NoMethod BinaryAuthorization + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -3795,8 +3851,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -4002,7 +4058,7 @@ func (s *OperationStage) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -4011,17 +4067,17 @@ func (s *OperationStage) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and @@ -5129,6 +5185,9 @@ type VmwareAdminSeesawConfig struct { // MasterIp: MasterIP is the IP announced by the master of Seesaw group. MasterIp string `json:"masterIp,omitempty"` + // StackdriverName: Name to be used by Stackdriver. + StackdriverName string `json:"stackdriverName,omitempty"` + // Vms: Names of the VMs created for this Seesaw group. Vms []string `json:"vms,omitempty"` @@ -5385,6 +5444,9 @@ type VmwareCluster struct { // cluster. Description string `json:"description,omitempty"` + // DisableBundledIngress: Disable bundled ingress. + DisableBundledIngress bool `json:"disableBundledIngress,omitempty"` + // EnableControlPlaneV2: Enable control plane V2. Default to false. EnableControlPlaneV2 bool `json:"enableControlPlaneV2,omitempty"` @@ -5464,6 +5526,9 @@ type VmwareCluster struct { // last updated. UpdateTime string `json:"updateTime,omitempty"` + // UpgradePolicy: Specifies upgrade policy for the cluster. + UpgradePolicy *VmwareClusterUpgradePolicy `json:"upgradePolicy,omitempty"` + // ValidationCheck: Output only. ValidationCheck represents the result // of the preflight check job. ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"` @@ -5504,6 +5569,37 @@ func (s *VmwareCluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareClusterUpgradePolicy: VmwareClusterUpgradePolicy defines the +// cluster upgrade policy. +type VmwareClusterUpgradePolicy struct { + // ControlPlaneOnly: Controls whether the upgrade applies to the control + // plane only. + ControlPlaneOnly bool `json:"controlPlaneOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ControlPlaneOnly") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ControlPlaneOnly") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VmwareClusterUpgradePolicy) MarshalJSON() ([]byte, error) { + type NoMethod VmwareClusterUpgradePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareControlPlaneNodeConfig: Specifies control plane node config for // the VMware user cluster. type VmwareControlPlaneNodeConfig struct { @@ -5585,6 +5681,10 @@ type VmwareControlPlaneVsphereConfig struct { // Datastore: The Vsphere datastore used by the control plane Node. Datastore string `json:"datastore,omitempty"` + // StoragePolicyName: The Vsphere storage policy used by the control + // plane Node. + StoragePolicyName string `json:"storagePolicyName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Datastore") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -5833,6 +5933,10 @@ type VmwareLoadBalancerConfig struct { // MetalLbConfig: Configuration for MetalLB typed load balancers. MetalLbConfig *VmwareMetalLbConfig `json:"metalLbConfig,omitempty"` + // SeesawConfig: Output only. Configuration for Seesaw typed load + // balancers. + SeesawConfig *VmwareSeesawConfig `json:"seesawConfig,omitempty"` + // VipConfig: The VIPs used by the load balancer. VipConfig *VmwareVipConfig `json:"vipConfig,omitempty"` @@ -6243,6 +6347,71 @@ func (s *VmwarePlatformConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareSeesawConfig: VmwareSeesawConfig represents configuration +// parameters for an already existing Seesaw load balancer. IMPORTANT: +// Please note that the Anthos On-Prem API will not generate or update +// Seesaw configurations it can only bind a pre-existing configuration +// to a new user cluster. IMPORTANT: When attempting to create a user +// cluster with a pre-existing Seesaw load balancer you will need to +// follow some preparation steps before calling the +// 'CreateVmwareCluster' API method. First you will need to create the +// user cluster's namespace via kubectl. The namespace will need to use +// the following naming convention : -gke-onprem-mgmt or +// -gke-onprem-mgmt depending on whether you used the +// 'VmwareCluster.local_name' to disambiguate collisions; for more +// context see the documentation of 'VmwareCluster.local_name'. Once the +// namespace is created you will need to create a secret resource via +// kubectl. This secret will contain copies of your Seesaw credentials. +// The Secret must be called 'user-cluster-creds' and contain Seesaw's +// SSH and Cert credentials. The credentials must be keyed with the +// following names: 'seesaw-ssh-private-key', 'seesaw-ssh-public-key', +// 'seesaw-ssh-ca-key', 'seesaw-ssh-ca-cert'. +type VmwareSeesawConfig struct { + // EnableHa: Enable two load balancer VMs to achieve a highly-available + // Seesaw load balancer. + EnableHa bool `json:"enableHa,omitempty"` + + // Group: Required. In general the following format should be used for + // the Seesaw group name: seesaw-for-[cluster_name]. + Group string `json:"group,omitempty"` + + // IpBlocks: Required. The IP Blocks to be used by the Seesaw load + // balancer + IpBlocks []*VmwareIpBlock `json:"ipBlocks,omitempty"` + + // MasterIp: Required. MasterIP is the IP announced by the master of + // Seesaw group. + MasterIp string `json:"masterIp,omitempty"` + + // StackdriverName: Name to be used by Stackdriver. + StackdriverName string `json:"stackdriverName,omitempty"` + + // Vms: Names of the VMs created for this Seesaw group. + Vms []string `json:"vms,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableHa") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableHa") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmwareSeesawConfig) MarshalJSON() ([]byte, error) { + type NoMethod VmwareSeesawConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareStaticIpConfig: Represents the network configuration required // for the VMware user clusters with Static IP configurations. type VmwareStaticIpConfig struct { @@ -6330,6 +6499,10 @@ type VmwareVCenterConfig struct { // cluster. ResourcePool string `json:"resourcePool,omitempty"` + // StoragePolicyName: The name of the vCenter storage policy for the + // user cluster. + StoragePolicyName string `json:"storagePolicyName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/gmail/v1/gmail-gen.go b/gmail/v1/gmail-gen.go index 9ec62f9211a..8ff94402557 100644 --- a/gmail/v1/gmail-gen.go +++ b/gmail/v1/gmail-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/gmail/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // gmailService, err := gmail.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // gmailService, err := gmail.NewService(ctx, option.WithScopes(gmail.GmailSettingsSharingScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gmailService, err := gmail.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gmailService, err := gmail.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gmail // import "google.golang.org/api/gmail/v1" import ( diff --git a/gmailpostmastertools/v1/gmailpostmastertools-gen.go b/gmailpostmastertools/v1/gmailpostmastertools-gen.go index 540f64fd3a0..4728fb6f3b1 100644 --- a/gmailpostmastertools/v1/gmailpostmastertools-gen.go +++ b/gmailpostmastertools/v1/gmailpostmastertools-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/gmail/postmaster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gmailpostmastertools // import "google.golang.org/api/gmailpostmastertools/v1" import ( diff --git a/gmailpostmastertools/v1beta1/gmailpostmastertools-gen.go b/gmailpostmastertools/v1beta1/gmailpostmastertools-gen.go index 46f94a35d40..f0f720c33a8 100644 --- a/gmailpostmastertools/v1beta1/gmailpostmastertools-gen.go +++ b/gmailpostmastertools/v1beta1/gmailpostmastertools-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/gmail/postmaster // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // gmailpostmastertoolsService, err := gmailpostmastertools.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package gmailpostmastertools // import "google.golang.org/api/gmailpostmastertools/v1beta1" import ( diff --git a/groupsmigration/v1/groupsmigration-gen.go b/groupsmigration/v1/groupsmigration-gen.go index 975f45567ed..608fbe76a55 100644 --- a/groupsmigration/v1/groupsmigration-gen.go +++ b/groupsmigration/v1/groupsmigration-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/google-apps/groups-migration/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // groupsmigrationService, err := groupsmigration.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // groupsmigrationService, err := groupsmigration.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // groupsmigrationService, err := groupsmigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package groupsmigration // import "google.golang.org/api/groupsmigration/v1" import ( diff --git a/groupssettings/v1/groupssettings-gen.go b/groupssettings/v1/groupssettings-gen.go index 7103cdac2bf..1304aed7d5d 100644 --- a/groupssettings/v1/groupssettings-gen.go +++ b/groupssettings/v1/groupssettings-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/google-apps/groups-settings/get_started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // groupssettingsService, err := groupssettings.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // groupssettingsService, err := groupssettings.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // groupssettingsService, err := groupssettings.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package groupssettings // import "google.golang.org/api/groupssettings/v1" import ( diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index 54c6abb9024..a458a6c3914 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -4183,7 +4183,7 @@ } } }, - "revision": "20230728", + "revision": "20230814", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -6361,7 +6361,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -6464,7 +6464,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index 8a209cb4519..8fbd441ba5e 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/healthcare // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // healthcareService, err := healthcare.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // healthcareService, err := healthcare.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package healthcare // import "google.golang.org/api/healthcare/v1" import ( @@ -4765,8 +4778,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -4985,7 +4998,7 @@ func (s *PatientId) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -4994,17 +5007,17 @@ func (s *PatientId) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 1117d66c5c9..4a8309a7e20 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4941,7 +4941,7 @@ } } }, - "revision": "20230728", + "revision": "20230814", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "Action": { @@ -7845,7 +7845,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -7977,7 +7977,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index dd56c307c5e..4ae21379cfc 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/healthcare // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // healthcareService, err := healthcare.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // healthcareService, err := healthcare.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // healthcareService, err := healthcare.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package healthcare // import "google.golang.org/api/healthcare/v1beta1" import ( @@ -6141,8 +6154,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -6406,7 +6419,7 @@ func (s *PatientId) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -6415,17 +6428,17 @@ func (s *PatientId) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/homegraph/v1/homegraph-gen.go b/homegraph/v1/homegraph-gen.go index 174db616d93..c0e450ed102 100644 --- a/homegraph/v1/homegraph-gen.go +++ b/homegraph/v1/homegraph-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.home.google.com/cloud-to-cloud/get-started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // homegraphService, err := homegraph.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // homegraphService, err := homegraph.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // homegraphService, err := homegraph.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package homegraph // import "google.golang.org/api/homegraph/v1" import ( diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 4ed6028dbb2..60873b34005 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // iamService, err := iam.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // iamService, err := iam.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // iamService, err := iam.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package iam // import "google.golang.org/api/iam/v1" import ( diff --git a/iam/v2/iam-gen.go b/iam/v2/iam-gen.go index c4dd28f828d..f7128dd4ce7 100644 --- a/iam/v2/iam-gen.go +++ b/iam/v2/iam-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // iamService, err := iam.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // iamService, err := iam.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // iamService, err := iam.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package iam // import "google.golang.org/api/iam/v2" import ( diff --git a/iam/v2beta/iam-gen.go b/iam/v2beta/iam-gen.go index 48018ad585d..870979d6daf 100644 --- a/iam/v2beta/iam-gen.go +++ b/iam/v2beta/iam-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // iamService, err := iam.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // iamService, err := iam.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // iamService, err := iam.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package iam // import "google.golang.org/api/iam/v2beta" import ( diff --git a/iamcredentials/v1/iamcredentials-gen.go b/iamcredentials/v1/iamcredentials-gen.go index 0a6304d51dc..5dfff4cb2cc 100644 --- a/iamcredentials/v1/iamcredentials-gen.go +++ b/iamcredentials/v1/iamcredentials-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/docs/creating-short-lived-service-account-credentials // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // iamcredentialsService, err := iamcredentials.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // iamcredentialsService, err := iamcredentials.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // iamcredentialsService, err := iamcredentials.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package iamcredentials // import "google.golang.org/api/iamcredentials/v1" import ( diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index 9c1e59856d0..3ebd6322622 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -682,7 +682,7 @@ } } }, - "revision": "20230707", + "revision": "20230901", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -1046,12 +1046,19 @@ "loginHint": { "description": "Domain hint to send as hd=? parameter in OAuth request flow. Enables redirect to primary IDP by skipping Google's login screen. https://developers.google.com/identity/protocols/OpenIDConnect#hd-param Note: IAP does not verify that the id token's hd claim matches this value since access behavior is managed by IAM policies.", "type": "string" + }, + "programmaticClients": { + "description": "List of client ids allowed to use IAP programmatically.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 51180ca7598..8a458ee754d 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iap // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // iapService, err := iap.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // iapService, err := iap.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // iapService, err := iap.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package iap // import "google.golang.org/api/iap/v1" import ( @@ -1020,6 +1033,10 @@ type OAuthSettings struct { // value since access behavior is managed by IAM policies. LoginHint string `json:"loginHint,omitempty"` + // ProgrammaticClients: List of client ids allowed to use IAP + // programmatically. + ProgrammaticClients []string `json:"programmaticClients,omitempty"` + // ForceSendFields is a list of field names (e.g. "LoginHint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1057,7 +1074,7 @@ func (s *OAuthSettings) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1066,17 +1083,17 @@ func (s *OAuthSettings) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/iap/v1beta1/iap-api.json b/iap/v1beta1/iap-api.json index edf7109b9c2..451bab73f53 100644 --- a/iap/v1beta1/iap-api.json +++ b/iap/v1beta1/iap-api.json @@ -194,7 +194,7 @@ } } }, - "revision": "20230127", + "revision": "20230901", "rootUrl": "https://iap.googleapis.com/", "schemas": { "Binding": { @@ -266,7 +266,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/iap/v1beta1/iap-gen.go b/iap/v1beta1/iap-gen.go index de6086c439c..b0eaa653d8f 100644 --- a/iap/v1beta1/iap-gen.go +++ b/iap/v1beta1/iap-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iap // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // iapService, err := iap.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // iapService, err := iap.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // iapService, err := iap.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package iap // import "google.golang.org/api/iap/v1beta1" import ( @@ -369,7 +382,7 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -378,17 +391,17 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/identitytoolkit/v1/identitytoolkit-gen.go b/identitytoolkit/v1/identitytoolkit-gen.go index 5dd7769dc2c..48e4afcce2f 100644 --- a/identitytoolkit/v1/identitytoolkit-gen.go +++ b/identitytoolkit/v1/identitytoolkit-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/identity-platform // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // identitytoolkitService, err := identitytoolkit.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithScopes(identitytoolkit.FirebaseScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package identitytoolkit // import "google.golang.org/api/identitytoolkit/v1" import ( diff --git a/identitytoolkit/v2/identitytoolkit-gen.go b/identitytoolkit/v2/identitytoolkit-gen.go index 92a317a0368..7a410d4aac6 100644 --- a/identitytoolkit/v2/identitytoolkit-gen.go +++ b/identitytoolkit/v2/identitytoolkit-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/identity-platform // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // identitytoolkitService, err := identitytoolkit.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithScopes(identitytoolkit.FirebaseScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package identitytoolkit // import "google.golang.org/api/identitytoolkit/v2" import ( diff --git a/identitytoolkit/v3/identitytoolkit-gen.go b/identitytoolkit/v3/identitytoolkit-gen.go index a0ff06c43ef..14c348b126c 100644 --- a/identitytoolkit/v3/identitytoolkit-gen.go +++ b/identitytoolkit/v3/identitytoolkit-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/identity-toolkit/v3/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // identitytoolkitService, err := identitytoolkit.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithScopes(identitytoolkit.FirebaseScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // identitytoolkitService, err := identitytoolkit.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package identitytoolkit // import "google.golang.org/api/identitytoolkit/v3" import ( diff --git a/ids/v1/ids-gen.go b/ids/v1/ids-gen.go index 974ca7de566..8fb705cdf88 100644 --- a/ids/v1/ids-gen.go +++ b/ids/v1/ids-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // idsService, err := ids.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // idsService, err := ids.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // idsService, err := ids.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package ids // import "google.golang.org/api/ids/v1" import ( diff --git a/indexing/v3/indexing-gen.go b/indexing/v3/indexing-gen.go index f57b70bee30..98c91101709 100644 --- a/indexing/v3/indexing-gen.go +++ b/indexing/v3/indexing-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/search/apis/indexing-api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // indexingService, err := indexing.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // indexingService, err := indexing.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // indexingService, err := indexing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package indexing // import "google.golang.org/api/indexing/v3" import ( diff --git a/jobs/v3/jobs-api.json b/jobs/v3/jobs-api.json index 5a4c04201fd..d0e295a1bc4 100644 --- a/jobs/v3/jobs-api.json +++ b/jobs/v3/jobs-api.json @@ -652,7 +652,7 @@ } } }, - "revision": "20230705", + "revision": "20230906", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -864,6 +864,7 @@ "type": "string" }, "keywordSearchableJobCustomAttributes": { + "deprecated": true, "description": "Optional. This field is deprecated. Please set the searchability of the custom attribute in the Job.custom_attributes going forward. A list of keys of filterable Job.custom_attributes, whose corresponding `string_values` are used in keyword search. Jobs with `string_values` under these specified field keys are returned if any of the values matches the search keyword. Custom field values with parenthesis, brackets and special symbols won't be properly searchable, and those keyword queries need to be surrounded by quotes.", "items": { "type": "string" @@ -1732,6 +1733,7 @@ "type": "string" }, "visibility": { + "deprecated": true, "description": "Deprecated. The job is only visible to the owner. The visibility of the job. Defaults to Visibility.ACCOUNT_ONLY if not specified.", "enum": [ "VISIBILITY_UNSPECIFIED", @@ -2202,6 +2204,12 @@ "TELECOMMUTE_ALLOWED", "TELECOMMUTE_JOBS_EXCLUDED" ], + "enumDeprecated": [ + false, + true, + false, + false + ], "enumDescriptions": [ "Default value if the telecommute preference is not specified.", "Deprecated: Ignore telecommute status of jobs. Use TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs.", @@ -2623,6 +2631,7 @@ "description": "Required. The meta information collected about the job searcher, used to improve the search quality of the service. The identifiers (such as `user_id`) are provided by users, and must be unique and consistent." }, "requirePreciseResultSize": { + "deprecated": true, "description": "This field is deprecated.", "type": "boolean" }, diff --git a/jobs/v3/jobs-gen.go b/jobs/v3/jobs-gen.go index 9b21edf3da3..4f8018ab902 100644 --- a/jobs/v3/jobs-gen.go +++ b/jobs/v3/jobs-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/talent-solution/job-search/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // jobsService, err := jobs.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // jobsService, err := jobs.NewService(ctx, option.WithScopes(jobs.JobsScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // jobsService, err := jobs.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // jobsService, err := jobs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package jobs // import "google.golang.org/api/jobs/v3" import ( diff --git a/jobs/v3p1beta1/jobs-api.json b/jobs/v3p1beta1/jobs-api.json index 09f5fcfaa75..d04ece33e2b 100644 --- a/jobs/v3p1beta1/jobs-api.json +++ b/jobs/v3p1beta1/jobs-api.json @@ -682,7 +682,7 @@ } } }, - "revision": "20230705", + "revision": "20230906", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -898,6 +898,7 @@ "type": "string" }, "keywordSearchableJobCustomAttributes": { + "deprecated": true, "description": "Optional. This field is deprecated. Please set the searchability of the custom attribute in the Job.custom_attributes going forward. A list of keys of filterable Job.custom_attributes, whose corresponding `string_values` are used in keyword search. Jobs with `string_values` under these specified field keys are returned if any of the values matches the search keyword. Custom field values with parenthesis, brackets and special symbols won't be properly searchable, and those keyword queries need to be surrounded by quotes.", "items": { "type": "string" @@ -1829,6 +1830,7 @@ "type": "string" }, "visibility": { + "deprecated": true, "description": "Deprecated. The job is only visible to the owner. The visibility of the job. Defaults to Visibility.ACCOUNT_ONLY if not specified.", "enum": [ "VISIBILITY_UNSPECIFIED", @@ -2306,6 +2308,12 @@ "TELECOMMUTE_ALLOWED", "TELECOMMUTE_JOBS_EXCLUDED" ], + "enumDeprecated": [ + false, + true, + false, + false + ], "enumDescriptions": [ "Default value if the telecommute preference is not specified.", "Deprecated: Ignore telecommute status of jobs. Use TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs.", @@ -2564,7 +2572,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -2773,6 +2781,7 @@ "description": "Required. The meta information collected about the job searcher, used to improve the search quality of the service. The identifiers (such as `user_id`) are provided by users, and must be unique and consistent." }, "requirePreciseResultSize": { + "deprecated": true, "description": "This field is deprecated.", "type": "boolean" }, diff --git a/jobs/v3p1beta1/jobs-gen.go b/jobs/v3p1beta1/jobs-gen.go index d0f7673c803..3838ab776a2 100644 --- a/jobs/v3p1beta1/jobs-gen.go +++ b/jobs/v3p1beta1/jobs-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/talent-solution/job-search/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // jobsService, err := jobs.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // jobsService, err := jobs.NewService(ctx, option.WithScopes(jobs.JobsScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // jobsService, err := jobs.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // jobsService, err := jobs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package jobs // import "google.golang.org/api/jobs/v3p1beta1" import ( @@ -3268,8 +3282,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/jobs/v4/jobs-api.json b/jobs/v4/jobs-api.json index e414f371df9..21937bf1bcc 100644 --- a/jobs/v4/jobs-api.json +++ b/jobs/v4/jobs-api.json @@ -903,7 +903,7 @@ } } }, - "revision": "20230523", + "revision": "20230906", "rootUrl": "https://jobs.googleapis.com/", "schemas": { "ApplicationInfo": { @@ -1223,6 +1223,7 @@ "type": "string" }, "keywordSearchableJobCustomAttributes": { + "deprecated": true, "description": "This field is deprecated. Please set the searchability of the custom attribute in the Job.custom_attributes going forward. A list of keys of filterable Job.custom_attributes, whose corresponding `string_values` are used in keyword searches. Jobs with `string_values` under these specified field keys are returned if any of the values match the search keyword. Custom field values with parenthesis, brackets and special symbols are not searchable as-is, and those keyword queries must be surrounded by quotes.", "items": { "type": "string" @@ -1885,6 +1886,7 @@ "type": "string" }, "visibility": { + "deprecated": true, "description": "Deprecated. The job is only visible to the owner. The visibility of the job. Defaults to Visibility.ACCOUNT_ONLY if not specified.", "enum": [ "VISIBILITY_UNSPECIFIED", @@ -2397,6 +2399,12 @@ "TELECOMMUTE_ALLOWED", "TELECOMMUTE_JOBS_EXCLUDED" ], + "enumDeprecated": [ + false, + true, + false, + false + ], "enumDescriptions": [ "Default value if the telecommute preference isn't specified.", "Deprecated: Ignore telecommute status of jobs. Use TELECOMMUTE_JOBS_EXCLUDED if want to exclude telecommute jobs.", @@ -2612,7 +2620,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -2748,6 +2756,7 @@ "description": "Controls over how job documents get ranked on top of existing relevance score (determined by API algorithm)." }, "disableKeywordMatch": { + "deprecated": true, "description": "This field is deprecated. Please use SearchJobsRequest.keyword_match_mode going forward. To migrate, disable_keyword_match set to false maps to KeywordMatchMode.KEYWORD_MATCH_ALL, and disable_keyword_match set to true maps to KeywordMatchMode.KEYWORD_MATCH_DISABLED. If SearchJobsRequest.keyword_match_mode is set, this field is ignored. Controls whether to disable exact keyword match on Job.title, Job.description, Job.company_display_name, Job.addresses, Job.qualifications. When disable keyword match is turned off, a keyword match returns jobs that do not match given category filters when there are matching keywords. For example, for the query \"program manager,\" a result is returned even if the job posting has the title \"software developer,\" which doesn't fall into \"program manager\" ontology, but does have \"program manager\" appearing in its description. For queries like \"cloud\" that don't contain title or location specific ontology, jobs with \"cloud\" keyword matches are returned regardless of this flag's value. Use Company.keyword_searchable_job_custom_attributes if company-specific globally matched custom field/attribute string values are needed. Enabling keyword match improves recall of subsequent search requests. Defaults to false.", "type": "boolean" }, diff --git a/jobs/v4/jobs-gen.go b/jobs/v4/jobs-gen.go index 55a9baecdd8..cf1ed57497e 100644 --- a/jobs/v4/jobs-gen.go +++ b/jobs/v4/jobs-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/talent-solution/job-search/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // jobsService, err := jobs.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // jobsService, err := jobs.NewService(ctx, option.WithScopes(jobs.JobsScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // jobsService, err := jobs.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // jobsService, err := jobs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package jobs // import "google.golang.org/api/jobs/v4" import ( @@ -2863,8 +2877,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/keep/v1/keep-gen.go b/keep/v1/keep-gen.go index 97239c487c2..eb7eddc67a8 100644 --- a/keep/v1/keep-gen.go +++ b/keep/v1/keep-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/keep/api // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // keepService, err := keep.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // keepService, err := keep.NewService(ctx, option.WithScopes(keep.KeepReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // keepService, err := keep.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // keepService, err := keep.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package keep // import "google.golang.org/api/keep/v1" import ( diff --git a/kgsearch/v1/kgsearch-gen.go b/kgsearch/v1/kgsearch-gen.go index 1d53da7e58a..8446ba75ad0 100644 --- a/kgsearch/v1/kgsearch-gen.go +++ b/kgsearch/v1/kgsearch-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/knowledge-graph/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // kgsearchService, err := kgsearch.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // kgsearchService, err := kgsearch.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // kgsearchService, err := kgsearch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package kgsearch // import "google.golang.org/api/kgsearch/v1" import ( diff --git a/kmsinventory/v1/kmsinventory-gen.go b/kmsinventory/v1/kmsinventory-gen.go index cc471445fda..e2b939e4faa 100644 --- a/kmsinventory/v1/kmsinventory-gen.go +++ b/kmsinventory/v1/kmsinventory-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/kms/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // kmsinventoryService, err := kmsinventory.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // kmsinventoryService, err := kmsinventory.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // kmsinventoryService, err := kmsinventory.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package kmsinventory // import "google.golang.org/api/kmsinventory/v1" import ( diff --git a/language/v1/language-gen.go b/language/v1/language-gen.go index 63b4c439738..6c66b52c2cf 100644 --- a/language/v1/language-gen.go +++ b/language/v1/language-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/natural-language/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // languageService, err := language.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // languageService, err := language.NewService(ctx, option.WithScopes(language.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // languageService, err := language.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // languageService, err := language.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package language // import "google.golang.org/api/language/v1" import ( diff --git a/language/v1beta2/language-gen.go b/language/v1beta2/language-gen.go index 6efa04ac362..5e8a1aedc99 100644 --- a/language/v1beta2/language-gen.go +++ b/language/v1beta2/language-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/natural-language/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // languageService, err := language.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // languageService, err := language.NewService(ctx, option.WithScopes(language.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // languageService, err := language.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // languageService, err := language.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package language // import "google.golang.org/api/language/v1beta2" import ( diff --git a/language/v2/language-api.json b/language/v2/language-api.json index ad40e425ff2..4b301ee85a8 100644 --- a/language/v2/language-api.json +++ b/language/v2/language-api.json @@ -208,7 +208,7 @@ } } }, - "revision": "20230812", + "revision": "20230905", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -488,7 +488,7 @@ "additionalProperties": { "type": "string" }, - "description": "Metadata associated with the entity. For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if they are available. For the metadata associated with other entity types, see the Type table below.", + "description": "Metadata associated with the entity. For the metadata associated with other entity types, see the Type table below.", "type": "object" }, "name": { @@ -526,7 +526,7 @@ "Consumer product", "Other types of entities", "Phone number The metadata lists the phone number, formatted according to local convention, plus whichever additional elements appear in the text: * `number` - the actual number, broken down into sections as per local convention * `national_prefix` - country code, if detected * `area_code` - region or area code, if detected * `extension` - phone extension (to be dialed after connection), if detected", - "Address The metadata identifies the street number and locality plus whichever additional elements appear in the text: * `street_number` - street number * `locality` - city or town * `street_name` - street/route name, if detected * `postal_code` - postal code, if detected * `country` - country, if detected\u003c * `broad_region` - administrative area, such as the state, if detected * `narrow_region` - smaller administrative area, such as county, if detected * `sublocality` - used in Asian addresses to demark a district within a city, if detected", + "Address The metadata identifies the street number and locality plus whichever additional elements appear in the text: * `street_number` - street number * `locality` - city or town * `street_name` - street/route name, if detected * `postal_code` - postal code, if detected * `country` - country, if detected * `broad_region` - administrative area, such as the state, if detected * `narrow_region` - smaller administrative area, such as county, if detected * `sublocality` - used in Asian addresses to demark a district within a city, if detected", "Date The metadata identifies the components of the date: * `year` - four digit year, if detected * `month` - two digit month number, if detected * `day` - two digit day number, if detected", "Number The metadata is the number itself.", "Price The metadata identifies the `value` and `currency`." diff --git a/language/v2/language-gen.go b/language/v2/language-gen.go index 600c3b1eba8..29d58ddebeb 100644 --- a/language/v2/language-gen.go +++ b/language/v2/language-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/natural-language/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // languageService, err := language.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // languageService, err := language.NewService(ctx, option.WithScopes(language.CloudPlatformScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // languageService, err := language.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // languageService, err := language.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package language // import "google.golang.org/api/language/v2" import ( @@ -629,10 +643,8 @@ type Entity struct { // currently supports proper noun mentions. Mentions []*EntityMention `json:"mentions,omitempty"` - // Metadata: Metadata associated with the entity. For most entity types, - // the metadata is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph - // MID (`mid`), if they are available. For the metadata associated with - // other entity types, see the Type table below. + // Metadata: Metadata associated with the entity. For the metadata + // associated with other entity types, see the Type table below. Metadata map[string]string `json:"metadata,omitempty"` // Name: The representative name for the entity. @@ -666,7 +678,7 @@ type Entity struct { // locality plus whichever additional elements appear in the text: * // `street_number` - street number * `locality` - city or town * // `street_name` - street/route name, if detected * `postal_code` - - // postal code, if detected * `country` - country, if detected< * + // postal code, if detected * `country` - country, if detected * // `broad_region` - administrative area, such as the state, if detected // * `narrow_region` - smaller administrative area, such as county, if // detected * `sublocality` - used in Asian addresses to demark a diff --git a/libraryagent/v1/libraryagent-gen.go b/libraryagent/v1/libraryagent-gen.go index 042f3b2724d..f1c61f4b41f 100644 --- a/libraryagent/v1/libraryagent-gen.go +++ b/libraryagent/v1/libraryagent-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/docs/quota // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // libraryagentService, err := libraryagent.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // libraryagentService, err := libraryagent.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // libraryagentService, err := libraryagent.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package libraryagent // import "google.golang.org/api/libraryagent/v1" import ( diff --git a/licensing/v1/licensing-gen.go b/licensing/v1/licensing-gen.go index f1e2c16a054..fa9c9e80670 100644 --- a/licensing/v1/licensing-gen.go +++ b/licensing/v1/licensing-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/admin-sdk/licensing/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // licensingService, err := licensing.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // licensingService, err := licensing.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // licensingService, err := licensing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package licensing // import "google.golang.org/api/licensing/v1" import ( diff --git a/lifesciences/v2beta/lifesciences-gen.go b/lifesciences/v2beta/lifesciences-gen.go index a627a5672ea..788ead2e6dd 100644 --- a/lifesciences/v2beta/lifesciences-gen.go +++ b/lifesciences/v2beta/lifesciences-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/life-sciences // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // lifesciencesService, err := lifesciences.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // lifesciencesService, err := lifesciences.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // lifesciencesService, err := lifesciences.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package lifesciences // import "google.golang.org/api/lifesciences/v2beta" import ( diff --git a/localservices/v1/localservices-gen.go b/localservices/v1/localservices-gen.go index 99251b5fba5..19ddf5f4c0d 100644 --- a/localservices/v1/localservices-gen.go +++ b/localservices/v1/localservices-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://ads.google.com/local-services-ads/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // localservicesService, err := localservices.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // localservicesService, err := localservices.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // localservicesService, err := localservices.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package localservices // import "google.golang.org/api/localservices/v1" import ( diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index e23b9dfd97e..7f5b3fcde08 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -7077,7 +7077,7 @@ } } }, - "revision": "20230804", + "revision": "20230831", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryDataset": { @@ -7716,7 +7716,7 @@ "type": "string" }, "pageSize": { - "description": "Optional. The maximum number of results to return from this request. Default is 50. If the value is negative or exceeds 1000, the request is rejected. The presence of next_page_token in the response indicates that more results might be available.", + "description": "Optional. The maximum number of results to return from this request. Default is 50. If the value is negative, the request is rejected.The presence of next_page_token in the response indicates that more results might be available.", "format": "int32", "type": "integer" }, @@ -8100,11 +8100,11 @@ "type": "string" }, "trace": { - "description": "Optional. The REST resource name of the trace being written to Cloud Trace (https://cloud.google.com/trace) in association with this log entry. For example, if your trace data is stored in the Cloud project \"my-trace-project\" and if the service that is creating the log entry receives a trace header that includes the trace ID \"12345\", then the service should use \"projects/my-tracing-project/traces/12345\".The trace field provides the link between logs and traces. By using this field, you can navigate from a log entry to a trace.", + "description": "Optional. The REST resource name of the trace being written to Cloud Trace (https://cloud.google.com/trace) in association with this log entry. For example, if your trace data is stored in the Cloud project \"my-trace-project\" and if the service that is creating the log entry receives a trace header that includes the trace ID \"12345\", then the service should use \"projects/my-trace-project/traces/12345\".The trace field provides the link between logs and traces. By using this field, you can navigate from a log entry to a trace.", "type": "string" }, "traceSampled": { - "description": "Optional. The sampling decision of the trace associated with the log entry.True means that the trace resource name in the trace field was sampled for storage in a trace backend. False means that the trace was not sampled for storage when this log entry was written, or the sampling decision was unknown at the time. A non-sampled trace value is still useful as a request correlation identifier. The default is False.", + "description": "Optional. The sampling decision of the span associated with the log entry at the time the log entry was created. This field corresponds to the sampled flag in the W3C trace-context specification (https://www.w3.org/TR/trace-context/#sampled-flag). A non-sampled trace value is still useful as a request correlation identifier. The default is False.", "type": "boolean" } }, diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index f2863fb17e8..c7b791df7ea 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/logging/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // loggingService, err := logging.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // loggingService, err := logging.NewService(ctx, option.WithScopes(logging.LoggingWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // loggingService, err := logging.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // loggingService, err := logging.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package logging // import "google.golang.org/api/logging/v2" import ( @@ -1956,9 +1970,9 @@ type ListLogEntriesRequest struct { OrderBy string `json:"orderBy,omitempty"` // PageSize: Optional. The maximum number of results to return from this - // request. Default is 50. If the value is negative or exceeds 1000, the - // request is rejected. The presence of next_page_token in the response - // indicates that more results might be available. + // request. Default is 50. If the value is negative, the request is + // rejected.The presence of next_page_token in the response indicates + // that more results might be available. PageSize int64 `json:"pageSize,omitempty"` // PageToken: Optional. If present, then retrieve the next batch of @@ -2619,16 +2633,15 @@ type LogEntry struct { // project "my-trace-project" and if the service that is creating the // log entry receives a trace header that includes the trace ID "12345", // then the service should use - // "projects/my-tracing-project/traces/12345".The trace field provides - // the link between logs and traces. By using this field, you can - // navigate from a log entry to a trace. + // "projects/my-trace-project/traces/12345".The trace field provides the + // link between logs and traces. By using this field, you can navigate + // from a log entry to a trace. Trace string `json:"trace,omitempty"` - // TraceSampled: Optional. The sampling decision of the trace associated - // with the log entry.True means that the trace resource name in the - // trace field was sampled for storage in a trace backend. False means - // that the trace was not sampled for storage when this log entry was - // written, or the sampling decision was unknown at the time. A + // TraceSampled: Optional. The sampling decision of the span associated + // with the log entry at the time the log entry was created. This field + // corresponds to the sampled flag in the W3C trace-context + // specification (https://www.w3.org/TR/trace-context/#sampled-flag). A // non-sampled trace value is still useful as a request correlation // identifier. The default is False. TraceSampled bool `json:"traceSampled,omitempty"` diff --git a/managedidentities/v1/managedidentities-gen.go b/managedidentities/v1/managedidentities-gen.go index 46529b70f17..ede413e085b 100644 --- a/managedidentities/v1/managedidentities-gen.go +++ b/managedidentities/v1/managedidentities-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/managed-microsoft-ad/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // managedidentitiesService, err := managedidentities.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // managedidentitiesService, err := managedidentities.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // managedidentitiesService, err := managedidentities.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package managedidentities // import "google.golang.org/api/managedidentities/v1" import ( diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index b22d1229d01..dcb3e24d665 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/managed-microsoft-ad/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // managedidentitiesService, err := managedidentities.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // managedidentitiesService, err := managedidentities.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // managedidentitiesService, err := managedidentities.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package managedidentities // import "google.golang.org/api/managedidentities/v1alpha1" import ( diff --git a/managedidentities/v1beta1/managedidentities-gen.go b/managedidentities/v1beta1/managedidentities-gen.go index 773e3bb8811..2030cb4fa84 100644 --- a/managedidentities/v1beta1/managedidentities-gen.go +++ b/managedidentities/v1beta1/managedidentities-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/managed-microsoft-ad/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // managedidentitiesService, err := managedidentities.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // managedidentitiesService, err := managedidentities.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // managedidentitiesService, err := managedidentities.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package managedidentities // import "google.golang.org/api/managedidentities/v1beta1" import ( diff --git a/manufacturers/v1/manufacturers-api.json b/manufacturers/v1/manufacturers-api.json index ec9efadbb51..3e3a98c9057 100644 --- a/manufacturers/v1/manufacturers-api.json +++ b/manufacturers/v1/manufacturers-api.json @@ -416,7 +416,7 @@ } } }, - "revision": "20230602", + "revision": "20230831", "rootUrl": "https://manufacturers.googleapis.com/", "schemas": { "Attributes": { @@ -643,6 +643,10 @@ "description": "Required. Name of the certification body.", "type": "string" }, + "code": { + "description": "Required. A unique code to identify the certification.", + "type": "string" + }, "link": { "description": "Optional. A URL link to the certification.", "type": "string" @@ -660,7 +664,7 @@ "type": "string" }, "value": { - "description": "Required. A custom value of the certification.", + "description": "Optional. A custom value of the certification.", "type": "string" } }, diff --git a/manufacturers/v1/manufacturers-gen.go b/manufacturers/v1/manufacturers-gen.go index 5d5da4327cf..0705493f044 100644 --- a/manufacturers/v1/manufacturers-gen.go +++ b/manufacturers/v1/manufacturers-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/manufacturers/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // manufacturersService, err := manufacturers.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // manufacturersService, err := manufacturers.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // manufacturersService, err := manufacturers.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package manufacturers // import "google.golang.org/api/manufacturers/v1" import ( @@ -422,6 +435,9 @@ type Certification struct { // Authority: Required. Name of the certification body. Authority string `json:"authority,omitempty"` + // Code: Required. A unique code to identify the certification. + Code string `json:"code,omitempty"` + // Link: Optional. A URL link to the certification. Link string `json:"link,omitempty"` @@ -434,7 +450,7 @@ type Certification struct { // ValidUntil: Optional. The expiration date (UTC). ValidUntil string `json:"validUntil,omitempty"` - // Value: Required. A custom value of the certification. + // Value: Optional. A custom value of the certification. Value string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Authority") to diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index a63e555351b..746cdac6f5f 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/memorystore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // memcacheService, err := memcache.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // memcacheService, err := memcache.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // memcacheService, err := memcache.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package memcache // import "google.golang.org/api/memcache/v1" import ( diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index ea9dfeb85db..5264991478d 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/memorystore/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // memcacheService, err := memcache.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // memcacheService, err := memcache.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // memcacheService, err := memcache.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package memcache // import "google.golang.org/api/memcache/v1beta2" import ( diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 408271d95ab..6befe1ebbe4 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataproc-metastore/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // metastoreService, err := metastore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package metastore // import "google.golang.org/api/metastore/v1" import ( diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index fb61d7e2d4c..bde730d97a3 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataproc-metastore/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // metastoreService, err := metastore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package metastore // import "google.golang.org/api/metastore/v1alpha" import ( diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 036b9fda7b4..a00304df954 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/dataproc-metastore/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // metastoreService, err := metastore.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package metastore // import "google.golang.org/api/metastore/v1beta" import ( diff --git a/migrationcenter/v1/migrationcenter-gen.go b/migrationcenter/v1/migrationcenter-gen.go index 31c35a4c29b..e1d7d0a76b2 100644 --- a/migrationcenter/v1/migrationcenter-gen.go +++ b/migrationcenter/v1/migrationcenter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/migration-center // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // migrationcenterService, err := migrationcenter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // migrationcenterService, err := migrationcenter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // migrationcenterService, err := migrationcenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package migrationcenter // import "google.golang.org/api/migrationcenter/v1" import ( diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 4efb9147383..e778593542c 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/migration-center // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // migrationcenterService, err := migrationcenter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // migrationcenterService, err := migrationcenter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // migrationcenterService, err := migrationcenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package migrationcenter // import "google.golang.org/api/migrationcenter/v1alpha1" import ( diff --git a/ml/v1/ml-gen.go b/ml/v1/ml-gen.go index 4517f2137bb..4540810dfbf 100644 --- a/ml/v1/ml-gen.go +++ b/ml/v1/ml-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ml/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // mlService, err := ml.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // mlService, err := ml.NewService(ctx, option.WithScopes(ml.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mlService, err := ml.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mlService, err := ml.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package ml // import "google.golang.org/api/ml/v1" import ( diff --git a/monitoring/v1/monitoring-api.json b/monitoring/v1/monitoring-api.json index 48656efd426..5f20020862e 100644 --- a/monitoring/v1/monitoring-api.json +++ b/monitoring/v1/monitoring-api.json @@ -753,7 +753,7 @@ } } }, - "revision": "20230813", + "revision": "20230907", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -1621,7 +1621,7 @@ "type": "array" }, "showLabels": { - "description": "Optional. Indicates whether or not the pie chart should slices' labels", + "description": "Optional. Indicates whether or not the pie chart should show slices' labels", "type": "boolean" }, "showTotal": { diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index f22b69f6d87..7391b83c81e 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/monitoring/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // monitoringService, err := monitoring.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // monitoringService, err := monitoring.NewService(ctx, option.WithScopes(monitoring.MonitoringWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // monitoringService, err := monitoring.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // monitoringService, err := monitoring.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package monitoring // import "google.golang.org/api/monitoring/v1" import ( @@ -1827,7 +1841,7 @@ type PieChart struct { DataSets []*PieChartDataSet `json:"dataSets,omitempty"` // ShowLabels: Optional. Indicates whether or not the pie chart should - // slices' labels + // show slices' labels ShowLabels bool `json:"showLabels,omitempty"` // ShowTotal: Optional. Indicates whether or not donut chart should show diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 5a25076d780..21797c76548 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/monitoring/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // monitoringService, err := monitoring.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // monitoringService, err := monitoring.NewService(ctx, option.WithScopes(monitoring.MonitoringWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // monitoringService, err := monitoring.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // monitoringService, err := monitoring.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package monitoring // import "google.golang.org/api/monitoring/v3" import ( diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go index fda4944e280..8360fb6e45c 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinessaccountmanagementService, err := mybusinessaccountmanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinessaccountmanagementService, err := mybusinessaccountmanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinessaccountmanagementService, err := mybusinessaccountmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinessaccountmanagement // import "google.golang.org/api/mybusinessaccountmanagement/v1" import ( diff --git a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go index 7e6505ddf24..3dd0f6b93c0 100644 --- a/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go +++ b/mybusinessbusinessinformation/v1/mybusinessbusinessinformation-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinessbusinessinformationService, err := mybusinessbusinessinformation.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinessbusinessinformationService, err := mybusinessbusinessinformation.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinessbusinessinformationService, err := mybusinessbusinessinformation.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinessbusinessinformation // import "google.golang.org/api/mybusinessbusinessinformation/v1" import ( diff --git a/mybusinesslodging/v1/mybusinesslodging-gen.go b/mybusinesslodging/v1/mybusinesslodging-gen.go index 93e1debb519..ffd15b1c1ca 100644 --- a/mybusinesslodging/v1/mybusinesslodging-gen.go +++ b/mybusinesslodging/v1/mybusinesslodging-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinesslodgingService, err := mybusinesslodging.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinesslodgingService, err := mybusinesslodging.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinesslodgingService, err := mybusinesslodging.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinesslodging // import "google.golang.org/api/mybusinesslodging/v1" import ( diff --git a/mybusinessnotifications/v1/mybusinessnotifications-gen.go b/mybusinessnotifications/v1/mybusinessnotifications-gen.go index 5cd7751a5d5..72d88cb9407 100644 --- a/mybusinessnotifications/v1/mybusinessnotifications-gen.go +++ b/mybusinessnotifications/v1/mybusinessnotifications-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinessnotificationsService, err := mybusinessnotifications.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinessnotificationsService, err := mybusinessnotifications.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinessnotificationsService, err := mybusinessnotifications.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinessnotifications // import "google.golang.org/api/mybusinessnotifications/v1" import ( diff --git a/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go b/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go index 91040be4634..ffc7dc4fa78 100644 --- a/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go +++ b/mybusinessplaceactions/v1/mybusinessplaceactions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinessplaceactionsService, err := mybusinessplaceactions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinessplaceactionsService, err := mybusinessplaceactions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinessplaceactionsService, err := mybusinessplaceactions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinessplaceactions // import "google.golang.org/api/mybusinessplaceactions/v1" import ( diff --git a/mybusinessqanda/v1/mybusinessqanda-gen.go b/mybusinessqanda/v1/mybusinessqanda-gen.go index 997d3b11f13..b2d1c5e02f5 100644 --- a/mybusinessqanda/v1/mybusinessqanda-gen.go +++ b/mybusinessqanda/v1/mybusinessqanda-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinessqandaService, err := mybusinessqanda.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinessqandaService, err := mybusinessqanda.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinessqandaService, err := mybusinessqanda.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinessqanda // import "google.golang.org/api/mybusinessqanda/v1" import ( diff --git a/mybusinessverifications/v1/mybusinessverifications-gen.go b/mybusinessverifications/v1/mybusinessverifications-gen.go index 2a28a32af6b..65de81f6a26 100644 --- a/mybusinessverifications/v1/mybusinessverifications-gen.go +++ b/mybusinessverifications/v1/mybusinessverifications-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/my-business/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // mybusinessverificationsService, err := mybusinessverifications.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // mybusinessverificationsService, err := mybusinessverifications.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // mybusinessverificationsService, err := mybusinessverifications.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package mybusinessverifications // import "google.golang.org/api/mybusinessverifications/v1" import ( diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 45939a6f958..d62d9101a05 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -833,6 +833,99 @@ }, "policyBasedRoutes": { "methods": { + "create": { + "description": "Creates a new PolicyBasedRoute in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource's name of the PolicyBasedRoute.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global$", + "required": true, + "type": "string" + }, + "policyBasedRouteId": { + "description": "Required. Unique id for the Policy Based Route to create.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/policyBasedRoutes", + "request": { + "$ref": "PolicyBasedRoute" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single PolicyBasedRoute.", + "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}", + "httpMethod": "DELETE", + "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the PolicyBasedRoute resource to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single PolicyBasedRoute.", + "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the PolicyBasedRoute resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "PolicyBasedRoute" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}:getIamPolicy", @@ -864,6 +957,52 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Lists PolicyBasedRoutes in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters the results listed in the response.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results per page that should be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/policyBasedRoutes", + "response": { + "$ref": "ListPolicyBasedRoutesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}:setIamPolicy", @@ -2491,7 +2630,7 @@ } } }, - "revision": "20230804", + "revision": "20230816", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptSpokeRequest": { @@ -2617,6 +2756,7 @@ "properties": { "error": { "$ref": "GoogleRpcStatus", + "deprecated": true, "description": "The most recent error during operating this connection." }, "errorInfo": { @@ -2718,6 +2858,37 @@ }, "type": "object" }, + "Filter": { + "description": "Filter matches L4 traffic.", + "id": "Filter", + "properties": { + "destRange": { + "description": "Optional. The destination IP range of outgoing packets that this policy based route applies to. Default is \"0.0.0.0/0\" if protocol version is IPv4.", + "type": "string" + }, + "ipProtocol": { + "description": "Optional. The IP protocol that this policy based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.", + "type": "string" + }, + "protocolVersion": { + "description": "Required. Internet protocol versions this policy based route applies to. For this version, only IPV4 is supported.", + "enum": [ + "PROTOCOL_VERSION_UNSPECIFIED", + "IPV4" + ], + "enumDescriptions": [ + "Default value.", + "The PBR is for IPv4 internet protocol traffic." + ], + "type": "string" + }, + "srcRange": { + "description": "Optional. The source IP range of outgoing packets that this policy based route applies to. Default is \"0.0.0.0/0\" if protocol version is IPv4.", + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", @@ -2827,7 +2998,7 @@ "type": "object" }, "Group": { - "description": "A group is a set of spokes to which you can apply policies. Each group of spokes has its own route table. For each group, you can also set different rules for whether spokes can be automatically attached to the hub.", + "description": "A group represents a subset of spokes attached to a hub.", "id": "Group", "properties": { "createTime": { @@ -2978,6 +3149,17 @@ }, "type": "object" }, + "InterconnectAttachment": { + "description": "InterconnectAttachment to which this route applies to.", + "id": "InterconnectAttachment", + "properties": { + "region": { + "description": "Optional. Cloud region to install this policy based route on interconnect attachment. Use `all` to install it on all interconnect attachments.", + "type": "string" + } + }, + "type": "object" + }, "InternalRange": { "description": "The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it.", "id": "InternalRange", @@ -3290,6 +3472,31 @@ }, "type": "object" }, + "ListPolicyBasedRoutesResponse": { + "description": "Response for PolicyBasedRouting.ListPolicyBasedRoutes method.", + "id": "ListPolicyBasedRoutesResponse", + "properties": { + "nextPageToken": { + "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", + "type": "string" + }, + "policyBasedRoutes": { + "description": "Policy based routes to be returned.", + "items": { + "$ref": "PolicyBasedRoute" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListRouteTablesResponse": { "description": "Response for HubService.ListRouteTables method.", "id": "ListRouteTablesResponse", @@ -3608,6 +3815,95 @@ }, "type": "object" }, + "PolicyBasedRoute": { + "description": "Policy Based Routes (PBR) are more powerful routes that allows GCP customers to route their L4 network traffic based on not just destination IP, but also source IP, protocol and more. A PBR always take precedence when it conflicts with other types of routes. Next id: 22", + "id": "PolicyBasedRoute", + "properties": { + "createTime": { + "description": "Output only. Time when the PolicyBasedRoute was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. An optional description of this resource. Provide this field when you create the resource.", + "type": "string" + }, + "filter": { + "$ref": "Filter", + "description": "Required. The filter to match L4 traffic." + }, + "interconnectAttachment": { + "$ref": "InterconnectAttachment", + "description": "Optional. The interconnect attachments to which this route applies to." + }, + "kind": { + "description": "Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for Policy Based Route resources.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels.", + "type": "object" + }, + "name": { + "description": "Immutable. A unique name of the resource in the form of `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`", + "type": "string" + }, + "network": { + "description": "Required. Fully-qualified URL of the network that this route applies to. e.g. projects/my-project/global/networks/my-network.", + "type": "string" + }, + "nextHopIlbIp": { + "description": "Optional. The IP of a global access enabled L4 ILB that should be the next hop to handle matching packets. For this version, only next_hop_ilb_ip is supported.", + "type": "string" + }, + "nextHopOtherRoutes": { + "description": "Optional. Other routes that will be referenced to determine the next hop of the packet.", + "enum": [ + "OTHER_ROUTES_UNSPECIFIED", + "DEFAULT_ROUTING" + ], + "enumDescriptions": [ + "Default value.", + "Use the routes from the default routing tables (system-generated routes, custom routes, peering route) to determine the next hop. This will effectively exclude matching packets being applied on other PBRs with a lower priority." + ], + "type": "string" + }, + "priority": { + "description": "Optional. The priority of this policy based route. Priority is used to break ties in cases where there are more than one matching policy based routes found. In cases where multiple policy based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.", + "format": "int32", + "type": "integer" + }, + "selfLink": { + "description": "Output only. Server-defined fully-qualified URL for this resource.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when the PolicyBasedRoute was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "virtualMachine": { + "$ref": "VirtualMachine", + "description": "Optional. VM instances to which this policy based route applies to." + }, + "warnings": { + "description": "Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.", + "items": { + "$ref": "Warnings" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ProducerPscConfig": { "description": "The PSC configurations on producer side.", "id": "ProducerPscConfig", @@ -3656,6 +3952,7 @@ }, "error": { "$ref": "GoogleRpcStatus", + "deprecated": true, "description": "The most recent error during operating this connection." }, "errorInfo": { @@ -4201,7 +4498,7 @@ "type": "string" }, "group": { - "description": "The name of the group that this spoke is associated with.", + "description": "Optional. The name of the group that this spoke is associated with.", "type": "string" }, "hub": { @@ -4498,6 +4795,55 @@ } }, "type": "object" + }, + "VirtualMachine": { + "description": "VM instances to which this policy based route applies to.", + "id": "VirtualMachine", + "properties": { + "tags": { + "description": "Optional. A list of VM instance tags to which this policy based route applies to. VM instances that have ANY of tags specified here will install this PBR.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Warnings": { + "description": "Informational warning message.", + "id": "Warnings", + "properties": { + "code": { + "description": "Output only. A warning code, if applicable.", + "enum": [ + "WARNING_UNSPECIFIED", + "RESOURCE_NOT_ACTIVE", + "RESOURCE_BEING_MODIFIED" + ], + "enumDescriptions": [ + "Default value.", + "The policy based route is not active and functioning. Common causes are the dependent network was deleted or the resource project was turned off.", + "The policy based route is being modified (e.g. created/deleted) at this time." + ], + "readOnly": true, + "type": "string" + }, + "data": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.", + "readOnly": true, + "type": "object" + }, + "warningMessage": { + "description": "Output only. A human-readable description of the warning code.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index c4589b0a4be..b01ffc4fb04 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networkconnectivityService, err := networkconnectivity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networkconnectivityService, err := networkconnectivity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networkconnectivityService, err := networkconnectivity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networkconnectivity // import "google.golang.org/api/networkconnectivity/v1" import ( @@ -744,6 +757,54 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Filter: Filter matches L4 traffic. +type Filter struct { + // DestRange: Optional. The destination IP range of outgoing packets + // that this policy based route applies to. Default is "0.0.0.0/0" if + // protocol version is IPv4. + DestRange string `json:"destRange,omitempty"` + + // IpProtocol: Optional. The IP protocol that this policy based route + // applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is + // 'ALL'. + IpProtocol string `json:"ipProtocol,omitempty"` + + // ProtocolVersion: Required. Internet protocol versions this policy + // based route applies to. For this version, only IPV4 is supported. + // + // Possible values: + // "PROTOCOL_VERSION_UNSPECIFIED" - Default value. + // "IPV4" - The PBR is for IPv4 internet protocol traffic. + ProtocolVersion string `json:"protocolVersion,omitempty"` + + // SrcRange: Optional. The source IP range of outgoing packets that this + // policy based route applies to. Default is "0.0.0.0/0" if protocol + // version is IPv4. + SrcRange string `json:"srcRange,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DestRange") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DestRange") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Filter) MarshalJSON() ([]byte, error) { + type NoMethod Filter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -951,10 +1012,7 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Group: A group is a set of spokes to which you can apply policies. -// Each group of spokes has its own route table. For each group, you can -// also set different rules for whether spokes can be automatically -// attached to the hub. +// Group: A group represents a subset of spokes attached to a hub. type Group struct { // CreateTime: Output only. The time the group was created. CreateTime string `json:"createTime,omitempty"` @@ -1119,6 +1177,37 @@ func (s *Hub) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectAttachment: InterconnectAttachment to which this route +// applies to. +type InterconnectAttachment struct { + // Region: Optional. Cloud region to install this policy based route on + // interconnect attachment. Use `all` to install it on all interconnect + // attachments. + Region string `json:"region,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Region") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Region") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectAttachment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InternalRange: The internal range resource for IPAM operations within // a VPC network. Used to represent a private address range along with // behavioral characterstics of that range (its usage and peering @@ -1618,6 +1707,47 @@ func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListPolicyBasedRoutesResponse: Response for +// PolicyBasedRouting.ListPolicyBasedRoutes method. +type ListPolicyBasedRoutesResponse struct { + // NextPageToken: The next pagination token in the List response. It + // should be used as page_token for the following request. An empty + // value means no more result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // PolicyBasedRoutes: Policy based routes to be returned. + PolicyBasedRoutes []*PolicyBasedRoute `json:"policyBasedRoutes,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListPolicyBasedRoutesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPolicyBasedRoutesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListRouteTablesResponse: Response for HubService.ListRouteTables // method. type ListRouteTablesResponse struct { @@ -2178,6 +2308,109 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PolicyBasedRoute: Policy Based Routes (PBR) are more powerful routes +// that allows GCP customers to route their L4 network traffic based on +// not just destination IP, but also source IP, protocol and more. A PBR +// always take precedence when it conflicts with other types of routes. +// Next id: 22 +type PolicyBasedRoute struct { + // CreateTime: Output only. Time when the PolicyBasedRoute was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: Optional. An optional description of this resource. + // Provide this field when you create the resource. + Description string `json:"description,omitempty"` + + // Filter: Required. The filter to match L4 traffic. + Filter *Filter `json:"filter,omitempty"` + + // InterconnectAttachment: Optional. The interconnect attachments to + // which this route applies to. + InterconnectAttachment *InterconnectAttachment `json:"interconnectAttachment,omitempty"` + + // Kind: Output only. Type of this resource. Always + // networkconnectivity#policyBasedRoute for Policy Based Route + // resources. + Kind string `json:"kind,omitempty"` + + // Labels: User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. A unique name of the resource in the form of + // `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_ + // based_route_id}` + Name string `json:"name,omitempty"` + + // Network: Required. Fully-qualified URL of the network that this route + // applies to. e.g. projects/my-project/global/networks/my-network. + Network string `json:"network,omitempty"` + + // NextHopIlbIp: Optional. The IP of a global access enabled L4 ILB that + // should be the next hop to handle matching packets. For this version, + // only next_hop_ilb_ip is supported. + NextHopIlbIp string `json:"nextHopIlbIp,omitempty"` + + // NextHopOtherRoutes: Optional. Other routes that will be referenced to + // determine the next hop of the packet. + // + // Possible values: + // "OTHER_ROUTES_UNSPECIFIED" - Default value. + // "DEFAULT_ROUTING" - Use the routes from the default routing tables + // (system-generated routes, custom routes, peering route) to determine + // the next hop. This will effectively exclude matching packets being + // applied on other PBRs with a lower priority. + NextHopOtherRoutes string `json:"nextHopOtherRoutes,omitempty"` + + // Priority: Optional. The priority of this policy based route. Priority + // is used to break ties in cases where there are more than one matching + // policy based routes found. In cases where multiple policy based + // routes are matched, the one with the lowest-numbered priority value + // wins. The default value is 1000. The priority value must be from 1 to + // 65535, inclusive. + Priority int64 `json:"priority,omitempty"` + + // SelfLink: Output only. Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + + // UpdateTime: Output only. Time when the PolicyBasedRoute was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // VirtualMachine: Optional. VM instances to which this policy based + // route applies to. + VirtualMachine *VirtualMachine `json:"virtualMachine,omitempty"` + + // Warnings: Output only. If potential misconfigurations are detected + // for this route, this field will be populated with warning messages. + Warnings []*Warnings `json:"warnings,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PolicyBasedRoute) MarshalJSON() ([]byte, error) { + type NoMethod PolicyBasedRoute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ProducerPscConfig: The PSC configurations on producer side. type ProducerPscConfig struct { // ServiceAttachmentUri: The resource path of a service attachment. @@ -2949,7 +3182,8 @@ type Spoke struct { // Description: An optional description of the spoke. Description string `json:"description,omitempty"` - // Group: The name of the group that this spoke is associated with. + // Group: Optional. The name of the group that this spoke is associated + // with. Group string `json:"group,omitempty"` // Hub: Immutable. The name of the hub that this spoke is attached to. @@ -3331,6 +3565,85 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VirtualMachine: VM instances to which this policy based route applies +// to. +type VirtualMachine struct { + // Tags: Optional. A list of VM instance tags to which this policy based + // route applies to. VM instances that have ANY of tags specified here + // will install this PBR. + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Tags") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Tags") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VirtualMachine) MarshalJSON() ([]byte, error) { + type NoMethod VirtualMachine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Warnings: Informational warning message. +type Warnings struct { + // Code: Output only. A warning code, if applicable. + // + // Possible values: + // "WARNING_UNSPECIFIED" - Default value. + // "RESOURCE_NOT_ACTIVE" - The policy based route is not active and + // functioning. Common causes are the dependent network was deleted or + // the resource project was turned off. + // "RESOURCE_BEING_MODIFIED" - The policy based route is being + // modified (e.g. created/deleted) at this time. + Code string `json:"code,omitempty"` + + // Data: Output only. Metadata about this warning in key: value format. + // The key should provides more detail on the warning being returned. + // For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key + // value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement. + Data map[string]string `json:"data,omitempty"` + + // WarningMessage: Output only. A human-readable description of the + // warning code. + WarningMessage string `json:"warningMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Warnings) MarshalJSON() ([]byte, error) { + type NoMethod Warnings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "networkconnectivity.projects.locations.get": type ProjectsLocationsGetCall struct { @@ -6868,111 +7181,590 @@ func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Pages(ctx context } } -// method id "networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy": +// method id "networkconnectivity.projects.locations.global.policyBasedRoutes.create": -type ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalPolicyBasedRoutesCreateCall struct { + s *Service + parent string + policybasedroute *PolicyBasedRoute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// Create: Creates a new PolicyBasedRoute in a given project and +// location. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) GetIamPolicy(resource string) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { - c := &ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The parent resource's name of the PolicyBasedRoute. +func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) Create(parent string, policybasedroute *PolicyBasedRoute) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall { + c := &ProjectsLocationsGlobalPolicyBasedRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.policybasedroute = policybasedroute return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// PolicyBasedRouteId sets the optional parameter "policyBasedRouteId": +// Required. Unique id for the Policy Based Route to create. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) PolicyBasedRouteId(policyBasedRouteId string) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall { + c.urlParams_.Set("policyBasedRouteId", policyBasedRouteId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall { + c.urlParams_.Set("requestId", requestId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.policybasedroute) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policyBasedRoutes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy" call. +// Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new PolicyBasedRoute in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource's name of the PolicyBasedRoute.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global$", + // "required": true, + // "type": "string" + // }, + // "policyBasedRouteId": { + // "description": "Required. Unique id for the Policy Based Route to create.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/policyBasedRoutes", + // "request": { + // "$ref": "PolicyBasedRoute" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.global.policyBasedRoutes.delete": + +type ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single PolicyBasedRoute. +// +// - name: Name of the PolicyBasedRoute resource to delete. +func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) Delete(name string) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall { + c := &ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and the +// request times out. If you make the request again with the same +// request ID, the server can check if original operation with the same +// request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate +// commitments. The request ID must be a valid UUID with the exception +// that zero UUID is not supported +// (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) RequestId(requestId string) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a single PolicyBasedRoute.", + // "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the PolicyBasedRoute resource to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.global.policyBasedRoutes.get": + +type ProjectsLocationsGlobalPolicyBasedRoutesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single PolicyBasedRoute. +// +// - name: Name of the PolicyBasedRoute resource to get. +func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) Get(name string) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall { + c := &ProjectsLocationsGlobalPolicyBasedRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.get" call. +// Exactly one of *PolicyBasedRoute or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *PolicyBasedRoute.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Do(opts ...googleapi.CallOption) (*PolicyBasedRoute, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &PolicyBasedRoute{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details of a single PolicyBasedRoute.", + // "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the PolicyBasedRoute resource to get.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "PolicyBasedRoute" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy": + +type ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) GetIamPolicy(resource string) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { + c := &ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy" call. // Exactly one of *Policy or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Policy.ServerResponse.Header or (if a response was returned at all) @@ -7043,6 +7835,221 @@ func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Do(opts ...go } +// method id "networkconnectivity.projects.locations.global.policyBasedRoutes.list": + +type ProjectsLocationsGlobalPolicyBasedRoutesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists PolicyBasedRoutes in a given project and location. +// +// - parent: The parent resource's name. +func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) List(parent string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c := &ProjectsLocationsGlobalPolicyBasedRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Filter(filter string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policyBasedRoutes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.list" call. +// Exactly one of *ListPolicyBasedRoutesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListPolicyBasedRoutesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Do(opts ...googleapi.CallOption) (*ListPolicyBasedRoutesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListPolicyBasedRoutesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists PolicyBasedRoutes in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.global.policyBasedRoutes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters the results listed in the response.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results per page that should be returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/policyBasedRoutes", + // "response": { + // "$ref": "ListPolicyBasedRoutesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Pages(ctx context.Context, f func(*ListPolicyBasedRoutesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "networkconnectivity.projects.locations.global.policyBasedRoutes.setIamPolicy": type ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall struct { diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 0f11f8b519f..f9b76687997 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networkconnectivityService, err := networkconnectivity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networkconnectivityService, err := networkconnectivity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networkconnectivityService, err := networkconnectivity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networkconnectivity // import "google.golang.org/api/networkconnectivity/v1alpha1" import ( diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index f7cced71091..60e87914b64 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networkmanagementService, err := networkmanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networkmanagementService, err := networkmanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networkmanagementService, err := networkmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networkmanagement // import "google.golang.org/api/networkmanagement/v1" import ( diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 0c31dfe7728..b0cec950182 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networkmanagementService, err := networkmanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networkmanagementService, err := networkmanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networkmanagementService, err := networkmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networkmanagement // import "google.golang.org/api/networkmanagement/v1beta1" import ( diff --git a/networksecurity/v1/networksecurity-api.json b/networksecurity/v1/networksecurity-api.json index 8e44d3c6f55..a4c7969a0af 100644 --- a/networksecurity/v1/networksecurity-api.json +++ b/networksecurity/v1/networksecurity-api.json @@ -2474,7 +2474,7 @@ } } }, - "revision": "20230710", + "revision": "20230814", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -2948,7 +2948,7 @@ "type": "object" }, "GoogleIamV1Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "GoogleIamV1Policy", "properties": { "auditConfigs": { @@ -3374,7 +3374,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/networksecurity/v1/networksecurity-gen.go b/networksecurity/v1/networksecurity-gen.go index b45f2b7ba1a..651d47ef4ab 100644 --- a/networksecurity/v1/networksecurity-gen.go +++ b/networksecurity/v1/networksecurity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/networking // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networksecurityService, err := networksecurity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networksecurityService, err := networksecurity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networksecurityService, err := networksecurity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networksecurity // import "google.golang.org/api/networksecurity/v1" import ( @@ -1146,7 +1159,7 @@ func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1155,17 +1168,17 @@ func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type GoogleIamV1Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -2001,8 +2014,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index 7634a4b5aec..516abbdbed8 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -3162,7 +3162,7 @@ } } }, - "revision": "20230719", + "revision": "20230814", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3766,7 +3766,7 @@ "type": "object" }, "GoogleIamV1Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "GoogleIamV1Policy", "properties": { "auditConfigs": { @@ -4278,7 +4278,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 890b0119cc9..b7b3aa6adfa 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/networking // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networksecurityService, err := networksecurity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networksecurityService, err := networksecurity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networksecurityService, err := networksecurity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networksecurity // import "google.golang.org/api/networksecurity/v1beta1" import ( @@ -1323,7 +1336,7 @@ func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1332,17 +1345,17 @@ func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type GoogleIamV1Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -2339,8 +2352,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 75fa931462c..b6fc1edac01 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -2148,7 +2148,7 @@ } } }, - "revision": "20230807", + "revision": "20230814", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -3887,6 +3887,13 @@ }, "type": "array" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the TlsRoute resource.", + "type": "object" + }, "meshes": { "description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", "items": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index 34aaa23527b..991c9df485b 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/networking // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networkservicesService, err := networkservices.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networkservicesService, err := networkservices.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networkservicesService, err := networkservices.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networkservices // import "google.golang.org/api/networkservices/v1" import ( @@ -3392,6 +3405,10 @@ type TlsRoute struct { // pattern: `projects/*/locations/global/gateways/` Gateways []string `json:"gateways,omitempty"` + // Labels: Optional. Set of label tags associated with the TlsRoute + // resource. + Labels map[string]string `json:"labels,omitempty"` + // Meshes: Optional. Meshes defines a list of meshes this TlsRoute is // attached to, as one of the routing rules to route the requests served // by the mesh. Each mesh reference should match the pattern: diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 14b176b4098..51d064e7fbd 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2119,7 +2119,7 @@ } } }, - "revision": "20230807", + "revision": "20230814", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -3959,6 +3959,13 @@ }, "type": "array" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the TlsRoute resource.", + "type": "object" + }, "meshes": { "description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", "items": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 9a56eab4337..948985c245c 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/networking // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // networkservicesService, err := networkservices.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // networkservicesService, err := networkservices.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // networkservicesService, err := networkservices.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package networkservices // import "google.golang.org/api/networkservices/v1beta1" import ( @@ -3559,6 +3572,10 @@ type TlsRoute struct { // pattern: `projects/*/locations/global/gateways/` Gateways []string `json:"gateways,omitempty"` + // Labels: Optional. Set of label tags associated with the TlsRoute + // resource. + Labels map[string]string `json:"labels,omitempty"` + // Meshes: Optional. Meshes defines a list of meshes this TlsRoute is // attached to, as one of the routing rules to route the requests served // by the mesh. Each mesh reference should match the pattern: diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index b5805364a31..d30c251196e 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/notebooks/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // notebooksService, err := notebooks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // notebooksService, err := notebooks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // notebooksService, err := notebooks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package notebooks // import "google.golang.org/api/notebooks/v1" import ( diff --git a/notebooks/v2/notebooks-gen.go b/notebooks/v2/notebooks-gen.go index dbaafa5b236..67ed5b53f64 100644 --- a/notebooks/v2/notebooks-gen.go +++ b/notebooks/v2/notebooks-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/notebooks/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // notebooksService, err := notebooks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // notebooksService, err := notebooks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // notebooksService, err := notebooks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package notebooks // import "google.golang.org/api/notebooks/v2" import ( diff --git a/oauth2/v2/oauth2-gen.go b/oauth2/v2/oauth2-gen.go index b42663df303..cbe8cb12431 100644 --- a/oauth2/v2/oauth2-gen.go +++ b/oauth2/v2/oauth2-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/identity/protocols/oauth2/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // oauth2Service, err := oauth2.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // oauth2Service, err := oauth2.NewService(ctx, option.WithScopes(oauth2.OpenIDScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // oauth2Service, err := oauth2.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // oauth2Service, err := oauth2.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package oauth2 // import "google.golang.org/api/oauth2/v2" import ( diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index 1275cb0960c..d6c21de7615 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-analysis/docs/on-demand-scanning/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // ondemandscanningService, err := ondemandscanning.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // ondemandscanningService, err := ondemandscanning.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // ondemandscanningService, err := ondemandscanning.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package ondemandscanning // import "google.golang.org/api/ondemandscanning/v1" import ( diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index d567d1d2fdf..4aac388eb5c 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/container-analysis/docs/on-demand-scanning/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // ondemandscanningService, err := ondemandscanning.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // ondemandscanningService, err := ondemandscanning.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // ondemandscanningService, err := ondemandscanning.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package ondemandscanning // import "google.golang.org/api/ondemandscanning/v1beta1" import ( diff --git a/orgpolicy/v2/orgpolicy-gen.go b/orgpolicy/v2/orgpolicy-gen.go index ca533d40ca9..6cdaed20f40 100644 --- a/orgpolicy/v2/orgpolicy-gen.go +++ b/orgpolicy/v2/orgpolicy-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/orgpolicy/docs/reference/rest/index.html // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // orgpolicyService, err := orgpolicy.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // orgpolicyService, err := orgpolicy.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // orgpolicyService, err := orgpolicy.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package orgpolicy // import "google.golang.org/api/orgpolicy/v2" import ( diff --git a/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index 1be1e7b6f1f..29ca6933bff 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -1000,7 +1000,7 @@ } } }, - "revision": "20230806", + "revision": "20230903", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { @@ -1912,10 +1912,6 @@ "description": "Policy description. Length of the description is limited to 1024 characters.", "type": "string" }, - "fingerprint": { - "description": "OSPolicy fingerprint (checksum)", - "type": "string" - }, "id": { "description": "Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.", "type": "string" diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index 1536b0efe14..8b28868efde 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/compute/docs/osconfig/rest // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // osconfigService, err := osconfig.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // osconfigService, err := osconfig.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // osconfigService, err := osconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package osconfig // import "google.golang.org/api/osconfig/v1" import ( @@ -1668,9 +1681,6 @@ type OSPolicy struct { // to 1024 characters. Description string `json:"description,omitempty"` - // Fingerprint: OSPolicy fingerprint (checksum) - Fingerprint string `json:"fingerprint,omitempty"` - // Id: Required. The id of the OS policy with the following // restrictions: * Must contain only lowercase letters, numbers, and // hyphens. * Must start with a letter. * Must be between 1-63 diff --git a/osconfig/v1alpha/osconfig-gen.go b/osconfig/v1alpha/osconfig-gen.go index cbad9e741a1..6754241585e 100644 --- a/osconfig/v1alpha/osconfig-gen.go +++ b/osconfig/v1alpha/osconfig-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/compute/docs/osconfig/rest // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // osconfigService, err := osconfig.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // osconfigService, err := osconfig.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // osconfigService, err := osconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package osconfig // import "google.golang.org/api/osconfig/v1alpha" import ( diff --git a/osconfig/v1beta/osconfig-gen.go b/osconfig/v1beta/osconfig-gen.go index 738cef47350..5751bb12e2d 100644 --- a/osconfig/v1beta/osconfig-gen.go +++ b/osconfig/v1beta/osconfig-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/compute/docs/osconfig/rest // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // osconfigService, err := osconfig.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // osconfigService, err := osconfig.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // osconfigService, err := osconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package osconfig // import "google.golang.org/api/osconfig/v1beta" import ( diff --git a/oslogin/v1/oslogin-gen.go b/oslogin/v1/oslogin-gen.go index f8322af521f..aee4f266c0a 100644 --- a/oslogin/v1/oslogin-gen.go +++ b/oslogin/v1/oslogin-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/compute/docs/oslogin/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // osloginService, err := oslogin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // osloginService, err := oslogin.NewService(ctx, option.WithScopes(oslogin.ComputeReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // osloginService, err := oslogin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // osloginService, err := oslogin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package oslogin // import "google.golang.org/api/oslogin/v1" import ( diff --git a/oslogin/v1alpha/oslogin-gen.go b/oslogin/v1alpha/oslogin-gen.go index 685c84aabd7..166d505634a 100644 --- a/oslogin/v1alpha/oslogin-gen.go +++ b/oslogin/v1alpha/oslogin-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/compute/docs/oslogin/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // osloginService, err := oslogin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // osloginService, err := oslogin.NewService(ctx, option.WithScopes(oslogin.ComputeReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // osloginService, err := oslogin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // osloginService, err := oslogin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package oslogin // import "google.golang.org/api/oslogin/v1alpha" import ( diff --git a/oslogin/v1beta/oslogin-gen.go b/oslogin/v1beta/oslogin-gen.go index ee704f9bbea..b0de03acc9f 100644 --- a/oslogin/v1beta/oslogin-gen.go +++ b/oslogin/v1beta/oslogin-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/compute/docs/oslogin/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // osloginService, err := oslogin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // osloginService, err := oslogin.NewService(ctx, option.WithScopes(oslogin.ComputeReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // osloginService, err := oslogin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // osloginService, err := oslogin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package oslogin // import "google.golang.org/api/oslogin/v1beta" import ( diff --git a/pagespeedonline/v5/pagespeedonline-gen.go b/pagespeedonline/v5/pagespeedonline-gen.go index caf403fe33f..82ab7b23fe6 100644 --- a/pagespeedonline/v5/pagespeedonline-gen.go +++ b/pagespeedonline/v5/pagespeedonline-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/speed/docs/insights/v5/about // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // pagespeedonlineService, err := pagespeedonline.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // pagespeedonlineService, err := pagespeedonline.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // pagespeedonlineService, err := pagespeedonline.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package pagespeedonline // import "google.golang.org/api/pagespeedonline/v5" import ( diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json index f3a8ecb967f..4484ce2e04c 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-api.json +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-api.json @@ -396,7 +396,7 @@ } } }, - "revision": "20230813", + "revision": "20230906", "rootUrl": "https://paymentsresellersubscription.googleapis.com/", "schemas": { "GoogleCloudPaymentsResellerSubscriptionV1Amount": { @@ -805,10 +805,6 @@ "format": "google-datetime", "type": "string" }, - "finiteBillingCycleDetails": { - "$ref": "GoogleCloudPaymentsResellerSubscriptionV1FiniteBillingCycleDetails", - "description": "Optional. Details for a subscription line item with finite billing cycles. If unset, the line item will be charged indefinitely. Used only with PROMOTION_TYPE_REGULAR_REDUCTION." - }, "freeTrialDuration": { "$ref": "GoogleCloudPaymentsResellerSubscriptionV1Duration", "description": "Optional. Specifies the duration of the free trial of the subscription when promotion_type is PROMOTION_TYPE_FREE_TRIAL" @@ -827,14 +823,12 @@ "enum": [ "PROMOTION_TYPE_UNSPECIFIED", "PROMOTION_TYPE_FREE_TRIAL", - "PROMOTION_TYPE_INTRODUCTORY_PRICING", - "PROMOTION_TYPE_REGULAR_REDUCTION" + "PROMOTION_TYPE_INTRODUCTORY_PRICING" ], "enumDescriptions": [ "The promotion type is unspecified.", "The promotion is a free trial.", - "The promotion is a reduced introductory pricing.", - "The promotion is a reduced price." + "The promotion is a reduced introductory pricing." ], "readOnly": true, "type": "string" @@ -1221,14 +1215,12 @@ "enum": [ "PROMOTION_TYPE_UNSPECIFIED", "PROMOTION_TYPE_FREE_TRIAL", - "PROMOTION_TYPE_INTRODUCTORY_PRICING", - "PROMOTION_TYPE_REGULAR_REDUCTION" + "PROMOTION_TYPE_INTRODUCTORY_PRICING" ], "enumDescriptions": [ "The promotion type is unspecified.", "The promotion is a free trial.", - "The promotion is a reduced introductory pricing.", - "The promotion is a reduced price." + "The promotion is a reduced introductory pricing." ], "readOnly": true, "type": "string" diff --git a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go index 0235dc6e7d3..0a38a6ef934 100644 --- a/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go +++ b/paymentsresellersubscription/v1/paymentsresellersubscription-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/payments/reseller/subscription/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // paymentsresellersubscriptionService, err := paymentsresellersubscription.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // paymentsresellersubscriptionService, err := paymentsresellersubscription.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // paymentsresellersubscriptionService, err := paymentsresellersubscription.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package paymentsresellersubscription // import "google.golang.org/api/paymentsresellersubscription/v1" import ( @@ -905,12 +918,6 @@ type GoogleCloudPaymentsResellerSubscriptionV1Promotion struct { // available indefinitely. EndTime string `json:"endTime,omitempty"` - // FiniteBillingCycleDetails: Optional. Details for a subscription line - // item with finite billing cycles. If unset, the line item will be - // charged indefinitely. Used only with - // PROMOTION_TYPE_REGULAR_REDUCTION. - FiniteBillingCycleDetails *GoogleCloudPaymentsResellerSubscriptionV1FiniteBillingCycleDetails `json:"finiteBillingCycleDetails,omitempty"` - // FreeTrialDuration: Optional. Specifies the duration of the free trial // of the subscription when promotion_type is PROMOTION_TYPE_FREE_TRIAL FreeTrialDuration *GoogleCloudPaymentsResellerSubscriptionV1Duration `json:"freeTrialDuration,omitempty"` @@ -933,8 +940,6 @@ type GoogleCloudPaymentsResellerSubscriptionV1Promotion struct { // "PROMOTION_TYPE_FREE_TRIAL" - The promotion is a free trial. // "PROMOTION_TYPE_INTRODUCTORY_PRICING" - The promotion is a reduced // introductory pricing. - // "PROMOTION_TYPE_REGULAR_REDUCTION" - The promotion is a reduced - // price. PromotionType string `json:"promotionType,omitempty"` // RegionCodes: Output only. 2-letter ISO region code where the @@ -1434,8 +1439,6 @@ type GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec struct { // "PROMOTION_TYPE_FREE_TRIAL" - The promotion is a free trial. // "PROMOTION_TYPE_INTRODUCTORY_PRICING" - The promotion is a reduced // introductory pricing. - // "PROMOTION_TYPE_REGULAR_REDUCTION" - The promotion is a reduced - // price. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "FreeTrialDuration") diff --git a/people/v1/people-gen.go b/people/v1/people-gen.go index 97e85cd8160..92d10ae0d62 100644 --- a/people/v1/people-gen.go +++ b/people/v1/people-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/people/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // peopleService, err := people.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // peopleService, err := people.NewService(ctx, option.WithScopes(people.UserinfoProfileScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // peopleService, err := people.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // peopleService, err := people.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package people // import "google.golang.org/api/people/v1" import ( diff --git a/places/v1/places-api.json b/places/v1/places-api.json index d3c0cfdff60..f53e36a7a33 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -160,7 +160,7 @@ } } }, - "revision": "20230806", + "revision": "20230906", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -216,23 +216,6 @@ }, "type": "object" }, - "GoogleMapsPlacesV1Int32Range": { - "description": "int 32 range. Both min and max are optional. If only min is set, then the range only has a lower bound. If only max is set, then range only has an upper bound. At least one of min and max must be set. Values are inclusive.", - "id": "GoogleMapsPlacesV1Int32Range", - "properties": { - "max": { - "description": "Upper bound. If unset, behavior is documented on the range field.", - "format": "int32", - "type": "integer" - }, - "min": { - "description": "Lower bound. If unset, behavior is documented on the range field.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleMapsPlacesV1Place": { "description": "All the information representing a Place.", "id": "GoogleMapsPlacesV1Place", @@ -487,7 +470,8 @@ "type": "string" }, "wheelchairAccessibleEntrance": { - "description": "Output only. Specifies if the place has an entrance that is wheelchair-accessible.", + "deprecated": true, + "description": "Output only. [Deprecated!] Specifies if the place has an entrance that is wheelchair-accessible.", "readOnly": true, "type": "boolean" } @@ -640,12 +624,6 @@ "description": "Output only. Date in the local timezone for the place.", "readOnly": true }, - "dateDeprecated": { - "deprecated": true, - "description": "Output only. Date of the endpoint expressed in RFC3339 format in the local timezone for the place. For example 2010-12-31.", - "readOnly": true, - "type": "string" - }, "day": { "description": "Output only. A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is Monday, etc.", "format": "int32", @@ -752,11 +730,6 @@ "description": "Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.", "type": "string" }, - "location": { - "$ref": "GoogleMapsPlacesV1SearchTextRequestLocation", - "deprecated": true, - "description": "[Deprecated!]The region to search. Setting location would usually yields better results. Recommended to set. This location serves as a bias unless strict_restriction is set to true, which turns the location to a strict restriction." - }, "locationBias": { "$ref": "GoogleMapsPlacesV1SearchTextRequestLocationBias", "description": "The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with location_restriction." @@ -802,11 +775,6 @@ }, "type": "array" }, - "priceRange": { - "$ref": "GoogleMapsPlacesV1Int32Range", - "deprecated": true, - "description": "[Deprecated!]Used to restrict the search to places that are within a certain price range. This is on a scale of 0 to 4. Set a minimum of 0 or set a maximum of 4 has no effect on the search results. Min price is default to 0 and max price is default to 4. Default value will be used if either min or max is unset." - }, "rankPreference": { "description": "How results will be ranked in the response.", "enum": [ @@ -822,7 +790,7 @@ "type": "string" }, "regionCode": { - "description": "The Unicode country/region code (CLDR) of the location where the request is coming from. It is used to display the place details, like region-specific place name, if available. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag. Note that 3-digit region codes are not currently supported.", + "description": "The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag. Note that 3-digit region codes are not currently supported.", "type": "string" }, "strictTypeFiltering": { @@ -836,21 +804,6 @@ }, "type": "object" }, - "GoogleMapsPlacesV1SearchTextRequestLocation": { - "description": "[Deprecated!]The region to search.", - "id": "GoogleMapsPlacesV1SearchTextRequestLocation", - "properties": { - "rectangle": { - "$ref": "GoogleGeoTypeViewport", - "description": "A rectangle box defined by northeast and southwest corner." - }, - "strictRestriction": { - "description": "Make location field a strict restriction and filter out POIs outside of the given location. If location type field is unset this field will have no effect.", - "type": "boolean" - } - }, - "type": "object" - }, "GoogleMapsPlacesV1SearchTextRequestLocationBias": { "description": "The region to search. This location serves as a bias which means results around given location might be returned.", "id": "GoogleMapsPlacesV1SearchTextRequestLocationBias", diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index 1ebd51d8dda..1929834a954 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://mapsplatform.google.com/maps-products/#places-section // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // placesService, err := places.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // placesService, err := places.NewService(ctx, option.WithScopes(places.MapsPlatformPlacesTextsearchScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // placesService, err := places.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // placesService, err := places.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package places // import "google.golang.org/api/places/v1" import ( @@ -304,42 +318,6 @@ func (s *GoogleMapsPlacesV1Circle) UnmarshalJSON(data []byte) error { return nil } -// GoogleMapsPlacesV1Int32Range: int 32 range. Both min and max are -// optional. If only min is set, then the range only has a lower bound. -// If only max is set, then range only has an upper bound. At least one -// of min and max must be set. Values are inclusive. -type GoogleMapsPlacesV1Int32Range struct { - // Max: Upper bound. If unset, behavior is documented on the range - // field. - Max int64 `json:"max,omitempty"` - - // Min: Lower bound. If unset, behavior is documented on the range - // field. - Min int64 `json:"min,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Max") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Max") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleMapsPlacesV1Int32Range) MarshalJSON() ([]byte, error) { - type NoMethod GoogleMapsPlacesV1Int32Range - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleMapsPlacesV1Place: All the information representing a Place. type GoogleMapsPlacesV1Place struct { // AddressComponents: Output only. Repeated components for each locality @@ -529,8 +507,8 @@ type GoogleMapsPlacesV1Place struct { // individual store, not the overall chain. WebsiteUri string `json:"websiteUri,omitempty"` - // WheelchairAccessibleEntrance: Output only. Specifies if the place has - // an entrance that is wheelchair-accessible. + // WheelchairAccessibleEntrance: Output only. [Deprecated!] Specifies if + // the place has an entrance that is wheelchair-accessible. WheelchairAccessibleEntrance bool `json:"wheelchairAccessibleEntrance,omitempty"` // ForceSendFields is a list of field names (e.g. "AddressComponents") @@ -757,11 +735,6 @@ type GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint struct { // Date: Output only. Date in the local timezone for the place. Date *GoogleTypeDate `json:"date,omitempty"` - // DateDeprecated: Output only. Date of the endpoint expressed in - // RFC3339 format in the local timezone for the place. For example - // 2010-12-31. - DateDeprecated string `json:"dateDeprecated,omitempty"` - // Day: Output only. A day of the week, as an integer in the range 0-6. // 0 is Sunday, 1 is Monday, etc. Day int64 `json:"day,omitempty"` @@ -947,12 +920,6 @@ type GoogleMapsPlacesV1SearchTextRequest struct { // https://developers.google.com/maps/faq#languagesupport. LanguageCode string `json:"languageCode,omitempty"` - // Location: [Deprecated!]The region to search. Setting location would - // usually yields better results. Recommended to set. This location - // serves as a bias unless strict_restriction is set to true, which - // turns the location to a strict restriction. - Location *GoogleMapsPlacesV1SearchTextRequestLocation `json:"location,omitempty"` - // LocationBias: The region to search. This location serves as a bias // which means results around given location might be returned. Cannot // be set along with location_restriction. @@ -997,13 +964,6 @@ type GoogleMapsPlacesV1SearchTextRequest struct { // services. PriceLevels []string `json:"priceLevels,omitempty"` - // PriceRange: [Deprecated!]Used to restrict the search to places that - // are within a certain price range. This is on a scale of 0 to 4. Set a - // minimum of 0 or set a maximum of 4 has no effect on the search - // results. Min price is default to 0 and max price is default to 4. - // Default value will be used if either min or max is unset. - PriceRange *GoogleMapsPlacesV1Int32Range `json:"priceRange,omitempty"` - // RankPreference: How results will be ranked in the response. // // Possible values: @@ -1015,8 +975,9 @@ type GoogleMapsPlacesV1SearchTextRequest struct { RankPreference string `json:"rankPreference,omitempty"` // RegionCode: The Unicode country/region code (CLDR) of the location - // where the request is coming from. It is used to display the place - // details, like region-specific place name, if available. For more + // where the request is coming from. This parameter is used to display + // the place details, like region-specific place name, if available. The + // parameter can affect results based on applicable law. For more // information, see // http://www.unicode.org/reports/tr35/#unicode_region_subtag. Note that // 3-digit region codes are not currently supported. @@ -1067,40 +1028,6 @@ func (s *GoogleMapsPlacesV1SearchTextRequest) UnmarshalJSON(data []byte) error { return nil } -// GoogleMapsPlacesV1SearchTextRequestLocation: [Deprecated!]The region -// to search. -type GoogleMapsPlacesV1SearchTextRequestLocation struct { - // Rectangle: A rectangle box defined by northeast and southwest corner. - Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` - - // StrictRestriction: Make location field a strict restriction and - // filter out POIs outside of the given location. If location type field - // is unset this field will have no effect. - StrictRestriction bool `json:"strictRestriction,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Rectangle") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Rectangle") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleMapsPlacesV1SearchTextRequestLocation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleMapsPlacesV1SearchTextRequestLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleMapsPlacesV1SearchTextRequestLocationBias: The region to // search. This location serves as a bias which means results around // given location might be returned. diff --git a/playcustomapp/v1/playcustomapp-gen.go b/playcustomapp/v1/playcustomapp-gen.go index c1e7808ff84..29d962e6e67 100644 --- a/playcustomapp/v1/playcustomapp-gen.go +++ b/playcustomapp/v1/playcustomapp-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/android/work/play/custom-app-api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // playcustomappService, err := playcustomapp.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // playcustomappService, err := playcustomapp.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // playcustomappService, err := playcustomapp.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package playcustomapp // import "google.golang.org/api/playcustomapp/v1" import ( diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go index 7592a2ccf77..683538f495a 100644 --- a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/play/developer/reporting // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package playdeveloperreporting // import "google.golang.org/api/playdeveloperreporting/v1alpha1" import ( diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go index def8a8eede3..05bee00db18 100644 --- a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/play/developer/reporting // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // playdeveloperreportingService, err := playdeveloperreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package playdeveloperreporting // import "google.golang.org/api/playdeveloperreporting/v1beta1" import ( diff --git a/playgrouping/v1alpha1/playgrouping-api.json b/playgrouping/v1alpha1/playgrouping-api.json new file mode 100644 index 00000000000..da6c538e783 --- /dev/null +++ b/playgrouping/v1alpha1/playgrouping-api.json @@ -0,0 +1,262 @@ +{ + "basePath": "", + "baseUrl": "https://playgrouping.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Play Grouping", + "description": "playgrouping.googleapis.com API.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/playgrouping/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "playgrouping:v1alpha1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://playgrouping.mtls.googleapis.com/", + "name": "playgrouping", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "apps": { + "resources": { + "tokens": { + "methods": { + "verify": { + "description": "Verify an API token by asserting the app and persona it belongs to. The verification is a protection against client-side attacks and will fail if the contents of the token don't match the provided values. A token must be verified before it can be used to manipulate user tags.", + "flatPath": "v1alpha1/apps/{appsId}/tokens/{tokensId}:verify", + "httpMethod": "POST", + "id": "playgrouping.apps.tokens.verify", + "parameterOrder": [ + "appPackage", + "token" + ], + "parameters": { + "appPackage": { + "description": "Required. App the token belongs to. Format: apps/{package_name}", + "location": "path", + "pattern": "^apps/[^/]+$", + "required": true, + "type": "string" + }, + "token": { + "description": "Required. The token to be verified. Format: tokens/{token}", + "location": "path", + "pattern": "^tokens/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+appPackage}/{+token}:verify", + "request": { + "$ref": "VerifyTokenRequest" + }, + "response": { + "$ref": "VerifyTokenResponse" + } + } + }, + "resources": { + "tags": { + "methods": { + "createOrUpdate": { + "description": "Create or update tags for the user and app that are represented by the given token.", + "flatPath": "v1alpha1/apps/{appsId}/tokens/{tokensId}/tags:createOrUpdate", + "httpMethod": "POST", + "id": "playgrouping.apps.tokens.tags.createOrUpdate", + "parameterOrder": [ + "appPackage", + "token" + ], + "parameters": { + "appPackage": { + "description": "Required. App whose tags are being manipulated. Format: apps/{package_name}", + "location": "path", + "pattern": "^apps/[^/]+$", + "required": true, + "type": "string" + }, + "token": { + "description": "Required. Token for which the tags are being inserted or updated. Format: tokens/{token}", + "location": "path", + "pattern": "^tokens/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+appPackage}/{+token}/tags:createOrUpdate", + "request": { + "$ref": "CreateOrUpdateTagsRequest" + }, + "response": { + "$ref": "CreateOrUpdateTagsResponse" + } + } + } + } + } + } + } + } + }, + "revision": "20230906", + "rootUrl": "https://playgrouping.googleapis.com/", + "schemas": { + "CreateOrUpdateTagsRequest": { + "description": "Request message for CreateOrUpdateTags. VerifyToken.", + "id": "CreateOrUpdateTagsRequest", + "properties": { + "tags": { + "description": "Tags to be inserted or updated.", + "items": { + "$ref": "Tag" + }, + "type": "array" + } + }, + "type": "object" + }, + "CreateOrUpdateTagsResponse": { + "description": "Response message for CreateOrUpdateTags.", + "id": "CreateOrUpdateTagsResponse", + "properties": { + "tags": { + "description": "All requested tags are returned, including pre-existing ones.", + "items": { + "$ref": "Tag" + }, + "type": "array" + } + }, + "type": "object" + }, + "Tag": { + "description": "A tag is associated with exactly one package name and user.", + "id": "Tag", + "properties": { + "booleanValue": { + "description": "A boolean value of the tag.", + "type": "boolean" + }, + "int64Value": { + "description": "A signed 64-bit integer value of the tag.", + "format": "int64", + "type": "string" + }, + "key": { + "description": "Required. Key for the tag.", + "type": "string" + }, + "stringValue": { + "description": "A string value of the tag.", + "type": "string" + }, + "timeValue": { + "description": "A time value of the tag.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "VerifyTokenRequest": { + "description": "Request message for VerifyToken.", + "id": "VerifyTokenRequest", + "properties": { + "persona": { + "description": "Required. Persona represented by the token. Format: personas/{persona}", + "type": "string" + } + }, + "type": "object" + }, + "VerifyTokenResponse": { + "description": "Response message for VerifyToken.", + "id": "VerifyTokenResponse", + "properties": {}, + "type": "object" + } + }, + "servicePath": "", + "title": "Google Play Grouping API", + "version": "v1alpha1", + "version_module": true +} \ No newline at end of file diff --git a/playgrouping/v1alpha1/playgrouping-gen.go b/playgrouping/v1alpha1/playgrouping-gen.go new file mode 100644 index 00000000000..e0ebe3d1980 --- /dev/null +++ b/playgrouping/v1alpha1/playgrouping-gen.go @@ -0,0 +1,619 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package playgrouping provides access to the Google Play Grouping API. +// +// For product documentation, see: https://cloud.google.com/playgrouping/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/playgrouping/v1alpha1" +// ... +// ctx := context.Background() +// playgroupingService, err := playgrouping.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// playgroupingService, err := playgrouping.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// playgroupingService, err := playgrouping.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package playgrouping // import "google.golang.org/api/playgrouping/v1alpha1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "playgrouping:v1alpha1" +const apiName = "playgrouping" +const apiVersion = "v1alpha1" +const basePath = "https://playgrouping.googleapis.com/" +const mtlsBasePath = "https://playgrouping.mtls.googleapis.com/" + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Apps = NewAppsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Apps *AppsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewAppsService(s *Service) *AppsService { + rs := &AppsService{s: s} + rs.Tokens = NewAppsTokensService(s) + return rs +} + +type AppsService struct { + s *Service + + Tokens *AppsTokensService +} + +func NewAppsTokensService(s *Service) *AppsTokensService { + rs := &AppsTokensService{s: s} + rs.Tags = NewAppsTokensTagsService(s) + return rs +} + +type AppsTokensService struct { + s *Service + + Tags *AppsTokensTagsService +} + +func NewAppsTokensTagsService(s *Service) *AppsTokensTagsService { + rs := &AppsTokensTagsService{s: s} + return rs +} + +type AppsTokensTagsService struct { + s *Service +} + +// CreateOrUpdateTagsRequest: Request message for CreateOrUpdateTags. +// VerifyToken. +type CreateOrUpdateTagsRequest struct { + // Tags: Tags to be inserted or updated. + Tags []*Tag `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Tags") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Tags") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateOrUpdateTagsRequest) MarshalJSON() ([]byte, error) { + type NoMethod CreateOrUpdateTagsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CreateOrUpdateTagsResponse: Response message for CreateOrUpdateTags. +type CreateOrUpdateTagsResponse struct { + // Tags: All requested tags are returned, including pre-existing ones. + Tags []*Tag `json:"tags,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Tags") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Tags") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CreateOrUpdateTagsResponse) MarshalJSON() ([]byte, error) { + type NoMethod CreateOrUpdateTagsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Tag: A tag is associated with exactly one package name and user. +type Tag struct { + // BooleanValue: A boolean value of the tag. + BooleanValue bool `json:"booleanValue,omitempty"` + + // Int64Value: A signed 64-bit integer value of the tag. + Int64Value int64 `json:"int64Value,omitempty,string"` + + // Key: Required. Key for the tag. + Key string `json:"key,omitempty"` + + // StringValue: A string value of the tag. + StringValue string `json:"stringValue,omitempty"` + + // TimeValue: A time value of the tag. + TimeValue string `json:"timeValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BooleanValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BooleanValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Tag) MarshalJSON() ([]byte, error) { + type NoMethod Tag + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VerifyTokenRequest: Request message for VerifyToken. +type VerifyTokenRequest struct { + // Persona: Required. Persona represented by the token. Format: + // personas/{persona} + Persona string `json:"persona,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Persona") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Persona") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VerifyTokenRequest) MarshalJSON() ([]byte, error) { + type NoMethod VerifyTokenRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// VerifyTokenResponse: Response message for VerifyToken. +type VerifyTokenResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// method id "playgrouping.apps.tokens.verify": + +type AppsTokensVerifyCall struct { + s *Service + appPackage string + token string + verifytokenrequest *VerifyTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Verify: Verify an API token by asserting the app and persona it +// belongs to. The verification is a protection against client-side +// attacks and will fail if the contents of the token don't match the +// provided values. A token must be verified before it can be used to +// manipulate user tags. +// +// - appPackage: App the token belongs to. Format: apps/{package_name}. +// - token: The token to be verified. Format: tokens/{token}. +func (r *AppsTokensService) Verify(appPackage string, token string, verifytokenrequest *VerifyTokenRequest) *AppsTokensVerifyCall { + c := &AppsTokensVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appPackage = appPackage + c.token = token + c.verifytokenrequest = verifytokenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsTokensVerifyCall) Fields(s ...googleapi.Field) *AppsTokensVerifyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsTokensVerifyCall) Context(ctx context.Context) *AppsTokensVerifyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsTokensVerifyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsTokensVerifyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifytokenrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+appPackage}/{+token}:verify") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appPackage": c.appPackage, + "token": c.token, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playgrouping.apps.tokens.verify" call. +// Exactly one of *VerifyTokenResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *VerifyTokenResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsTokensVerifyCall) Do(opts ...googleapi.CallOption) (*VerifyTokenResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &VerifyTokenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Verify an API token by asserting the app and persona it belongs to. The verification is a protection against client-side attacks and will fail if the contents of the token don't match the provided values. A token must be verified before it can be used to manipulate user tags.", + // "flatPath": "v1alpha1/apps/{appsId}/tokens/{tokensId}:verify", + // "httpMethod": "POST", + // "id": "playgrouping.apps.tokens.verify", + // "parameterOrder": [ + // "appPackage", + // "token" + // ], + // "parameters": { + // "appPackage": { + // "description": "Required. App the token belongs to. Format: apps/{package_name}", + // "location": "path", + // "pattern": "^apps/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "token": { + // "description": "Required. The token to be verified. Format: tokens/{token}", + // "location": "path", + // "pattern": "^tokens/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+appPackage}/{+token}:verify", + // "request": { + // "$ref": "VerifyTokenRequest" + // }, + // "response": { + // "$ref": "VerifyTokenResponse" + // } + // } + +} + +// method id "playgrouping.apps.tokens.tags.createOrUpdate": + +type AppsTokensTagsCreateOrUpdateCall struct { + s *Service + appPackage string + token string + createorupdatetagsrequest *CreateOrUpdateTagsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CreateOrUpdate: Create or update tags for the user and app that are +// represented by the given token. +// +// - appPackage: App whose tags are being manipulated. Format: +// apps/{package_name}. +// - token: Token for which the tags are being inserted or updated. +// Format: tokens/{token}. +func (r *AppsTokensTagsService) CreateOrUpdate(appPackage string, token string, createorupdatetagsrequest *CreateOrUpdateTagsRequest) *AppsTokensTagsCreateOrUpdateCall { + c := &AppsTokensTagsCreateOrUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appPackage = appPackage + c.token = token + c.createorupdatetagsrequest = createorupdatetagsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsTokensTagsCreateOrUpdateCall) Fields(s ...googleapi.Field) *AppsTokensTagsCreateOrUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsTokensTagsCreateOrUpdateCall) Context(ctx context.Context) *AppsTokensTagsCreateOrUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsTokensTagsCreateOrUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsTokensTagsCreateOrUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.createorupdatetagsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+appPackage}/{+token}/tags:createOrUpdate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appPackage": c.appPackage, + "token": c.token, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "playgrouping.apps.tokens.tags.createOrUpdate" call. +// Exactly one of *CreateOrUpdateTagsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *CreateOrUpdateTagsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsTokensTagsCreateOrUpdateCall) Do(opts ...googleapi.CallOption) (*CreateOrUpdateTagsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &CreateOrUpdateTagsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Create or update tags for the user and app that are represented by the given token.", + // "flatPath": "v1alpha1/apps/{appsId}/tokens/{tokensId}/tags:createOrUpdate", + // "httpMethod": "POST", + // "id": "playgrouping.apps.tokens.tags.createOrUpdate", + // "parameterOrder": [ + // "appPackage", + // "token" + // ], + // "parameters": { + // "appPackage": { + // "description": "Required. App whose tags are being manipulated. Format: apps/{package_name}", + // "location": "path", + // "pattern": "^apps/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "token": { + // "description": "Required. Token for which the tags are being inserted or updated. Format: tokens/{token}", + // "location": "path", + // "pattern": "^tokens/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+appPackage}/{+token}/tags:createOrUpdate", + // "request": { + // "$ref": "CreateOrUpdateTagsRequest" + // }, + // "response": { + // "$ref": "CreateOrUpdateTagsResponse" + // } + // } + +} diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index 64a95232c6a..20fd79742a1 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developer.android.com/google/play/integrity // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // playintegrityService, err := playintegrity.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // playintegrityService, err := playintegrity.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // playintegrityService, err := playintegrity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package playintegrity // import "google.golang.org/api/playintegrity/v1" import ( diff --git a/policyanalyzer/v1/policyanalyzer-gen.go b/policyanalyzer/v1/policyanalyzer-gen.go index 083ede06251..29c1aafc752 100644 --- a/policyanalyzer/v1/policyanalyzer-gen.go +++ b/policyanalyzer/v1/policyanalyzer-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://www.google.com // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policyanalyzerService, err := policyanalyzer.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policyanalyzerService, err := policyanalyzer.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policyanalyzerService, err := policyanalyzer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policyanalyzer // import "google.golang.org/api/policyanalyzer/v1" import ( diff --git a/policyanalyzer/v1beta1/policyanalyzer-gen.go b/policyanalyzer/v1beta1/policyanalyzer-gen.go index c00cccf6688..4c1116e8a60 100644 --- a/policyanalyzer/v1beta1/policyanalyzer-gen.go +++ b/policyanalyzer/v1beta1/policyanalyzer-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://www.google.com // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policyanalyzerService, err := policyanalyzer.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policyanalyzerService, err := policyanalyzer.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policyanalyzerService, err := policyanalyzer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policyanalyzer // import "google.golang.org/api/policyanalyzer/v1beta1" import ( diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index 243ac64b383..87f80c0a0ab 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/docs/simulating-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policysimulatorService, err := policysimulator.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policysimulatorService, err := policysimulator.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policysimulatorService, err := policysimulator.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policysimulator // import "google.golang.org/api/policysimulator/v1" import ( diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index 59ae6681ac3..0189910f39e 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -143,6 +143,97 @@ } }, "replays": { + "methods": { + "create": { + "description": "Creates and starts a Replay using the given ReplayConfig.", + "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays", + "httpMethod": "POST", + "id": "policysimulator.folders.locations.replays.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/replays", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/replays", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -213,6 +304,46 @@ ] } } + }, + "results": { + "methods": { + "list": { + "description": "Lists the results of running a Replay.", + "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/results", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -461,6 +592,97 @@ } }, "replays": { + "methods": { + "create": { + "description": "Creates and starts a Replay using the given ReplayConfig.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.replays.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/replays", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/replays", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -531,6 +753,46 @@ ] } } + }, + "results": { + "methods": { + "list": { + "description": "Lists the results of running a Replay.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/results", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -576,70 +838,201 @@ } }, "replays": { - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "policysimulator.projects.locations.replays.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", - "httpMethod": "GET", - "id": "policysimulator.projects.locations.replays.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" + "methods": { + "create": { + "description": "Creates and starts a Replay using the given ReplayConfig.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays", + "httpMethod": "POST", + "id": "policysimulator.projects.locations.replays.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/replays", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/replays", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "results": { + "methods": { + "list": { + "description": "Lists the results of running a Replay.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/results", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -654,7 +1047,7 @@ } } }, - "revision": "20230806", + "revision": "20230904", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -958,6 +1351,278 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaAccessStateDiff": { + "description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", + "id": "GoogleCloudPolicysimulatorV1alphaAccessStateDiff", + "properties": { + "accessChange": { + "description": "How the principal's access, specified in the AccessState field, changed between the current (baseline) policies and proposed (simulated) policies.", + "enum": [ + "ACCESS_CHANGE_TYPE_UNSPECIFIED", + "NO_CHANGE", + "UNKNOWN_CHANGE", + "ACCESS_REVOKED", + "ACCESS_GAINED", + "ACCESS_MAYBE_REVOKED", + "ACCESS_MAYBE_GAINED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal's access did not change. This includes the case where both baseline and simulated are UNKNOWN, but the unknown information is equivalent.", + "The principal's access under both the current policies and the proposed policies is `UNKNOWN`, but the unknown information differs between them.", + "The principal had access under the current policies (`GRANTED`), but will no longer have access after the proposed changes (`NOT_GRANTED`).", + "The principal did not have access under the current policies (`NOT_GRANTED`), but will have access after the proposed changes (`GRANTED`).", + "This result can occur for the following reasons: * The principal had access under the current policies (`GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will not have access after the proposed changes (`NOT_GRANTED`).", + "This result can occur for the following reasons: * The principal did not have access under the current policies (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will have access after the proposed changes (`GRANTED`)." + ], + "type": "string" + }, + "baseline": { + "$ref": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", + "description": "The results of evaluating the access tuple under the current (baseline) policies. If the AccessState couldn't be fully evaluated, this field explains why." + }, + "simulated": { + "$ref": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", + "description": "The results of evaluating the access tuple under the proposed (simulated) policies. If the AccessState couldn't be fully evaluated, this field explains why." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaAccessTuple": { + "description": "Information about the principal, resource, and permission to check.", + "id": "GoogleCloudPolicysimulatorV1alphaAccessTuple", + "properties": { + "fullResourceName": { + "description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", + "type": "string" + }, + "permission": { + "description": "Required. The IAM permission to check for the specified principal and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", + "type": "string" + }, + "principal": { + "description": "Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must be a Google Account or a service account. Other types of principals are not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaBindingExplanation": { + "description": "Details about how a binding in a policy affects a principal's ability to use a permission.", + "id": "GoogleCloudPolicysimulatorV1alphaBindingExplanation", + "properties": { + "access": { + "description": "Required. Indicates whether _this binding_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", + "enum": [ + "ACCESS_STATE_UNSPECIFIED", + "GRANTED", + "NOT_GRANTED", + "UNKNOWN_CONDITIONAL", + "UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal has the permission.", + "The principal does not have the permission.", + "The principal has the permission only if a condition expression evaluates to `true`.", + "The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." + ], + "type": "string" + }, + "condition": { + "$ref": "GoogleTypeExpr", + "description": "A condition expression that prevents this binding from granting access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview." + }, + "memberships": { + "additionalProperties": { + "$ref": "GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership" + }, + "description": "Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * `user:alice@example.com` * `group:product-eng@example.com` The principal in the replayed access tuple is `user:bob@example.com`. This user is a principal of the group `group:product-eng@example.com`. For the first principal in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", + "type": "object" + }, + "relevance": { + "description": "The relevance of this binding to the overall determination for the entire policy.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + }, + "role": { + "description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", + "type": "string" + }, + "rolePermission": { + "description": "Indicates whether the role granted by this binding contains the specified permission.", + "enum": [ + "ROLE_PERMISSION_UNSPECIFIED", + "ROLE_PERMISSION_INCLUDED", + "ROLE_PERMISSION_NOT_INCLUDED", + "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The permission is included in the role.", + "The permission is not included in the role.", + "The user who created the Replay is not allowed to access the binding." + ], + "type": "string" + }, + "rolePermissionRelevance": { + "description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership": { + "description": "Details about whether the binding includes the principal.", + "id": "GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership", + "properties": { + "membership": { + "description": "Indicates whether the binding includes the principal.", + "enum": [ + "MEMBERSHIP_UNSPECIFIED", + "MEMBERSHIP_INCLUDED", + "MEMBERSHIP_NOT_INCLUDED", + "MEMBERSHIP_UNKNOWN_INFO_DENIED", + "MEMBERSHIP_UNKNOWN_UNSUPPORTED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The binding includes the principal. The principal can be included directly or indirectly. For example: * A principal is included directly if that principal is listed in the binding. * A principal is included indirectly if that principal is in a Google group or Google Workspace domain that is listed in the binding.", + "The binding does not include the principal.", + "The user who created the Replay is not allowed to access the binding.", + "The principal is an unsupported type. Only Google Accounts and service accounts are supported." + ], + "type": "string" + }, + "relevance": { + "description": "The relevance of the principal's status to the overall determination for the binding.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaExplainedAccess": { + "description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", + "id": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", + "properties": { + "accessState": { + "description": "Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.", + "enum": [ + "ACCESS_STATE_UNSPECIFIED", + "GRANTED", + "NOT_GRANTED", + "UNKNOWN_CONDITIONAL", + "UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal has the permission.", + "The principal does not have the permission.", + "The principal has the permission only if a condition expression evaluates to `true`.", + "The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." + ], + "type": "string" + }, + "errors": { + "description": "If the AccessState is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "policies": { + "description": "If the AccessState is `UNKNOWN`, this field contains the policies that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaExplainedPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaExplainedPolicy": { + "description": "Details about how a specific IAM Policy contributed to the access check.", + "id": "GoogleCloudPolicysimulatorV1alphaExplainedPolicy", + "properties": { + "access": { + "description": "Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", + "enum": [ + "ACCESS_STATE_UNSPECIFIED", + "GRANTED", + "NOT_GRANTED", + "UNKNOWN_CONDITIONAL", + "UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal has the permission.", + "The principal does not have the permission.", + "The principal has the permission only if a condition expression evaluates to `true`.", + "The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." + ], + "type": "string" + }, + "bindingExplanations": { + "description": "Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource. If the user who created the Replay does not have access to the policy, this field is omitted.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaBindingExplanation" + }, + "type": "array" + }, + "fullResourceName": { + "description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the user who created the Replay does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", + "type": "string" + }, + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "The IAM policy attached to the resource. If the user who created the Replay does not have access to the policy, this field is empty." + }, + "relevance": { + "description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the user who created the Replay does not have access to the policy, this field is omitted.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", @@ -1044,6 +1709,42 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse": { + "description": "Response message for Simulator.ListReplayResults.", + "id": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of ReplayResult objects. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "replayResults": { + "description": "The results of running a Replay.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplayResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaListReplaysResponse": { + "description": "Response message for Simulator.ListReplays.", + "id": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "replays": { + "description": "The list of Replay objects.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { "description": "The proposed changes to OrgPolicy.", "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", @@ -1196,6 +1897,149 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaReplay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1alphaReplay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1alphaReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaReplayDiff": { + "description": "The difference between the results of evaluating an access tuple under the current (baseline) policies and under the proposed (simulated) policies. This difference explains how a principal's access could change if the proposed policies were applied.", + "id": "GoogleCloudPolicysimulatorV1alphaReplayDiff", + "properties": { + "accessDiff": { + "$ref": "GoogleCloudPolicysimulatorV1alphaAccessStateDiff", + "description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple. The evaluation of the principal's access is reported in the AccessState field." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaReplayResult": { + "description": "The result of replaying a single access tuple against a simulated state.", + "id": "GoogleCloudPolicysimulatorV1alphaReplayResult", + "properties": { + "accessTuple": { + "$ref": "GoogleCloudPolicysimulatorV1alphaAccessTuple", + "description": "The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt." + }, + "diff": { + "$ref": "GoogleCloudPolicysimulatorV1alphaReplayDiff", + "description": "The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies. This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error that caused the access tuple replay to fail. This field is only included for access tuples that were not replayed successfully." + }, + "lastSeenDate": { + "$ref": "GoogleTypeDate", + "description": "The latest date this access tuple was seen in the logs." + }, + "name": { + "description": "The resource name of the `ReplayResult`, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`", + "type": "string" + }, + "parent": { + "description": "The Replay that the access tuple was included in.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1alphaReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1alphaResourceContext": { "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", "id": "GoogleCloudPolicysimulatorV1alphaResourceContext", diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index 3dcab4cafeb..5a4da5862c8 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/docs/simulating-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policysimulatorService, err := policysimulator.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policysimulatorService, err := policysimulator.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policysimulatorService, err := policysimulator.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policysimulator // import "google.golang.org/api/policysimulator/v1alpha" import ( @@ -198,6 +211,7 @@ type FoldersLocationsOrgPolicyViolationsPreviewsOperationsService struct { func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService { rs := &FoldersLocationsReplaysService{s: s} rs.Operations = NewFoldersLocationsReplaysOperationsService(s) + rs.Results = NewFoldersLocationsReplaysResultsService(s) return rs } @@ -205,6 +219,8 @@ type FoldersLocationsReplaysService struct { s *Service Operations *FoldersLocationsReplaysOperationsService + + Results *FoldersLocationsReplaysResultsService } func NewFoldersLocationsReplaysOperationsService(s *Service) *FoldersLocationsReplaysOperationsService { @@ -216,6 +232,15 @@ type FoldersLocationsReplaysOperationsService struct { s *Service } +func NewFoldersLocationsReplaysResultsService(s *Service) *FoldersLocationsReplaysResultsService { + rs := &FoldersLocationsReplaysResultsService{s: s} + return rs +} + +type FoldersLocationsReplaysResultsService struct { + s *Service +} + func NewOperationsService(s *Service) *OperationsService { rs := &OperationsService{s: s} return rs @@ -288,6 +313,7 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) + rs.Results = NewOrganizationsLocationsReplaysResultsService(s) return rs } @@ -295,6 +321,8 @@ type OrganizationsLocationsReplaysService struct { s *Service Operations *OrganizationsLocationsReplaysOperationsService + + Results *OrganizationsLocationsReplaysResultsService } func NewOrganizationsLocationsReplaysOperationsService(s *Service) *OrganizationsLocationsReplaysOperationsService { @@ -306,6 +334,15 @@ type OrganizationsLocationsReplaysOperationsService struct { s *Service } +func NewOrganizationsLocationsReplaysResultsService(s *Service) *OrganizationsLocationsReplaysResultsService { + rs := &OrganizationsLocationsReplaysResultsService{s: s} + return rs +} + +type OrganizationsLocationsReplaysResultsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -357,6 +394,7 @@ type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService struct { func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService { rs := &ProjectsLocationsReplaysService{s: s} rs.Operations = NewProjectsLocationsReplaysOperationsService(s) + rs.Results = NewProjectsLocationsReplaysResultsService(s) return rs } @@ -364,6 +402,8 @@ type ProjectsLocationsReplaysService struct { s *Service Operations *ProjectsLocationsReplaysOperationsService + + Results *ProjectsLocationsReplaysResultsService } func NewProjectsLocationsReplaysOperationsService(s *Service) *ProjectsLocationsReplaysOperationsService { @@ -375,6 +415,15 @@ type ProjectsLocationsReplaysOperationsService struct { s *Service } +func NewProjectsLocationsReplaysResultsService(s *Service) *ProjectsLocationsReplaysResultsService { + rs := &ProjectsLocationsReplaysResultsService{s: s} + return rs +} + +type ProjectsLocationsReplaysResultsService struct { + s *Service +} + // GoogleCloudOrgpolicyV2AlternatePolicySpec: Similar to PolicySpec but // with an extra 'launch' field for launch reference. The PolicySpec // here is specific for dry-run/darklaunch. @@ -882,6 +931,429 @@ func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaAccessStateDiff: A summary and +// comparison of the principal's access under the current (baseline) +// policies and the proposed (simulated) policies for a single access +// tuple. +type GoogleCloudPolicysimulatorV1alphaAccessStateDiff struct { + // AccessChange: How the principal's access, specified in the + // AccessState field, changed between the current (baseline) policies + // and proposed (simulated) policies. + // + // Possible values: + // "ACCESS_CHANGE_TYPE_UNSPECIFIED" - Default value. This value is + // unused. + // "NO_CHANGE" - The principal's access did not change. This includes + // the case where both baseline and simulated are UNKNOWN, but the + // unknown information is equivalent. + // "UNKNOWN_CHANGE" - The principal's access under both the current + // policies and the proposed policies is `UNKNOWN`, but the unknown + // information differs between them. + // "ACCESS_REVOKED" - The principal had access under the current + // policies (`GRANTED`), but will no longer have access after the + // proposed changes (`NOT_GRANTED`). + // "ACCESS_GAINED" - The principal did not have access under the + // current policies (`NOT_GRANTED`), but will have access after the + // proposed changes (`GRANTED`). + // "ACCESS_MAYBE_REVOKED" - This result can occur for the following + // reasons: * The principal had access under the current policies + // (`GRANTED`), but their access after the proposed changes is + // `UNKNOWN`. * The principal's access under the current policies is + // `UNKNOWN`, but they will not have access after the proposed changes + // (`NOT_GRANTED`). + // "ACCESS_MAYBE_GAINED" - This result can occur for the following + // reasons: * The principal did not have access under the current + // policies (`NOT_GRANTED`), but their access after the proposed changes + // is `UNKNOWN`. * The principal's access under the current policies is + // `UNKNOWN`, but they will have access after the proposed changes + // (`GRANTED`). + AccessChange string `json:"accessChange,omitempty"` + + // Baseline: The results of evaluating the access tuple under the + // current (baseline) policies. If the AccessState couldn't be fully + // evaluated, this field explains why. + Baseline *GoogleCloudPolicysimulatorV1alphaExplainedAccess `json:"baseline,omitempty"` + + // Simulated: The results of evaluating the access tuple under the + // proposed (simulated) policies. If the AccessState couldn't be fully + // evaluated, this field explains why. + Simulated *GoogleCloudPolicysimulatorV1alphaExplainedAccess `json:"simulated,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessChange") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessChange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaAccessStateDiff) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaAccessStateDiff + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaAccessTuple: Information about the +// principal, resource, and permission to check. +type GoogleCloudPolicysimulatorV1alphaAccessTuple struct { + // FullResourceName: Required. The full resource name that identifies + // the resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/inst + // ances/my-instance`. For examples of full resource names for Google + // Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + FullResourceName string `json:"fullResourceName,omitempty"` + + // Permission: Required. The IAM permission to check for the specified + // principal and resource. For a complete list of IAM permissions, see + // https://cloud.google.com/iam/help/permissions/reference. For a + // complete list of predefined IAM roles and the permissions in each + // role, see https://cloud.google.com/iam/help/roles/reference. + Permission string `json:"permission,omitempty"` + + // Principal: Required. The principal whose access you want to check, in + // the form of the email address that represents that principal. For + // example, `alice@example.com` or + // `my-service-account@my-project.iam.gserviceaccount.com`. The + // principal must be a Google Account or a service account. Other types + // of principals are not supported. + Principal string `json:"principal,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullResourceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullResourceName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaAccessTuple) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaAccessTuple + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaBindingExplanation: Details about +// how a binding in a policy affects a principal's ability to use a +// permission. +type GoogleCloudPolicysimulatorV1alphaBindingExplanation struct { + // Access: Required. Indicates whether _this binding_ provides the + // specified permission to the specified principal for the specified + // resource. This field does _not_ indicate whether the principal + // actually has the permission for the resource. There might be another + // binding that overrides this binding. To determine whether the + // principal actually has the permission, use the `access` field in the + // TroubleshootIamPolicyResponse. + // + // Possible values: + // "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused. + // "GRANTED" - The principal has the permission. + // "NOT_GRANTED" - The principal does not have the permission. + // "UNKNOWN_CONDITIONAL" - The principal has the permission only if a + // condition expression evaluates to `true`. + // "UNKNOWN_INFO_DENIED" - The user who created the Replay does not + // have access to all of the policies that Policy Simulator needs to + // evaluate. + Access string `json:"access,omitempty"` + + // Condition: A condition expression that prevents this binding from + // granting access unless the expression evaluates to `true`. To learn + // about IAM Conditions, see + // https://cloud.google.com/iam/docs/conditions-overview. + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Memberships: Indicates whether each principal in the binding includes + // the principal specified in the request, either directly or + // indirectly. Each key identifies a principal in the binding, and each + // value indicates whether the principal in the binding includes the + // principal in the request. For example, suppose that a binding + // includes the following principals: * `user:alice@example.com` * + // `group:product-eng@example.com` The principal in the replayed access + // tuple is `user:bob@example.com`. This user is a principal of the + // group `group:product-eng@example.com`. For the first principal in the + // binding, the key is `user:alice@example.com`, and the `membership` + // field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the + // second principal in the binding, the key is + // `group:product-eng@example.com`, and the `membership` field in the + // value is set to `MEMBERSHIP_INCLUDED`. + Memberships map[string]GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership `json:"memberships,omitempty"` + + // Relevance: The relevance of this binding to the overall determination + // for the entire policy. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + Relevance string `json:"relevance,omitempty"` + + // Role: The role that this binding grants. For example, + // `roles/compute.serviceAgent`. For a complete list of predefined IAM + // roles, as well as the permissions in each role, see + // https://cloud.google.com/iam/help/roles/reference. + Role string `json:"role,omitempty"` + + // RolePermission: Indicates whether the role granted by this binding + // contains the specified permission. + // + // Possible values: + // "ROLE_PERMISSION_UNSPECIFIED" - Default value. This value is + // unused. + // "ROLE_PERMISSION_INCLUDED" - The permission is included in the + // role. + // "ROLE_PERMISSION_NOT_INCLUDED" - The permission is not included in + // the role. + // "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" - The user who created the + // Replay is not allowed to access the binding. + RolePermission string `json:"rolePermission,omitempty"` + + // RolePermissionRelevance: The relevance of the permission's existence, + // or nonexistence, in the role to the overall determination for the + // entire policy. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + RolePermissionRelevance string `json:"rolePermissionRelevance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Access") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Access") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaBindingExplanation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaBindingExplanation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership +// : Details about whether the binding includes the principal. +type GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership struct { + // Membership: Indicates whether the binding includes the principal. + // + // Possible values: + // "MEMBERSHIP_UNSPECIFIED" - Default value. This value is unused. + // "MEMBERSHIP_INCLUDED" - The binding includes the principal. The + // principal can be included directly or indirectly. For example: * A + // principal is included directly if that principal is listed in the + // binding. * A principal is included indirectly if that principal is in + // a Google group or Google Workspace domain that is listed in the + // binding. + // "MEMBERSHIP_NOT_INCLUDED" - The binding does not include the + // principal. + // "MEMBERSHIP_UNKNOWN_INFO_DENIED" - The user who created the Replay + // is not allowed to access the binding. + // "MEMBERSHIP_UNKNOWN_UNSUPPORTED" - The principal is an unsupported + // type. Only Google Accounts and service accounts are supported. + Membership string `json:"membership,omitempty"` + + // Relevance: The relevance of the principal's status to the overall + // determination for the binding. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + Relevance string `json:"relevance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Membership") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Membership") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaExplainedAccess: Details about how a +// set of policies, listed in ExplainedPolicy, resulted in a certain +// AccessState when replaying an access tuple. +type GoogleCloudPolicysimulatorV1alphaExplainedAccess struct { + // AccessState: Whether the principal in the access tuple has permission + // to access the resource in the access tuple under the given policies. + // + // Possible values: + // "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused. + // "GRANTED" - The principal has the permission. + // "NOT_GRANTED" - The principal does not have the permission. + // "UNKNOWN_CONDITIONAL" - The principal has the permission only if a + // condition expression evaluates to `true`. + // "UNKNOWN_INFO_DENIED" - The user who created the Replay does not + // have access to all of the policies that Policy Simulator needs to + // evaluate. + AccessState string `json:"accessState,omitempty"` + + // Errors: If the AccessState is `UNKNOWN`, this field contains a list + // of errors explaining why the result is `UNKNOWN`. If the + // `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted. + Errors []*GoogleRpcStatus `json:"errors,omitempty"` + + // Policies: If the AccessState is `UNKNOWN`, this field contains the + // policies that led to that result. If the `AccessState` is `GRANTED` + // or `NOT_GRANTED`, this field is omitted. + Policies []*GoogleCloudPolicysimulatorV1alphaExplainedPolicy `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessState") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaExplainedAccess) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaExplainedAccess + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaExplainedPolicy: Details about how a +// specific IAM Policy contributed to the access check. +type GoogleCloudPolicysimulatorV1alphaExplainedPolicy struct { + // Access: Indicates whether _this policy_ provides the specified + // permission to the specified principal for the specified resource. + // This field does _not_ indicate whether the principal actually has the + // permission for the resource. There might be another policy that + // overrides this policy. To determine whether the principal actually + // has the permission, use the `access` field in the + // TroubleshootIamPolicyResponse. + // + // Possible values: + // "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused. + // "GRANTED" - The principal has the permission. + // "NOT_GRANTED" - The principal does not have the permission. + // "UNKNOWN_CONDITIONAL" - The principal has the permission only if a + // condition expression evaluates to `true`. + // "UNKNOWN_INFO_DENIED" - The user who created the Replay does not + // have access to all of the policies that Policy Simulator needs to + // evaluate. + Access string `json:"access,omitempty"` + + // BindingExplanations: Details about how each binding in the policy + // affects the principal's ability, or inability, to use the permission + // for the resource. If the user who created the Replay does not have + // access to the policy, this field is omitted. + BindingExplanations []*GoogleCloudPolicysimulatorV1alphaBindingExplanation `json:"bindingExplanations,omitempty"` + + // FullResourceName: The full resource name that identifies the + // resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/inst + // ances/my-instance`. If the user who created the Replay does not have + // access to the policy, this field is omitted. For examples of full + // resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + FullResourceName string `json:"fullResourceName,omitempty"` + + // Policy: The IAM policy attached to the resource. If the user who + // created the Replay does not have access to the policy, this field is + // empty. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + + // Relevance: The relevance of this policy to the overall determination + // in the TroubleshootIamPolicyResponse. If the user who created the + // Replay does not have access to the policy, this field is omitted. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + Relevance string `json:"relevance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Access") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Access") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaExplainedPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaExplainedPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe // rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata // is metadata about an OrgPolicyViolationsPreview generations @@ -1018,6 +1490,81 @@ func (s *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse) Marsh return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse: Response +// message for Simulator.ListReplayResults. +type GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // ReplayResult objects. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ReplayResults: The results of running a Replay. + ReplayResults []*GoogleCloudPolicysimulatorV1alphaReplayResult `json:"replayResults,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaListReplaysResponse: Response +// message for Simulator.ListReplays. +type GoogleCloudPolicysimulatorV1alphaListReplaysResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Replays: The list of Replay objects. + Replays []*GoogleCloudPolicysimulatorV1alphaReplay `json:"replays,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaListReplaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaListReplaysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed // changes to OrgPolicy. type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { @@ -1285,28 +1832,274 @@ func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCoun return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1alphaResourceContext: ResourceContext -// provides the context we know about a resource. It is similar in -// concept to google.cloud.asset.v1.Resource, but focuses on the -// information specifically used by Simulator. -type GoogleCloudPolicysimulatorV1alphaResourceContext struct { - // Ancestors: The ancestry path of the resource in Google Cloud resource - // hierarchy - // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - // represented as a list of relative resource names. An ancestry path - // starts with the closest ancestor in the hierarchy and ends at root. - // If the resource is a project, folder, or organization, the ancestry - // path starts from the resource itself. Example: - // `["projects/123456789", "folders/5432", "organizations/1234"]` - Ancestors []string `json:"ancestors,omitempty"` +// GoogleCloudPolicysimulatorV1alphaReplay: A resource describing a +// `Replay`, or simulation. +type GoogleCloudPolicysimulatorV1alphaReplay struct { + // Config: Required. The configuration used for the `Replay`. + Config *GoogleCloudPolicysimulatorV1alphaReplayConfig `json:"config,omitempty"` - // AssetType: The asset type of the resource as defined by CAIS. - // Example: `compute.googleapis.com/Firewall` See Supported asset types - // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) - // for more information. - AssetType string `json:"assetType,omitempty"` + // Name: Output only. The resource name of the `Replay`, which has the + // following format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}`, where `{resource-id}` is the ID of the project, + // folder, or organization that owns the Replay. Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36` + Name string `json:"name,omitempty"` - // Resource: The full name of the resource. Example: + // ResultsSummary: Output only. Summary statistics about the replayed + // log entries. + ResultsSummary *GoogleCloudPolicysimulatorV1alphaReplayResultsSummary `json:"resultsSummary,omitempty"` + + // State: Output only. The current state of the `Replay`. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "PENDING" - The `Replay` has not started yet. + // "RUNNING" - The `Replay` is currently running. + // "SUCCEEDED" - The `Replay` has successfully completed. + // "FAILED" - The `Replay` has finished with an error. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaReplay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaReplay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaReplayConfig: The configuration used +// for a Replay. +type GoogleCloudPolicysimulatorV1alphaReplayConfig struct { + // LogSource: The logs to use as input for the Replay. + // + // Possible values: + // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log + // source is unspecified, the Replay defaults to using + // `RECENT_ACCESSES`. + // "RECENT_ACCESSES" - All access logs from the last 90 days. These + // logs may not include logs from the most recent 7 days. + LogSource string `json:"logSource,omitempty"` + + // PolicyOverlay: A mapping of the resources that you want to simulate + // policies for and the policies that you want to simulate. Keys are the + // full resource names for the resources. For example, + // `//cloudresourcemanager.googleapis.com/projects/my-project`. For + // examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + // Values are Policy objects representing the policies that you want to + // simulate. Replays automatically take into account any IAM policies + // inherited through the resource hierarchy, and any policies set on + // descendant resources. You do not need to include these policies in + // the policy overlay. + PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaReplayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaReplayConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaReplayDiff: The difference between +// the results of evaluating an access tuple under the current +// (baseline) policies and under the proposed (simulated) policies. This +// difference explains how a principal's access could change if the +// proposed policies were applied. +type GoogleCloudPolicysimulatorV1alphaReplayDiff struct { + // AccessDiff: A summary and comparison of the principal's access under + // the current (baseline) policies and the proposed (simulated) policies + // for a single access tuple. The evaluation of the principal's access + // is reported in the AccessState field. + AccessDiff *GoogleCloudPolicysimulatorV1alphaAccessStateDiff `json:"accessDiff,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessDiff") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessDiff") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaReplayDiff) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaReplayDiff + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaReplayResult: The result of +// replaying a single access tuple against a simulated state. +type GoogleCloudPolicysimulatorV1alphaReplayResult struct { + // AccessTuple: The access tuple that was replayed. This field includes + // information about the principal, resource, and permission that were + // involved in the access attempt. + AccessTuple *GoogleCloudPolicysimulatorV1alphaAccessTuple `json:"accessTuple,omitempty"` + + // Diff: The difference between the principal's access under the current + // (baseline) policies and the principal's access under the proposed + // (simulated) policies. This field is only included for access tuples + // that were successfully replayed and had different results under the + // current policies and the proposed policies. + Diff *GoogleCloudPolicysimulatorV1alphaReplayDiff `json:"diff,omitempty"` + + // Error: The error that caused the access tuple replay to fail. This + // field is only included for access tuples that were not replayed + // successfully. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // LastSeenDate: The latest date this access tuple was seen in the logs. + LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"` + + // Name: The resource name of the `ReplayResult`, in the following + // format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is + // the ID of the project, folder, or organization that owns the Replay. + // Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36/results/1234` + Name string `json:"name,omitempty"` + + // Parent: The Replay that the access tuple was included in. + Parent string `json:"parent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessTuple") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessTuple") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaReplayResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaReplayResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaReplayResultsSummary: Summary +// statistics about the replayed log entries. +type GoogleCloudPolicysimulatorV1alphaReplayResultsSummary struct { + // DifferenceCount: The number of replayed log entries with a difference + // between baseline and simulated policies. + DifferenceCount int64 `json:"differenceCount,omitempty"` + + // ErrorCount: The number of log entries that could not be replayed. + ErrorCount int64 `json:"errorCount,omitempty"` + + // LogCount: The total number of log entries replayed. + LogCount int64 `json:"logCount,omitempty"` + + // NewestDate: The date of the newest log entry replayed. + NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` + + // OldestDate: The date of the oldest log entry replayed. + OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` + + // UnchangedCount: The number of replayed log entries with no difference + // between baseline and simulated policies. + UnchangedCount int64 `json:"unchangedCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DifferenceCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DifferenceCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaReplayResultsSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaReplayResultsSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaResourceContext: ResourceContext +// provides the context we know about a resource. It is similar in +// concept to google.cloud.asset.v1.Resource, but focuses on the +// information specifically used by Simulator. +type GoogleCloudPolicysimulatorV1alphaResourceContext struct { + // Ancestors: The ancestry path of the resource in Google Cloud resource + // hierarchy + // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path + // starts with the closest ancestor in the hierarchy and ends at root. + // If the resource is a project, folder, or organization, the ancestry + // path starts from the resource itself. Example: + // `["projects/123456789", "folders/5432", "organizations/1234"]` + Ancestors []string `json:"ancestors,omitempty"` + + // AssetType: The asset type of the resource as defined by CAIS. + // Example: `compute.googleapis.com/Firewall` See Supported asset types + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + AssetType string `json:"assetType,omitempty"` + + // Resource: The full name of the resource. Example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance // s/instance1` See Resource names // (https://cloud.google.com/apis/design/resource_names#full_resource_name) @@ -2295,97 +3088,90 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . } -// method id "policysimulator.folders.locations.replays.operations.get": +// method id "policysimulator.folders.locations.replays.create": -type FoldersLocationsReplaysOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1alphareplay *GoogleCloudPolicysimulatorV1alphaReplay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates and starts a Replay using the given ReplayConfig. // -// - name: The name of the operation resource. -func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { - c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1alphareplay *GoogleCloudPolicysimulatorV1alphaReplay) *FoldersLocationsReplaysCreateCall { + c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1alphareplay = googlecloudpolicysimulatorv1alphareplay return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { +func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { +func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1alphareplay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/replays") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Do executes the "policysimulator.folders.locations.replays.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2416,23 +3202,26 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.get", + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.folders.locations.replays.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -2443,9 +3232,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } -// method id "policysimulator.folders.locations.replays.operations.list": +// method id "policysimulator.folders.locations.replays.get": -type FoldersLocationsReplaysOperationsListCall struct { +type FoldersLocationsReplaysGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2454,42 +3243,25 @@ type FoldersLocationsReplaysOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. // -// - name: The name of the operation's parent resource. -func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { - c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall { + c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { +func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2499,7 +3271,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { +func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2507,21 +3279,21 @@ func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { +func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2547,15 +3319,15 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "policysimulator.folders.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1alphaReplay or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudPolicysimulatorV1alphaReplay.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaReplay, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2574,7 +3346,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1alphaReplay{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2586,41 +3358,210 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.list", + // "id": "policysimulator.folders.locations.replays.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" - // }, + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.list": + +type FoldersLocationsReplaysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists each Replay in a project, folder, or organization. Each +// `Replay` is available for at least 7 days. +// +// - parent: The parent resource, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global`, +// where `{resource-id}` is the ID of the project, folder, or +// organization that owns the Replay. Example: +// `projects/my-example-project/locations/global` Only `Replay` +// objects that are direct children of the provided parent are listed. +// In other words, `Replay` objects that are children of a project +// will not be included when the parent is a folder of that project. +func (r *FoldersLocationsReplaysService) List(parent string) *FoldersLocationsReplaysListCall { + c := &FoldersLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of Replay objects to return. Defaults to 50. The maximum value is +// 1000; values above 1000 are rounded down to 1000. +func (c *FoldersLocationsReplaysListCall) PageSize(pageSize int64) *FoldersLocationsReplaysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplays call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to Simulator.ListReplays must match the call that provided +// the page token. +func (c *FoldersLocationsReplaysListCall) PageToken(pageToken string) *FoldersLocationsReplaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysListCall) Context(ctx context.Context) *FoldersLocationsReplaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1alphaListReplaysResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1alphaListReplaysResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListReplaysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaListReplaysResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/replays", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2632,7 +3573,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListReplaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2650,9 +3591,9 @@ func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f } } -// method id "policysimulator.operations.get": +// method id "policysimulator.folders.locations.replays.operations.get": -type OperationsGetCall struct { +type FoldersLocationsReplaysOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2666,8 +3607,8 @@ type OperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2675,7 +3616,7 @@ func (r *OperationsService) Get(name string) *OperationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2685,7 +3626,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2693,21 +3634,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2733,14 +3674,14 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2772,9 +3713,9 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/operations/{operationsId}", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.get", // "parameterOrder": [ // "name" // ], @@ -2782,7 +3723,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -2798,9 +3739,9 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// method id "policysimulator.folders.locations.replays.operations.list": -type OperationsListCall struct { +type FoldersLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2814,29 +3755,29 @@ type OperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2844,7 +3785,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2854,7 +3795,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2862,21 +3803,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2902,7 +3843,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -2910,7 +3851,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2942,9 +3883,9 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/operations", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], @@ -2957,7 +3898,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^operations$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" // }, @@ -2987,7 +3928,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3005,94 +3946,2011 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": +// method id "policysimulator.folders.locations.replays.results.list": + +type FoldersLocationsReplaysResultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the results of running a Replay. +// +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { + c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/results") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.results.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.results.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/results", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.operations.list": + +type OperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/operations", + // "httpMethod": "GET", + // "id": "policysimulator.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview +// generates an OrgPolicyViolationsPreview for the proposed changes in +// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes +// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources +// to scan are inferred from these specified changes. +// +// - parent: The organization under which this +// OrgPolicyViolationsPreview will be created. Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview = googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetOrgPolicyViolationsPreview gets the specified +// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is +// available for at least 7 days. +// +// - name: The name of the OrgPolicyViolationsPreview to get. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListOrgPolicyViolationsPreviews lists each +// OrgPolicyViolationsPreview in an organization. Each +// OrgPolicyViolationsPreview is available for at least 7 days. +// +// - parent: The parent the violations are scoped to. Format: +// organizations/{organization}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 5 items will be returned. The maximum value is +// 10; values above 10 will be coerced to 10. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespo +// nse or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespo +// nse.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are +// present in an OrgPolicyViolationsPreview. +// +// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations +// from. Format: +// organizations/{organization}/locations/{location}/orgPolicyViolation +// sPreviews/{orgPolicyViolationsPreview}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 50 items will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse.Serv +// erResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/orgPolicyViolations", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.create": + +type OrganizationsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1alphareplay *GoogleCloudPolicysimulatorV1alphaReplay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1alphareplay *GoogleCloudPolicysimulatorV1alphaReplay) *OrganizationsLocationsReplaysCreateCall { + c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1alphareplay = googlecloudpolicysimulatorv1alphareplay + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1alphareplay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.get": + +type OrganizationsLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall { + c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1alphaReplay or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1alphaReplay.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaReplay, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaReplay{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.list": + +type OrganizationsLocationsReplaysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists each Replay in a project, folder, or organization. Each +// `Replay` is available for at least 7 days. +// +// - parent: The parent resource, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global`, +// where `{resource-id}` is the ID of the project, folder, or +// organization that owns the Replay. Example: +// `projects/my-example-project/locations/global` Only `Replay` +// objects that are direct children of the provided parent are listed. +// In other words, `Replay` objects that are children of a project +// will not be included when the parent is a folder of that project. +func (r *OrganizationsLocationsReplaysService) List(parent string) *OrganizationsLocationsReplaysListCall { + c := &OrganizationsLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of Replay objects to return. Defaults to 50. The maximum value is +// 1000; values above 1000 are rounded down to 1000. +func (c *OrganizationsLocationsReplaysListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplays call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to Simulator.ListReplays must match the call that provided +// the page token. +func (c *OrganizationsLocationsReplaysListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsReplaysListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1alphaListReplaysResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1alphaListReplaysResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListReplaysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaListReplaysResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/replays", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header } -// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview -// generates an OrgPolicyViolationsPreview for the proposed changes in -// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes -// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources -// to scan are inferred from these specified changes. +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListReplaysResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.operations.get": + +type OrganizationsLocationsReplaysOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The organization under which this -// OrgPolicyViolationsPreview will be created. Example: -// `organizations/my-example-org/locations/global`. -func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview = googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview +// - name: The name of the operation resource. +func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { + c := &OrganizationsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolationsPreviews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3123,26 +5981,23 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } return ret, nil // { - // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", - // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -3153,9 +6008,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": +// method id "policysimulator.organizations.locations.replays.operations.list": -type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { +type OrganizationsLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3164,21 +6019,42 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { header_ http.Header } -// Get: GetOrgPolicyViolationsPreview gets the specified -// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is -// available for at least 7 days. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the OrgPolicyViolationsPreview to get. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { + c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { +func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3188,7 +6064,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { +func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3196,21 +6072,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { +func (c *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { +func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3236,17 +6112,15 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. -// Exactly one of -// *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview.ServerRes -// ponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview, error) { +// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3265,7 +6139,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3277,25 +6151,41 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...go } return ret, nil // { - // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + // "id": "policysimulator.organizations.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3304,9 +6194,30 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...go } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { +// method id "policysimulator.organizations.locations.replays.results.list": + +type OrganizationsLocationsReplaysResultsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -3315,32 +6226,34 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { header_ http.Header } -// List: ListOrgPolicyViolationsPreviews lists each -// OrgPolicyViolationsPreview in an organization. Each -// OrgPolicyViolationsPreview is available for at least 7 days. +// List: Lists the results of running a Replay. // -// - parent: The parent the violations are scoped to. Format: -// organizations/{organization}. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall { + c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. The service may return fewer than this value. If -// unspecified, at most 5 items will be returned. The maximum value is -// 10; values above 10 will be coerced to 10. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters must match the -// call that provided the page token. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -3348,7 +6261,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3358,7 +6271,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ... // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3366,21 +6279,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { +func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3393,7 +6306,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolationsPreviews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/results") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3406,17 +6319,17 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Do executes the "policysimulator.organizations.locations.replays.results.list" call. // Exactly one of -// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespo -// nse or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespo -// nse.ServerResponse.Header or (if a response was returned at all) in +// *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse, error) { +func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3435,7 +6348,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse{ + ret := &GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3447,36 +6360,36 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...g } return ret, nil // { - // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + // "id": "policysimulator.organizations.locations.replays.results.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + // "path": "v1alpha/{+parent}/results", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3488,7 +6401,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...g // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse) error) error { +func (c *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3506,9 +6419,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx co } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get": +// method id "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get": -type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { +type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3522,8 +6435,8 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -3531,7 +6444,7 @@ func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3541,7 +6454,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3549,21 +6462,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfN // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3589,14 +6502,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get" call. +// Do executes the "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3628,9 +6541,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", + // "id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", // "parameterOrder": [ // "name" // ], @@ -3638,7 +6551,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -3654,99 +6567,72 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": +// method id "policysimulator.projects.locations.replays.create": -type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1alphareplay *GoogleCloudPolicysimulatorV1alphaReplay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are -// present in an OrgPolicyViolationsPreview. +// Create: Creates and starts a Replay using the given ReplayConfig. // -// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations -// from. Format: -// organizations/{organization}/locations/{location}/orgPolicyViolation -// sPreviews/{orgPolicyViolationsPreview}. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1alphareplay *GoogleCloudPolicysimulatorV1alphaReplay) *ProjectsLocationsReplaysCreateCall { + c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. The service may return fewer than this value. If -// unspecified, at most 50 items will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters must match the -// call that provided the page token. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googlecloudpolicysimulatorv1alphareplay = googlecloudpolicysimulatorv1alphareplay return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { +func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { +func (c *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1alphareplay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/replays") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3757,17 +6643,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. -// Exactly one of -// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse.Serv -// erResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse, error) { +// Do executes the "policysimulator.projects.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3786,7 +6669,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3798,36 +6681,28 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis } return ret, nil // { - // "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", - // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.projects.locations.replays.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/orgPolicyViolations", + // "path": "v1alpha/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" + // }, // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3836,30 +6711,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.organizations.locations.replays.operations.get": +// method id "policysimulator.projects.locations.replays.get": -type OrganizationsLocationsReplaysOperationsGetCall struct { +type ProjectsLocationsReplaysGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3868,13 +6722,17 @@ type OrganizationsLocationsReplaysOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. // -// - name: The name of the operation resource. -func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { - c := &OrganizationsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall { + c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -3882,7 +6740,7 @@ func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *Organ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3892,7 +6750,7 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3900,21 +6758,21 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3940,14 +6798,15 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.projects.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1alphaReplay or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1alphaReplay.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaReplay, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3966,7 +6825,7 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudPolicysimulatorV1alphaReplay{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3978,25 +6837,25 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.operations.get", + // "id": "policysimulator.projects.locations.replays.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudPolicysimulatorV1alphaReplay" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4005,45 +6864,48 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.Ca } -// method id "policysimulator.organizations.locations.replays.operations.list": +// method id "policysimulator.projects.locations.replays.list": -type OrganizationsLocationsReplaysOperationsListCall struct { +type ProjectsLocationsReplaysListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists each Replay in a project, folder, or organization. Each +// `Replay` is available for at least 7 days. // -// - name: The name of the operation's parent resource. -func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { - c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent resource, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global`, +// where `{resource-id}` is the ID of the project, folder, or +// organization that owns the Replay. Example: +// `projects/my-example-project/locations/global` Only `Replay` +// objects that are direct children of the provided parent are listed. +// In other words, `Replay` objects that are children of a project +// will not be included when the parent is a folder of that project. +func (r *ProjectsLocationsReplaysService) List(parent string) *ProjectsLocationsReplaysListCall { + c := &ProjectsLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of Replay objects to return. Defaults to 50. The maximum value is +// 1000; values above 1000 are rounded down to 1000. +func (c *ProjectsLocationsReplaysListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplays call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to Simulator.ListReplays must match the call that provided +// the page token. +func (c *ProjectsLocationsReplaysListCall) PageToken(pageToken string) *ProjectsLocationsReplaysListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4051,7 +6913,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4061,7 +6923,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysListCall { c.ifNoneMatch_ = entityTag return c } @@ -4069,21 +6931,21 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysListCall) Context(ctx context.Context) *ProjectsLocationsReplaysListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4096,7 +6958,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/replays") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4104,20 +6966,21 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.projects.locations.replays.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1alphaListReplaysResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1alphaListReplaysResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListReplaysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4136,7 +6999,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1alphaListReplaysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4148,41 +7011,36 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.operations.list", + // "id": "policysimulator.projects.locations.replays.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/replays", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4194,7 +7052,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.C // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListReplaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -4212,9 +7070,9 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Cont } } -// method id "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get": +// method id "policysimulator.projects.locations.replays.operations.get": -type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { +type ProjectsLocationsReplaysOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4228,8 +7086,8 @@ type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { - c := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { + c := &ProjectsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4237,7 +7095,7 @@ func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4247,7 +7105,7 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4255,21 +7113,21 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4295,14 +7153,14 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get" call. +// Do executes the "policysimulator.projects.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4334,9 +7192,9 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", + // "id": "policysimulator.projects.locations.replays.operations.get", // "parameterOrder": [ // "name" // ], @@ -4344,7 +7202,7 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -4360,9 +7218,9 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts } -// method id "policysimulator.projects.locations.replays.operations.get": +// method id "policysimulator.projects.locations.replays.operations.list": -type ProjectsLocationsReplaysOperationsGetCall struct { +type ProjectsLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4371,21 +7229,42 @@ type ProjectsLocationsReplaysOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { - c := &ProjectsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { + c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4395,7 +7274,7 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -4403,21 +7282,21 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4443,14 +7322,15 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.projects.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4469,7 +7349,7 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4481,25 +7361,41 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.replays.operations.get", + // "id": "policysimulator.projects.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4508,45 +7404,66 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpt } -// method id "policysimulator.projects.locations.replays.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsReplaysOperationsListCall struct { +// method id "policysimulator.projects.locations.replays.results.list": + +type ProjectsLocationsReplaysResultsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists the results of running a Replay. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { - c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *ProjectsLocationsReplaysResultsService) List(parent string) *ProjectsLocationsReplaysResultsListCall { + c := &ProjectsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *ProjectsLocationsReplaysResultsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysResultsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *ProjectsLocationsReplaysResultsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4554,7 +7471,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4564,7 +7481,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -4572,21 +7489,21 @@ func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysResultsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4599,7 +7516,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/results") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4607,20 +7524,22 @@ func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.projects.locations.replays.results.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4639,7 +7558,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4651,41 +7570,36 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.replays.operations.list", + // "id": "policysimulator.projects.locations.replays.results.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/results", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4697,7 +7611,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/policysimulator/v1beta/policysimulator-api.json b/policysimulator/v1beta/policysimulator-api.json index c3cbcb2e2bf..fa717c9e6b6 100644 --- a/policysimulator/v1beta/policysimulator-api.json +++ b/policysimulator/v1beta/policysimulator-api.json @@ -143,6 +143,97 @@ } }, "replays": { + "methods": { + "create": { + "description": "Creates and starts a Replay using the given ReplayConfig.", + "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays", + "httpMethod": "POST", + "id": "policysimulator.folders.locations.replays.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/replays", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/replays", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -213,6 +304,46 @@ ] } } + }, + "results": { + "methods": { + "list": { + "description": "Lists the results of running a Replay.", + "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/results", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -461,6 +592,97 @@ } }, "replays": { + "methods": { + "create": { + "description": "Creates and starts a Replay using the given ReplayConfig.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.replays.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/replays", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/replays", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -531,6 +753,46 @@ ] } } + }, + "results": { + "methods": { + "list": { + "description": "Lists the results of running a Replay.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/results", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -576,70 +838,201 @@ } }, "replays": { - "resources": { - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "policysimulator.projects.locations.replays.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", - "httpMethod": "GET", - "id": "policysimulator.projects.locations.replays.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" + "methods": { + "create": { + "description": "Creates and starts a Replay using the given ReplayConfig.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays", + "httpMethod": "POST", + "id": "policysimulator.projects.locations.replays.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/replays", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/replays", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "results": { + "methods": { + "list": { + "description": "Lists the results of running a Replay.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.results.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/results", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -654,7 +1047,7 @@ } } }, - "revision": "20230806", + "revision": "20230904", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1137,6 +1530,278 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaAccessStateDiff": { + "description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", + "id": "GoogleCloudPolicysimulatorV1betaAccessStateDiff", + "properties": { + "accessChange": { + "description": "How the principal's access, specified in the AccessState field, changed between the current (baseline) policies and proposed (simulated) policies.", + "enum": [ + "ACCESS_CHANGE_TYPE_UNSPECIFIED", + "NO_CHANGE", + "UNKNOWN_CHANGE", + "ACCESS_REVOKED", + "ACCESS_GAINED", + "ACCESS_MAYBE_REVOKED", + "ACCESS_MAYBE_GAINED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal's access did not change. This includes the case where both baseline and simulated are UNKNOWN, but the unknown information is equivalent.", + "The principal's access under both the current policies and the proposed policies is `UNKNOWN`, but the unknown information differs between them.", + "The principal had access under the current policies (`GRANTED`), but will no longer have access after the proposed changes (`NOT_GRANTED`).", + "The principal did not have access under the current policies (`NOT_GRANTED`), but will have access after the proposed changes (`GRANTED`).", + "This result can occur for the following reasons: * The principal had access under the current policies (`GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will not have access after the proposed changes (`NOT_GRANTED`).", + "This result can occur for the following reasons: * The principal did not have access under the current policies (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will have access after the proposed changes (`GRANTED`)." + ], + "type": "string" + }, + "baseline": { + "$ref": "GoogleCloudPolicysimulatorV1betaExplainedAccess", + "description": "The results of evaluating the access tuple under the current (baseline) policies. If the AccessState couldn't be fully evaluated, this field explains why." + }, + "simulated": { + "$ref": "GoogleCloudPolicysimulatorV1betaExplainedAccess", + "description": "The results of evaluating the access tuple under the proposed (simulated) policies. If the AccessState couldn't be fully evaluated, this field explains why." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaAccessTuple": { + "description": "Information about the principal, resource, and permission to check.", + "id": "GoogleCloudPolicysimulatorV1betaAccessTuple", + "properties": { + "fullResourceName": { + "description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", + "type": "string" + }, + "permission": { + "description": "Required. The IAM permission to check for the specified principal and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", + "type": "string" + }, + "principal": { + "description": "Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must be a Google Account or a service account. Other types of principals are not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaBindingExplanation": { + "description": "Details about how a binding in a policy affects a principal's ability to use a permission.", + "id": "GoogleCloudPolicysimulatorV1betaBindingExplanation", + "properties": { + "access": { + "description": "Required. Indicates whether _this binding_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", + "enum": [ + "ACCESS_STATE_UNSPECIFIED", + "GRANTED", + "NOT_GRANTED", + "UNKNOWN_CONDITIONAL", + "UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal has the permission.", + "The principal does not have the permission.", + "The principal has the permission only if a condition expression evaluates to `true`.", + "The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." + ], + "type": "string" + }, + "condition": { + "$ref": "GoogleTypeExpr", + "description": "A condition expression that prevents this binding from granting access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview." + }, + "memberships": { + "additionalProperties": { + "$ref": "GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership" + }, + "description": "Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * `user:alice@example.com` * `group:product-eng@example.com` The principal in the replayed access tuple is `user:bob@example.com`. This user is a principal of the group `group:product-eng@example.com`. For the first principal in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", + "type": "object" + }, + "relevance": { + "description": "The relevance of this binding to the overall determination for the entire policy.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + }, + "role": { + "description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", + "type": "string" + }, + "rolePermission": { + "description": "Indicates whether the role granted by this binding contains the specified permission.", + "enum": [ + "ROLE_PERMISSION_UNSPECIFIED", + "ROLE_PERMISSION_INCLUDED", + "ROLE_PERMISSION_NOT_INCLUDED", + "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The permission is included in the role.", + "The permission is not included in the role.", + "The user who created the Replay is not allowed to access the binding." + ], + "type": "string" + }, + "rolePermissionRelevance": { + "description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership": { + "description": "Details about whether the binding includes the principal.", + "id": "GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership", + "properties": { + "membership": { + "description": "Indicates whether the binding includes the principal.", + "enum": [ + "MEMBERSHIP_UNSPECIFIED", + "MEMBERSHIP_INCLUDED", + "MEMBERSHIP_NOT_INCLUDED", + "MEMBERSHIP_UNKNOWN_INFO_DENIED", + "MEMBERSHIP_UNKNOWN_UNSUPPORTED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The binding includes the principal. The principal can be included directly or indirectly. For example: * A principal is included directly if that principal is listed in the binding. * A principal is included indirectly if that principal is in a Google group or Google Workspace domain that is listed in the binding.", + "The binding does not include the principal.", + "The user who created the Replay is not allowed to access the binding.", + "The principal is an unsupported type. Only Google Accounts and service accounts are supported." + ], + "type": "string" + }, + "relevance": { + "description": "The relevance of the principal's status to the overall determination for the binding.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaExplainedAccess": { + "description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", + "id": "GoogleCloudPolicysimulatorV1betaExplainedAccess", + "properties": { + "accessState": { + "description": "Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.", + "enum": [ + "ACCESS_STATE_UNSPECIFIED", + "GRANTED", + "NOT_GRANTED", + "UNKNOWN_CONDITIONAL", + "UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal has the permission.", + "The principal does not have the permission.", + "The principal has the permission only if a condition expression evaluates to `true`.", + "The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." + ], + "type": "string" + }, + "errors": { + "description": "If the AccessState is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "policies": { + "description": "If the AccessState is `UNKNOWN`, this field contains the policies that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaExplainedPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaExplainedPolicy": { + "description": "Details about how a specific IAM Policy contributed to the access check.", + "id": "GoogleCloudPolicysimulatorV1betaExplainedPolicy", + "properties": { + "access": { + "description": "Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", + "enum": [ + "ACCESS_STATE_UNSPECIFIED", + "GRANTED", + "NOT_GRANTED", + "UNKNOWN_CONDITIONAL", + "UNKNOWN_INFO_DENIED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The principal has the permission.", + "The principal does not have the permission.", + "The principal has the permission only if a condition expression evaluates to `true`.", + "The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." + ], + "type": "string" + }, + "bindingExplanations": { + "description": "Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource. If the user who created the Replay does not have access to the policy, this field is omitted.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaBindingExplanation" + }, + "type": "array" + }, + "fullResourceName": { + "description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the user who created the Replay does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", + "type": "string" + }, + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "The IAM policy attached to the resource. If the user who created the Replay does not have access to the policy, this field is empty." + }, + "relevance": { + "description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the user who created the Replay does not have access to the policy, this field is omitted.", + "enum": [ + "HEURISTIC_RELEVANCE_UNSPECIFIED", + "NORMAL", + "HIGH" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", + "The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", @@ -1223,6 +1888,42 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse": { + "description": "Response message for Simulator.ListReplayResults.", + "id": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of ReplayResult objects. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "replayResults": { + "description": "The results of running a Replay.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplayResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaListReplaysResponse": { + "description": "Response message for Simulator.ListReplays.", + "id": "GoogleCloudPolicysimulatorV1betaListReplaysResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "replays": { + "description": "The list of Replay objects.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { "description": "The proposed changes to OrgPolicy.", "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", @@ -1375,6 +2076,149 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1betaReplay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1betaReplay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1betaReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaReplayDiff": { + "description": "The difference between the results of evaluating an access tuple under the current (baseline) policies and under the proposed (simulated) policies. This difference explains how a principal's access could change if the proposed policies were applied.", + "id": "GoogleCloudPolicysimulatorV1betaReplayDiff", + "properties": { + "accessDiff": { + "$ref": "GoogleCloudPolicysimulatorV1betaAccessStateDiff", + "description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple. The evaluation of the principal's access is reported in the AccessState field." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaReplayResult": { + "description": "The result of replaying a single access tuple against a simulated state.", + "id": "GoogleCloudPolicysimulatorV1betaReplayResult", + "properties": { + "accessTuple": { + "$ref": "GoogleCloudPolicysimulatorV1betaAccessTuple", + "description": "The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt." + }, + "diff": { + "$ref": "GoogleCloudPolicysimulatorV1betaReplayDiff", + "description": "The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies. This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error that caused the access tuple replay to fail. This field is only included for access tuples that were not replayed successfully." + }, + "lastSeenDate": { + "$ref": "GoogleTypeDate", + "description": "The latest date this access tuple was seen in the logs." + }, + "name": { + "description": "The resource name of the `ReplayResult`, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`", + "type": "string" + }, + "parent": { + "description": "The Replay that the access tuple was included in.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1betaReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1betaResourceContext": { "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", "id": "GoogleCloudPolicysimulatorV1betaResourceContext", diff --git a/policysimulator/v1beta/policysimulator-gen.go b/policysimulator/v1beta/policysimulator-gen.go index 2029a2b0731..4708aa236de 100644 --- a/policysimulator/v1beta/policysimulator-gen.go +++ b/policysimulator/v1beta/policysimulator-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/docs/simulating-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policysimulatorService, err := policysimulator.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policysimulatorService, err := policysimulator.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policysimulatorService, err := policysimulator.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policysimulator // import "google.golang.org/api/policysimulator/v1beta" import ( @@ -198,6 +211,7 @@ type FoldersLocationsOrgPolicyViolationsPreviewsOperationsService struct { func NewFoldersLocationsReplaysService(s *Service) *FoldersLocationsReplaysService { rs := &FoldersLocationsReplaysService{s: s} rs.Operations = NewFoldersLocationsReplaysOperationsService(s) + rs.Results = NewFoldersLocationsReplaysResultsService(s) return rs } @@ -205,6 +219,8 @@ type FoldersLocationsReplaysService struct { s *Service Operations *FoldersLocationsReplaysOperationsService + + Results *FoldersLocationsReplaysResultsService } func NewFoldersLocationsReplaysOperationsService(s *Service) *FoldersLocationsReplaysOperationsService { @@ -216,6 +232,15 @@ type FoldersLocationsReplaysOperationsService struct { s *Service } +func NewFoldersLocationsReplaysResultsService(s *Service) *FoldersLocationsReplaysResultsService { + rs := &FoldersLocationsReplaysResultsService{s: s} + return rs +} + +type FoldersLocationsReplaysResultsService struct { + s *Service +} + func NewOperationsService(s *Service) *OperationsService { rs := &OperationsService{s: s} return rs @@ -288,6 +313,7 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) + rs.Results = NewOrganizationsLocationsReplaysResultsService(s) return rs } @@ -295,6 +321,8 @@ type OrganizationsLocationsReplaysService struct { s *Service Operations *OrganizationsLocationsReplaysOperationsService + + Results *OrganizationsLocationsReplaysResultsService } func NewOrganizationsLocationsReplaysOperationsService(s *Service) *OrganizationsLocationsReplaysOperationsService { @@ -306,6 +334,15 @@ type OrganizationsLocationsReplaysOperationsService struct { s *Service } +func NewOrganizationsLocationsReplaysResultsService(s *Service) *OrganizationsLocationsReplaysResultsService { + rs := &OrganizationsLocationsReplaysResultsService{s: s} + return rs +} + +type OrganizationsLocationsReplaysResultsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -357,6 +394,7 @@ type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService struct { func NewProjectsLocationsReplaysService(s *Service) *ProjectsLocationsReplaysService { rs := &ProjectsLocationsReplaysService{s: s} rs.Operations = NewProjectsLocationsReplaysOperationsService(s) + rs.Results = NewProjectsLocationsReplaysResultsService(s) return rs } @@ -364,6 +402,8 @@ type ProjectsLocationsReplaysService struct { s *Service Operations *ProjectsLocationsReplaysOperationsService + + Results *ProjectsLocationsReplaysResultsService } func NewProjectsLocationsReplaysOperationsService(s *Service) *ProjectsLocationsReplaysOperationsService { @@ -375,6 +415,15 @@ type ProjectsLocationsReplaysOperationsService struct { s *Service } +func NewProjectsLocationsReplaysResultsService(s *Service) *ProjectsLocationsReplaysResultsService { + rs := &ProjectsLocationsReplaysResultsService{s: s} + return rs +} + +type ProjectsLocationsReplaysResultsService struct { + s *Service +} + // GoogleCloudOrgpolicyV2AlternatePolicySpec: Similar to PolicySpec but // with an extra 'launch' field for launch reference. The PolicySpec // here is specific for dry-run/darklaunch. @@ -1162,6 +1211,430 @@ func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCoun return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1betaAccessStateDiff: A summary and +// comparison of the principal's access under the current (baseline) +// policies and the proposed (simulated) policies for a single access +// tuple. +type GoogleCloudPolicysimulatorV1betaAccessStateDiff struct { + // AccessChange: How the principal's access, specified in the + // AccessState field, changed between the current (baseline) policies + // and proposed (simulated) policies. + // + // Possible values: + // "ACCESS_CHANGE_TYPE_UNSPECIFIED" - Default value. This value is + // unused. + // "NO_CHANGE" - The principal's access did not change. This includes + // the case where both baseline and simulated are UNKNOWN, but the + // unknown information is equivalent. + // "UNKNOWN_CHANGE" - The principal's access under both the current + // policies and the proposed policies is `UNKNOWN`, but the unknown + // information differs between them. + // "ACCESS_REVOKED" - The principal had access under the current + // policies (`GRANTED`), but will no longer have access after the + // proposed changes (`NOT_GRANTED`). + // "ACCESS_GAINED" - The principal did not have access under the + // current policies (`NOT_GRANTED`), but will have access after the + // proposed changes (`GRANTED`). + // "ACCESS_MAYBE_REVOKED" - This result can occur for the following + // reasons: * The principal had access under the current policies + // (`GRANTED`), but their access after the proposed changes is + // `UNKNOWN`. * The principal's access under the current policies is + // `UNKNOWN`, but they will not have access after the proposed changes + // (`NOT_GRANTED`). + // "ACCESS_MAYBE_GAINED" - This result can occur for the following + // reasons: * The principal did not have access under the current + // policies (`NOT_GRANTED`), but their access after the proposed changes + // is `UNKNOWN`. * The principal's access under the current policies is + // `UNKNOWN`, but they will have access after the proposed changes + // (`GRANTED`). + AccessChange string `json:"accessChange,omitempty"` + + // Baseline: The results of evaluating the access tuple under the + // current (baseline) policies. If the AccessState couldn't be fully + // evaluated, this field explains why. + Baseline *GoogleCloudPolicysimulatorV1betaExplainedAccess `json:"baseline,omitempty"` + + // Simulated: The results of evaluating the access tuple under the + // proposed (simulated) policies. If the AccessState couldn't be fully + // evaluated, this field explains why. + Simulated *GoogleCloudPolicysimulatorV1betaExplainedAccess `json:"simulated,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessChange") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessChange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaAccessStateDiff) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaAccessStateDiff + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaAccessTuple: Information about the +// principal, resource, and permission to check. +type GoogleCloudPolicysimulatorV1betaAccessTuple struct { + // FullResourceName: Required. The full resource name that identifies + // the resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/inst + // ances/my-instance`. For examples of full resource names for Google + // Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + FullResourceName string `json:"fullResourceName,omitempty"` + + // Permission: Required. The IAM permission to check for the specified + // principal and resource. For a complete list of IAM permissions, see + // https://cloud.google.com/iam/help/permissions/reference. For a + // complete list of predefined IAM roles and the permissions in each + // role, see https://cloud.google.com/iam/help/roles/reference. + Permission string `json:"permission,omitempty"` + + // Principal: Required. The principal whose access you want to check, in + // the form of the email address that represents that principal. For + // example, `alice@example.com` or + // `my-service-account@my-project.iam.gserviceaccount.com`. The + // principal must be a Google Account or a service account. Other types + // of principals are not supported. + Principal string `json:"principal,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FullResourceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FullResourceName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaAccessTuple) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaAccessTuple + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaBindingExplanation: Details about how +// a binding in a policy affects a principal's ability to use a +// permission. +type GoogleCloudPolicysimulatorV1betaBindingExplanation struct { + // Access: Required. Indicates whether _this binding_ provides the + // specified permission to the specified principal for the specified + // resource. This field does _not_ indicate whether the principal + // actually has the permission for the resource. There might be another + // binding that overrides this binding. To determine whether the + // principal actually has the permission, use the `access` field in the + // TroubleshootIamPolicyResponse. + // + // Possible values: + // "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused. + // "GRANTED" - The principal has the permission. + // "NOT_GRANTED" - The principal does not have the permission. + // "UNKNOWN_CONDITIONAL" - The principal has the permission only if a + // condition expression evaluates to `true`. + // "UNKNOWN_INFO_DENIED" - The user who created the Replay does not + // have access to all of the policies that Policy Simulator needs to + // evaluate. + Access string `json:"access,omitempty"` + + // Condition: A condition expression that prevents this binding from + // granting access unless the expression evaluates to `true`. To learn + // about IAM Conditions, see + // https://cloud.google.com/iam/docs/conditions-overview. + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Memberships: Indicates whether each principal in the binding includes + // the principal specified in the request, either directly or + // indirectly. Each key identifies a principal in the binding, and each + // value indicates whether the principal in the binding includes the + // principal in the request. For example, suppose that a binding + // includes the following principals: * `user:alice@example.com` * + // `group:product-eng@example.com` The principal in the replayed access + // tuple is `user:bob@example.com`. This user is a principal of the + // group `group:product-eng@example.com`. For the first principal in the + // binding, the key is `user:alice@example.com`, and the `membership` + // field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the + // second principal in the binding, the key is + // `group:product-eng@example.com`, and the `membership` field in the + // value is set to `MEMBERSHIP_INCLUDED`. + Memberships map[string]GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership `json:"memberships,omitempty"` + + // Relevance: The relevance of this binding to the overall determination + // for the entire policy. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + Relevance string `json:"relevance,omitempty"` + + // Role: The role that this binding grants. For example, + // `roles/compute.serviceAgent`. For a complete list of predefined IAM + // roles, as well as the permissions in each role, see + // https://cloud.google.com/iam/help/roles/reference. + Role string `json:"role,omitempty"` + + // RolePermission: Indicates whether the role granted by this binding + // contains the specified permission. + // + // Possible values: + // "ROLE_PERMISSION_UNSPECIFIED" - Default value. This value is + // unused. + // "ROLE_PERMISSION_INCLUDED" - The permission is included in the + // role. + // "ROLE_PERMISSION_NOT_INCLUDED" - The permission is not included in + // the role. + // "ROLE_PERMISSION_UNKNOWN_INFO_DENIED" - The user who created the + // Replay is not allowed to access the binding. + RolePermission string `json:"rolePermission,omitempty"` + + // RolePermissionRelevance: The relevance of the permission's existence, + // or nonexistence, in the role to the overall determination for the + // entire policy. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + RolePermissionRelevance string `json:"rolePermissionRelevance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Access") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Access") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaBindingExplanation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaBindingExplanation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership: +// +// Details about whether the binding includes the principal. +type GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership struct { + // Membership: Indicates whether the binding includes the principal. + // + // Possible values: + // "MEMBERSHIP_UNSPECIFIED" - Default value. This value is unused. + // "MEMBERSHIP_INCLUDED" - The binding includes the principal. The + // principal can be included directly or indirectly. For example: * A + // principal is included directly if that principal is listed in the + // binding. * A principal is included indirectly if that principal is in + // a Google group or Google Workspace domain that is listed in the + // binding. + // "MEMBERSHIP_NOT_INCLUDED" - The binding does not include the + // principal. + // "MEMBERSHIP_UNKNOWN_INFO_DENIED" - The user who created the Replay + // is not allowed to access the binding. + // "MEMBERSHIP_UNKNOWN_UNSUPPORTED" - The principal is an unsupported + // type. Only Google Accounts and service accounts are supported. + Membership string `json:"membership,omitempty"` + + // Relevance: The relevance of the principal's status to the overall + // determination for the binding. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + Relevance string `json:"relevance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Membership") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Membership") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaExplainedAccess: Details about how a +// set of policies, listed in ExplainedPolicy, resulted in a certain +// AccessState when replaying an access tuple. +type GoogleCloudPolicysimulatorV1betaExplainedAccess struct { + // AccessState: Whether the principal in the access tuple has permission + // to access the resource in the access tuple under the given policies. + // + // Possible values: + // "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused. + // "GRANTED" - The principal has the permission. + // "NOT_GRANTED" - The principal does not have the permission. + // "UNKNOWN_CONDITIONAL" - The principal has the permission only if a + // condition expression evaluates to `true`. + // "UNKNOWN_INFO_DENIED" - The user who created the Replay does not + // have access to all of the policies that Policy Simulator needs to + // evaluate. + AccessState string `json:"accessState,omitempty"` + + // Errors: If the AccessState is `UNKNOWN`, this field contains a list + // of errors explaining why the result is `UNKNOWN`. If the + // `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted. + Errors []*GoogleRpcStatus `json:"errors,omitempty"` + + // Policies: If the AccessState is `UNKNOWN`, this field contains the + // policies that led to that result. If the `AccessState` is `GRANTED` + // or `NOT_GRANTED`, this field is omitted. + Policies []*GoogleCloudPolicysimulatorV1betaExplainedPolicy `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessState") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaExplainedAccess) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaExplainedAccess + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaExplainedPolicy: Details about how a +// specific IAM Policy contributed to the access check. +type GoogleCloudPolicysimulatorV1betaExplainedPolicy struct { + // Access: Indicates whether _this policy_ provides the specified + // permission to the specified principal for the specified resource. + // This field does _not_ indicate whether the principal actually has the + // permission for the resource. There might be another policy that + // overrides this policy. To determine whether the principal actually + // has the permission, use the `access` field in the + // TroubleshootIamPolicyResponse. + // + // Possible values: + // "ACCESS_STATE_UNSPECIFIED" - Default value. This value is unused. + // "GRANTED" - The principal has the permission. + // "NOT_GRANTED" - The principal does not have the permission. + // "UNKNOWN_CONDITIONAL" - The principal has the permission only if a + // condition expression evaluates to `true`. + // "UNKNOWN_INFO_DENIED" - The user who created the Replay does not + // have access to all of the policies that Policy Simulator needs to + // evaluate. + Access string `json:"access,omitempty"` + + // BindingExplanations: Details about how each binding in the policy + // affects the principal's ability, or inability, to use the permission + // for the resource. If the user who created the Replay does not have + // access to the policy, this field is omitted. + BindingExplanations []*GoogleCloudPolicysimulatorV1betaBindingExplanation `json:"bindingExplanations,omitempty"` + + // FullResourceName: The full resource name that identifies the + // resource. For example, + // `//compute.googleapis.com/projects/my-project/zones/us-central1-a/inst + // ances/my-instance`. If the user who created the Replay does not have + // access to the policy, this field is omitted. For examples of full + // resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + FullResourceName string `json:"fullResourceName,omitempty"` + + // Policy: The IAM policy attached to the resource. If the user who + // created the Replay does not have access to the policy, this field is + // empty. + Policy *GoogleIamV1Policy `json:"policy,omitempty"` + + // Relevance: The relevance of this policy to the overall determination + // in the TroubleshootIamPolicyResponse. If the user who created the + // Replay does not have access to the policy, this field is omitted. + // + // Possible values: + // "HEURISTIC_RELEVANCE_UNSPECIFIED" - Default value. This value is + // unused. + // "NORMAL" - The data point has a limited effect on the result. + // Changing the data point is unlikely to affect the overall + // determination. + // "HIGH" - The data point has a strong effect on the result. Changing + // the data point is likely to affect the overall determination. + Relevance string `json:"relevance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Access") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Access") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaExplainedPolicy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaExplainedPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper // ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is // metadata about an OrgPolicyViolationsPreview generations operation. @@ -1297,6 +1770,81 @@ func (s *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1betaListReplayResultsResponse: Response +// message for Simulator.ListReplayResults. +type GoogleCloudPolicysimulatorV1betaListReplayResultsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // ReplayResult objects. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ReplayResults: The results of running a Replay. + ReplayResults []*GoogleCloudPolicysimulatorV1betaReplayResult `json:"replayResults,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaListReplayResultsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaListReplaysResponse: Response message +// for Simulator.ListReplays. +type GoogleCloudPolicysimulatorV1betaListReplaysResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Replays: The list of Replay objects. + Replays []*GoogleCloudPolicysimulatorV1betaReplay `json:"replays,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaListReplaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaListReplaysResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed // changes to OrgPolicy. type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { @@ -1564,26 +2112,272 @@ func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCount return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudPolicysimulatorV1betaResourceContext: ResourceContext -// provides the context we know about a resource. It is similar in -// concept to google.cloud.asset.v1.Resource, but focuses on the -// information specifically used by Simulator. -type GoogleCloudPolicysimulatorV1betaResourceContext struct { - // Ancestors: The ancestry path of the resource in Google Cloud resource - // hierarchy - // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), - // represented as a list of relative resource names. An ancestry path - // starts with the closest ancestor in the hierarchy and ends at root. - // If the resource is a project, folder, or organization, the ancestry - // path starts from the resource itself. Example: - // `["projects/123456789", "folders/5432", "organizations/1234"]` - Ancestors []string `json:"ancestors,omitempty"` +// GoogleCloudPolicysimulatorV1betaReplay: A resource describing a +// `Replay`, or simulation. +type GoogleCloudPolicysimulatorV1betaReplay struct { + // Config: Required. The configuration used for the `Replay`. + Config *GoogleCloudPolicysimulatorV1betaReplayConfig `json:"config,omitempty"` - // AssetType: The asset type of the resource as defined by CAIS. - // Example: `compute.googleapis.com/Firewall` See Supported asset types - // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) - // for more information. - AssetType string `json:"assetType,omitempty"` + // Name: Output only. The resource name of the `Replay`, which has the + // following format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}`, where `{resource-id}` is the ID of the project, + // folder, or organization that owns the Replay. Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36` + Name string `json:"name,omitempty"` + + // ResultsSummary: Output only. Summary statistics about the replayed + // log entries. + ResultsSummary *GoogleCloudPolicysimulatorV1betaReplayResultsSummary `json:"resultsSummary,omitempty"` + + // State: Output only. The current state of the `Replay`. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "PENDING" - The `Replay` has not started yet. + // "RUNNING" - The `Replay` is currently running. + // "SUCCEEDED" - The `Replay` has successfully completed. + // "FAILED" - The `Replay` has finished with an error. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaReplay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaReplay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaReplayConfig: The configuration used +// for a Replay. +type GoogleCloudPolicysimulatorV1betaReplayConfig struct { + // LogSource: The logs to use as input for the Replay. + // + // Possible values: + // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log + // source is unspecified, the Replay defaults to using + // `RECENT_ACCESSES`. + // "RECENT_ACCESSES" - All access logs from the last 90 days. These + // logs may not include logs from the most recent 7 days. + LogSource string `json:"logSource,omitempty"` + + // PolicyOverlay: A mapping of the resources that you want to simulate + // policies for and the policies that you want to simulate. Keys are the + // full resource names for the resources. For example, + // `//cloudresourcemanager.googleapis.com/projects/my-project`. For + // examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + // Values are Policy objects representing the policies that you want to + // simulate. Replays automatically take into account any IAM policies + // inherited through the resource hierarchy, and any policies set on + // descendant resources. You do not need to include these policies in + // the policy overlay. + PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaReplayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaReplayConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaReplayDiff: The difference between +// the results of evaluating an access tuple under the current +// (baseline) policies and under the proposed (simulated) policies. This +// difference explains how a principal's access could change if the +// proposed policies were applied. +type GoogleCloudPolicysimulatorV1betaReplayDiff struct { + // AccessDiff: A summary and comparison of the principal's access under + // the current (baseline) policies and the proposed (simulated) policies + // for a single access tuple. The evaluation of the principal's access + // is reported in the AccessState field. + AccessDiff *GoogleCloudPolicysimulatorV1betaAccessStateDiff `json:"accessDiff,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessDiff") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessDiff") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaReplayDiff) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaReplayDiff + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaReplayResult: The result of replaying +// a single access tuple against a simulated state. +type GoogleCloudPolicysimulatorV1betaReplayResult struct { + // AccessTuple: The access tuple that was replayed. This field includes + // information about the principal, resource, and permission that were + // involved in the access attempt. + AccessTuple *GoogleCloudPolicysimulatorV1betaAccessTuple `json:"accessTuple,omitempty"` + + // Diff: The difference between the principal's access under the current + // (baseline) policies and the principal's access under the proposed + // (simulated) policies. This field is only included for access tuples + // that were successfully replayed and had different results under the + // current policies and the proposed policies. + Diff *GoogleCloudPolicysimulatorV1betaReplayDiff `json:"diff,omitempty"` + + // Error: The error that caused the access tuple replay to fail. This + // field is only included for access tuples that were not replayed + // successfully. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // LastSeenDate: The latest date this access tuple was seen in the logs. + LastSeenDate *GoogleTypeDate `json:"lastSeenDate,omitempty"` + + // Name: The resource name of the `ReplayResult`, in the following + // format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is + // the ID of the project, folder, or organization that owns the Replay. + // Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36/results/1234` + Name string `json:"name,omitempty"` + + // Parent: The Replay that the access tuple was included in. + Parent string `json:"parent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessTuple") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessTuple") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaReplayResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaReplayResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaReplayResultsSummary: Summary +// statistics about the replayed log entries. +type GoogleCloudPolicysimulatorV1betaReplayResultsSummary struct { + // DifferenceCount: The number of replayed log entries with a difference + // between baseline and simulated policies. + DifferenceCount int64 `json:"differenceCount,omitempty"` + + // ErrorCount: The number of log entries that could not be replayed. + ErrorCount int64 `json:"errorCount,omitempty"` + + // LogCount: The total number of log entries replayed. + LogCount int64 `json:"logCount,omitempty"` + + // NewestDate: The date of the newest log entry replayed. + NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` + + // OldestDate: The date of the oldest log entry replayed. + OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` + + // UnchangedCount: The number of replayed log entries with no difference + // between baseline and simulated policies. + UnchangedCount int64 `json:"unchangedCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DifferenceCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DifferenceCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaReplayResultsSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaReplayResultsSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaResourceContext: ResourceContext +// provides the context we know about a resource. It is similar in +// concept to google.cloud.asset.v1.Resource, but focuses on the +// information specifically used by Simulator. +type GoogleCloudPolicysimulatorV1betaResourceContext struct { + // Ancestors: The ancestry path of the resource in Google Cloud resource + // hierarchy + // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path + // starts with the closest ancestor in the hierarchy and ends at root. + // If the resource is a project, folder, or organization, the ancestry + // path starts from the resource itself. Example: + // `["projects/123456789", "folders/5432", "organizations/1234"]` + Ancestors []string `json:"ancestors,omitempty"` + + // AssetType: The asset type of the resource as defined by CAIS. + // Example: `compute.googleapis.com/Firewall` See Supported asset types + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + AssetType string `json:"assetType,omitempty"` // Resource: The full name of the resource. Example: // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance @@ -2295,97 +3089,90 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . } -// method id "policysimulator.folders.locations.replays.operations.get": +// method id "policysimulator.folders.locations.replays.create": -type FoldersLocationsReplaysOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates and starts a Replay using the given ReplayConfig. // -// - name: The name of the operation resource. -func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { - c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *FoldersLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay) *FoldersLocationsReplaysCreateCall { + c := &FoldersLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1betareplay = googlecloudpolicysimulatorv1betareplay return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { +func (c *FoldersLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { +func (c *FoldersLocationsReplaysCreateCall) Context(ctx context.Context) *FoldersLocationsReplaysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betareplay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Do executes the "policysimulator.folders.locations.replays.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2416,23 +3203,26 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.get", + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.folders.locations.replays.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -2443,9 +3233,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } -// method id "policysimulator.folders.locations.replays.operations.list": +// method id "policysimulator.folders.locations.replays.get": -type FoldersLocationsReplaysOperationsListCall struct { +type FoldersLocationsReplaysGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2454,42 +3244,25 @@ type FoldersLocationsReplaysOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. // -// - name: The name of the operation's parent resource. -func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { - c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *FoldersLocationsReplaysService) Get(name string) *FoldersLocationsReplaysGetCall { + c := &FoldersLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { +func (c *FoldersLocationsReplaysGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2499,7 +3272,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { +func (c *FoldersLocationsReplaysGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2507,21 +3280,21 @@ func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { +func (c *FoldersLocationsReplaysGetCall) Context(ctx context.Context) *FoldersLocationsReplaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2547,15 +3320,15 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "policysimulator.folders.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1betaReplay or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudPolicysimulatorV1betaReplay.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *FoldersLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaReplay, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2574,7 +3347,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1betaReplay{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2586,41 +3359,210 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.list", + // "id": "policysimulator.folders.locations.replays.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" - // }, + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.list": + +type FoldersLocationsReplaysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists each Replay in a project, folder, or organization. Each +// `Replay` is available for at least 7 days. +// +// - parent: The parent resource, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global`, +// where `{resource-id}` is the ID of the project, folder, or +// organization that owns the Replay. Example: +// `projects/my-example-project/locations/global` Only `Replay` +// objects that are direct children of the provided parent are listed. +// In other words, `Replay` objects that are children of a project +// will not be included when the parent is a folder of that project. +func (r *FoldersLocationsReplaysService) List(parent string) *FoldersLocationsReplaysListCall { + c := &FoldersLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of Replay objects to return. Defaults to 50. The maximum value is +// 1000; values above 1000 are rounded down to 1000. +func (c *FoldersLocationsReplaysListCall) PageSize(pageSize int64) *FoldersLocationsReplaysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplays call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to Simulator.ListReplays must match the call that provided +// the page token. +func (c *FoldersLocationsReplaysListCall) PageToken(pageToken string) *FoldersLocationsReplaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysListCall) Context(ctx context.Context) *FoldersLocationsReplaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1betaListReplaysResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1betaListReplaysResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplaysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaListReplaysResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/replays", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2632,7 +3574,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2650,9 +3592,9 @@ func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f } } -// method id "policysimulator.operations.get": +// method id "policysimulator.folders.locations.replays.operations.get": -type OperationsGetCall struct { +type FoldersLocationsReplaysOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2666,8 +3608,8 @@ type OperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2675,7 +3617,7 @@ func (r *OperationsService) Get(name string) *OperationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2685,7 +3627,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -2693,21 +3635,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2733,14 +3675,14 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2772,9 +3714,9 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/operations/{operationsId}", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.get", // "parameterOrder": [ // "name" // ], @@ -2782,7 +3724,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -2798,9 +3740,9 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// method id "policysimulator.folders.locations.replays.operations.list": -type OperationsListCall struct { +type FoldersLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2814,29 +3756,29 @@ type OperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2844,7 +3786,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2854,7 +3796,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -2862,21 +3804,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2902,7 +3844,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -2910,7 +3852,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2942,9 +3884,9 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/operations", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], @@ -2957,7 +3899,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^operations$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" // }, @@ -2987,7 +3929,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3005,94 +3947,2011 @@ func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunnin } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": +// method id "policysimulator.folders.locations.replays.results.list": -type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { - s *Service - parent string - googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +type FoldersLocationsReplaysResultsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the results of running a Replay. +// +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *FoldersLocationsReplaysResultsService) List(parent string) *FoldersLocationsReplaysResultsListCall { + c := &FoldersLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *FoldersLocationsReplaysResultsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *FoldersLocationsReplaysResultsListCall) PageToken(pageToken string) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysResultsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FoldersLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysResultsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FoldersLocationsReplaysResultsListCall) Context(ctx context.Context) *FoldersLocationsReplaysResultsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysResultsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/results") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.results.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *FoldersLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaListReplayResultsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.results.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/results", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FoldersLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.operations.list": + +type OperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/operations", + // "httpMethod": "GET", + // "id": "policysimulator.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^operations$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview +// generates an OrgPolicyViolationsPreview for the proposed changes in +// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes +// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources +// to scan are inferred from these specified changes. +// +// - parent: The organization under which this +// OrgPolicyViolationsPreview will be created. Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GetOrgPolicyViolationsPreview gets the specified +// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is +// available for at least 7 days. +// +// - name: The name of the OrgPolicyViolationsPreview to get. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListOrgPolicyViolationsPreviews lists each +// OrgPolicyViolationsPreview in an organization. Each +// OrgPolicyViolationsPreview is available for at least 7 days. +// +// - parent: The parent the violations are scoped to. Format: +// organizations/{organization}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 5 items will be returned. The maximum value is +// 10; values above 10 will be coerced to 10. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespon +// se or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespon +// se.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are +// present in an OrgPolicyViolationsPreview. +// +// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations +// from. Format: +// organizations/{organization}/locations/{location}/orgPolicyViolation +// sPreviews/{orgPolicyViolationsPreview}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 50 items will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse.Serve +// rResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/orgPolicyViolations", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.create": + +type OrganizationsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates and starts a Replay using the given ReplayConfig. +// +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *OrganizationsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay) *OrganizationsLocationsReplaysCreateCall { + c := &OrganizationsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1betareplay = googlecloudpolicysimulatorv1betareplay + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysCreateCall) Context(ctx context.Context) *OrganizationsLocationsReplaysCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betareplay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.replays.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.get": + +type OrganizationsLocationsReplaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. +// +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *OrganizationsLocationsReplaysService) Get(name string) *OrganizationsLocationsReplaysGetCall { + c := &OrganizationsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1betaReplay or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1betaReplay.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaReplay, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaReplay{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.replays.list": + +type OrganizationsLocationsReplaysListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists each Replay in a project, folder, or organization. Each +// `Replay` is available for at least 7 days. +// +// - parent: The parent resource, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global`, +// where `{resource-id}` is the ID of the project, folder, or +// organization that owns the Replay. Example: +// `projects/my-example-project/locations/global` Only `Replay` +// objects that are direct children of the provided parent are listed. +// In other words, `Replay` objects that are children of a project +// will not be included when the parent is a folder of that project. +func (r *OrganizationsLocationsReplaysService) List(parent string) *OrganizationsLocationsReplaysListCall { + c := &OrganizationsLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of Replay objects to return. Defaults to 50. The maximum value is +// 1000; values above 1000 are rounded down to 1000. +func (c *OrganizationsLocationsReplaysListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplays call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to Simulator.ListReplays must match the call that provided +// the page token. +func (c *OrganizationsLocationsReplaysListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsReplaysListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsReplaysListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsLocationsReplaysListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsLocationsReplaysListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.replays.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1betaListReplaysResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1betaListReplaysResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplaysResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaListReplaysResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/replays", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview -// generates an OrgPolicyViolationsPreview for the proposed changes in -// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes -// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources -// to scan are inferred from these specified changes. +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplaysResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "policysimulator.organizations.locations.replays.operations.get": + +type OrganizationsLocationsReplaysOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The organization under which this -// OrgPolicyViolationsPreview will be created. Example: -// `organizations/my-example-org/locations/global`. -func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview +// - name: The name of the operation resource. +func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { + c := &OrganizationsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" call. +// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3123,26 +5982,23 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } return ret, nil // { - // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", - // "httpMethod": "POST", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.replays.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", - // "request": { - // "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -3153,9 +6009,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googl } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": +// method id "policysimulator.organizations.locations.replays.operations.list": -type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { +type OrganizationsLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3164,21 +6020,42 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { header_ http.Header } -// Get: GetOrgPolicyViolationsPreview gets the specified -// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is -// available for at least 7 days. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the OrgPolicyViolationsPreview to get. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { + c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { +func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3188,7 +6065,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { +func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3196,21 +6073,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { +func (c *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { +func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3236,17 +6113,15 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. -// Exactly one of -// *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview, error) { +// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3265,7 +6140,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3277,25 +6152,41 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...go } return ret, nil // { - // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + // "id": "policysimulator.organizations.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3304,9 +6195,30 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...go } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { +// method id "policysimulator.organizations.locations.replays.results.list": + +type OrganizationsLocationsReplaysResultsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -3315,32 +6227,34 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall struct { header_ http.Header } -// List: ListOrgPolicyViolationsPreviews lists each -// OrgPolicyViolationsPreview in an organization. Each -// OrgPolicyViolationsPreview is available for at least 7 days. +// List: Lists the results of running a Replay. // -// - parent: The parent the violations are scoped to. Format: -// organizations/{organization}. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *OrganizationsLocationsReplaysResultsService) List(parent string) *OrganizationsLocationsReplaysResultsListCall { + c := &OrganizationsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. The service may return fewer than this value. If -// unspecified, at most 5 items will be returned. The maximum value is -// 10; values above 10 will be coerced to 10. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *OrganizationsLocationsReplaysResultsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysResultsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters must match the -// call that provided the page token. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *OrganizationsLocationsReplaysResultsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -3348,7 +6262,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +func (c *OrganizationsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3358,7 +6272,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ... // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +func (c *OrganizationsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -3366,21 +6280,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { +func (c *OrganizationsLocationsReplaysResultsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { +func (c *OrganizationsLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3393,7 +6307,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/results") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3406,17 +6320,17 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Do executes the "policysimulator.organizations.locations.replays.results.list" call. // Exactly one of -// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespon -// se or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespon -// se.ServerResponse.Header or (if a response was returned at all) in +// *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse, error) { +func (c *OrganizationsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3435,7 +6349,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse{ + ret := &GoogleCloudPolicysimulatorV1betaListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3447,36 +6361,36 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...g } return ret, nil // { - // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + // "id": "policysimulator.organizations.locations.replays.results.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + // "path": "v1beta/{+parent}/results", // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3488,7 +6402,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...g // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse) error) error { +func (c *OrganizationsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -3506,9 +6420,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx co } } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get": +// method id "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get": -type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { +type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3522,8 +6436,8 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -3531,7 +6445,7 @@ func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService) Get // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3541,7 +6455,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3549,21 +6463,21 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfN // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3589,14 +6503,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get" call. +// Do executes the "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3628,9 +6542,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", + // "id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", // "parameterOrder": [ // "name" // ], @@ -3638,7 +6552,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -3654,99 +6568,72 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( } -// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": +// method id "policysimulator.projects.locations.replays.create": -type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReplaysCreateCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are -// present in an OrgPolicyViolationsPreview. +// Create: Creates and starts a Replay using the given ReplayConfig. // -// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations -// from. Format: -// organizations/{organization}/locations/{location}/orgPolicyViolation -// sPreviews/{orgPolicyViolationsPreview}. -func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource where this Replay will be created. This +// resource must be a project, folder, or organization with a +// location. Example: `projects/my-example-project/locations/global`. +func (r *ProjectsLocationsReplaysService) Create(parent string, googlecloudpolicysimulatorv1betareplay *GoogleCloudPolicysimulatorV1betaReplay) *ProjectsLocationsReplaysCreateCall { + c := &ProjectsLocationsReplaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. The service may return fewer than this value. If -// unspecified, at most 50 items will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters must match the -// call that provided the page token. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googlecloudpolicysimulatorv1betareplay = googlecloudpolicysimulatorv1betareplay return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { +func (c *ProjectsLocationsReplaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { +func (c *ProjectsLocationsReplaysCreateCall) Context(ctx context.Context) *ProjectsLocationsReplaysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudpolicysimulatorv1betareplay) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3757,17 +6644,14 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. -// Exactly one of -// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse.Serve -// rResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse, error) { +// Do executes the "policysimulator.projects.locations.replays.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsReplaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3786,7 +6670,7 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3798,36 +6682,28 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis } return ret, nil // { - // "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", - // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + // "description": "Creates and starts a Replay using the given ReplayConfig.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays", + // "httpMethod": "POST", + // "id": "policysimulator.projects.locations.replays.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/orgPolicyViolations", + // "path": "v1beta/{+parent}/replays", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1betaReplay" + // }, // "response": { - // "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3836,30 +6712,9 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsLis } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "policysimulator.organizations.locations.replays.operations.get": +// method id "policysimulator.projects.locations.replays.get": -type OrganizationsLocationsReplaysOperationsGetCall struct { +type ProjectsLocationsReplaysGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3868,13 +6723,17 @@ type OrganizationsLocationsReplaysOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets the specified Replay. Each `Replay` is available for at +// least 7 days. // -// - name: The name of the operation resource. -func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *OrganizationsLocationsReplaysOperationsGetCall { - c := &OrganizationsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Replay to retrieve, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}`, where `{resource-id}` is the ID of the project, +// folder, or organization that owns the `Replay`. Example: +// `projects/my-example-project/locations/global/replays/506a5f7f-38ce- +// 4d7d-8e03-479ce1833c36`. +func (r *ProjectsLocationsReplaysService) Get(name string) *ProjectsLocationsReplaysGetCall { + c := &ProjectsLocationsReplaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -3882,7 +6741,7 @@ func (r *OrganizationsLocationsReplaysOperationsService) Get(name string) *Organ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3892,7 +6751,7 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3900,21 +6759,21 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -3940,14 +6799,15 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.organizations.locations.replays.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.projects.locations.replays.get" call. +// Exactly one of *GoogleCloudPolicysimulatorV1betaReplay or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudPolicysimulatorV1betaReplay.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaReplay, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3966,7 +6826,7 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudPolicysimulatorV1betaReplay{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3978,25 +6838,25 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.operations.get", + // "id": "policysimulator.projects.locations.replays.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudPolicysimulatorV1betaReplay" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4005,45 +6865,48 @@ func (c *OrganizationsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.Ca } -// method id "policysimulator.organizations.locations.replays.operations.list": +// method id "policysimulator.projects.locations.replays.list": -type OrganizationsLocationsReplaysOperationsListCall struct { +type ProjectsLocationsReplaysListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists each Replay in a project, folder, or organization. Each +// `Replay` is available for at least 7 days. // -// - name: The name of the operation's parent resource. -func (r *OrganizationsLocationsReplaysOperationsService) List(name string) *OrganizationsLocationsReplaysOperationsListCall { - c := &OrganizationsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OrganizationsLocationsReplaysOperationsListCall) Filter(filter string) *OrganizationsLocationsReplaysOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent resource, in the following format: +// `{projects|folders|organizations}/{resource-id}/locations/global`, +// where `{resource-id}` is the ID of the project, folder, or +// organization that owns the Replay. Example: +// `projects/my-example-project/locations/global` Only `Replay` +// objects that are direct children of the provided parent are listed. +// In other words, `Replay` objects that are children of a project +// will not be included when the parent is a folder of that project. +func (r *ProjectsLocationsReplaysService) List(parent string) *ProjectsLocationsReplaysListCall { + c := &ProjectsLocationsReplaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsReplaysOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of Replay objects to return. Defaults to 50. The maximum value is +// 1000; values above 1000 are rounded down to 1000. +func (c *ProjectsLocationsReplaysListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsReplaysOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplays call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to Simulator.ListReplays must match the call that provided +// the page token. +func (c *ProjectsLocationsReplaysListCall) PageToken(pageToken string) *ProjectsLocationsReplaysListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4051,7 +6914,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) PageToken(pageToken st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4061,7 +6924,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Fields(s ...googleapi. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysListCall { c.ifNoneMatch_ = entityTag return c } @@ -4069,21 +6932,21 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsReplaysOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysListCall) Context(ctx context.Context) *ProjectsLocationsReplaysListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsReplaysOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4096,7 +6959,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/replays") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4104,20 +6967,21 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "policysimulator.organizations.locations.replays.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.projects.locations.replays.list" call. +// Exactly one of *GoogleCloudPolicysimulatorV1betaListReplaysResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1betaListReplaysResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsReplaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplaysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4136,7 +7000,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1betaListReplaysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4148,41 +7012,36 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays", // "httpMethod": "GET", - // "id": "policysimulator.organizations.locations.replays.operations.list", + // "id": "policysimulator.projects.locations.replays.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/replays", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4194,7 +7053,7 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Do(opts ...googleapi.C // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsReplaysListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -4212,9 +7071,9 @@ func (c *OrganizationsLocationsReplaysOperationsListCall) Pages(ctx context.Cont } } -// method id "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get": +// method id "policysimulator.projects.locations.replays.operations.get": -type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { +type ProjectsLocationsReplaysOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4228,8 +7087,8 @@ type ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { - c := &ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { + c := &ProjectsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4237,7 +7096,7 @@ func (r *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4247,7 +7106,7 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -4255,21 +7114,21 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4295,14 +7154,14 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get" call. +// Do executes the "policysimulator.projects.locations.replays.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4334,9 +7193,9 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", + // "id": "policysimulator.projects.locations.replays.operations.get", // "parameterOrder": [ // "name" // ], @@ -4344,7 +7203,7 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", // "required": true, // "type": "string" // } @@ -4360,9 +7219,9 @@ func (c *ProjectsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts } -// method id "policysimulator.projects.locations.replays.operations.get": +// method id "policysimulator.projects.locations.replays.operations.list": -type ProjectsLocationsReplaysOperationsGetCall struct { +type ProjectsLocationsReplaysOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4371,21 +7230,42 @@ type ProjectsLocationsReplaysOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsReplaysOperationsService) Get(name string) *ProjectsLocationsReplaysOperationsGetCall { - c := &ProjectsLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { + c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4395,7 +7275,7 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -4403,21 +7283,21 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsReplaysOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsGetCall { +func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4443,14 +7323,15 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.projects.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4469,7 +7350,7 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4481,25 +7362,41 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.replays.operations.get", + // "id": "policysimulator.projects.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4508,45 +7405,66 @@ func (c *ProjectsLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpt } -// method id "policysimulator.projects.locations.replays.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsReplaysOperationsListCall struct { +// method id "policysimulator.projects.locations.replays.results.list": + +type ProjectsLocationsReplaysResultsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists the results of running a Replay. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsReplaysOperationsService) List(name string) *ProjectsLocationsReplaysOperationsListCall { - c := &ProjectsLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsReplaysOperationsListCall) Filter(filter string) *ProjectsLocationsReplaysOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The Replay whose results are listed, in the following +// format: +// `{projects|folders|organizations}/{resource-id}/locations/global/rep +// lays/{replay-id}` Example: +// `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e0 +// 3-479ce1833c36`. +func (r *ProjectsLocationsReplaysResultsService) List(parent string) *ProjectsLocationsReplaysResultsListCall { + c := &ProjectsLocationsReplaysResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsReplaysOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of ReplayResult objects to return. Defaults to 5000. The maximum +// value is 5000; values above 5000 are rounded down to 5000. +func (c *ProjectsLocationsReplaysResultsListCall) PageSize(pageSize int64) *ProjectsLocationsReplaysResultsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous Simulator.ListReplayResults call. Provide +// this token to retrieve the next page of results. When paginating, all +// other parameters provided to [Simulator.ListReplayResults[] must +// match the call that provided the page token. +func (c *ProjectsLocationsReplaysResultsListCall) PageToken(pageToken string) *ProjectsLocationsReplaysResultsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4554,7 +7472,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReplaysResultsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4564,7 +7482,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReplaysResultsListCall { c.ifNoneMatch_ = entityTag return c } @@ -4572,21 +7490,21 @@ func (c *ProjectsLocationsReplaysOperationsListCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsReplaysOperationsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysOperationsListCall { +func (c *ProjectsLocationsReplaysResultsListCall) Context(ctx context.Context) *ProjectsLocationsReplaysResultsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsReplaysOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsReplaysResultsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReplaysResultsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -4599,7 +7517,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/results") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4607,20 +7525,22 @@ func (c *ProjectsLocationsReplaysOperationsListCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.projects.locations.replays.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.projects.locations.replays.results.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaListReplayResultsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsReplaysResultsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4639,7 +7559,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1betaListReplayResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4651,41 +7571,36 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + // "description": "Lists the results of running a Replay.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", // "httpMethod": "GET", - // "id": "policysimulator.projects.locations.replays.operations.list", + // "id": "policysimulator.projects.locations.replays.results.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/results", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4697,7 +7612,7 @@ func (c *ProjectsLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsReplaysResultsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListReplayResultsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { diff --git a/policytroubleshooter/v1/policytroubleshooter-gen.go b/policytroubleshooter/v1/policytroubleshooter-gen.go index e360ef35ec1..8c1821d079b 100644 --- a/policytroubleshooter/v1/policytroubleshooter-gen.go +++ b/policytroubleshooter/v1/policytroubleshooter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policytroubleshooterService, err := policytroubleshooter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policytroubleshooterService, err := policytroubleshooter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policytroubleshooterService, err := policytroubleshooter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policytroubleshooter // import "google.golang.org/api/policytroubleshooter/v1" import ( diff --git a/policytroubleshooter/v1beta/policytroubleshooter-gen.go b/policytroubleshooter/v1beta/policytroubleshooter-gen.go index 295aae51879..2ea3b2b7068 100644 --- a/policytroubleshooter/v1beta/policytroubleshooter-gen.go +++ b/policytroubleshooter/v1beta/policytroubleshooter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/iam/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // policytroubleshooterService, err := policytroubleshooter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // policytroubleshooterService, err := policytroubleshooter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // policytroubleshooterService, err := policytroubleshooter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package policytroubleshooter // import "google.golang.org/api/policytroubleshooter/v1beta" import ( diff --git a/poly/v1/poly-gen.go b/poly/v1/poly-gen.go index 3449aef67fd..d7a83903cea 100644 --- a/poly/v1/poly-gen.go +++ b/poly/v1/poly-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/poly/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // polyService, err := poly.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // polyService, err := poly.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // polyService, err := poly.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package poly // import "google.golang.org/api/poly/v1" import ( diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index d141b8526e2..0e693078ba8 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -1605,7 +1605,7 @@ } } }, - "revision": "20230620", + "revision": "20230816", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -2264,6 +2264,11 @@ "description": "Optional. Labels with user-defined metadata.", "type": "object" }, + "maximumLifetime": { + "description": "Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", + "format": "google-duration", + "type": "string" + }, "name": { "description": "Output only. The resource name for this CertificateTemplate in the format `projects/*/locations/*/certificateTemplates/*`.", "readOnly": true, @@ -2901,7 +2906,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -2952,7 +2957,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { @@ -3329,7 +3334,7 @@ "properties": { "subject": { "$ref": "Subject", - "description": "Required. Contains distinguished name fields such as the common name, location and organization." + "description": "Optional. Contains distinguished name fields such as the common name, location and organization." }, "subjectAltName": { "$ref": "SubjectAltNames", diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index 898d48da83e..8c286f5da3e 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // privatecaService, err := privateca.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // privatecaService, err := privateca.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // privatecaService, err := privateca.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package privateca // import "google.golang.org/api/privateca/v1" import ( @@ -1243,6 +1256,15 @@ type CertificateTemplate struct { // Labels: Optional. Labels with user-defined metadata. Labels map[string]string `json:"labels,omitempty"` + // MaximumLifetime: Optional. The maximum lifetime allowed for issued + // Certificates that use this template. If the issuing CaPool's + // IssuancePolicy specifies a maximum_lifetime the minimum of the two + // durations will be the maximum lifetime for issued Certificates. Note + // that if the issuing CertificateAuthority expires before a + // Certificate's requested maximum_lifetime, the effective lifetime will + // be explicitly truncated to match it. + MaximumLifetime string `json:"maximumLifetime,omitempty"` + // Name: Output only. The resource name for this CertificateTemplate in // the format `projects/*/locations/*/certificateTemplates/*`. Name string `json:"name,omitempty"` @@ -2420,8 +2442,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -2523,7 +2545,7 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -2532,17 +2554,17 @@ func (s *OperationMetadata) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. @@ -3158,7 +3180,7 @@ func (s *SubjectAltNames) MarshalJSON() ([]byte, error) { // SubjectConfig: These values are used to create the distinguished name // and subject alternative name fields in an X.509 certificate. type SubjectConfig struct { - // Subject: Required. Contains distinguished name fields such as the + // Subject: Optional. Contains distinguished name fields such as the // common name, location and organization. Subject *Subject `json:"subject,omitempty"` diff --git a/privateca/v1beta1/privateca-api.json b/privateca/v1beta1/privateca-api.json index f40aaf3bc7e..b8c228ddfc5 100644 --- a/privateca/v1beta1/privateca-api.json +++ b/privateca/v1beta1/privateca-api.json @@ -580,7 +580,7 @@ } } }, - "revision": "20230620", + "revision": "20230816", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AuditConfig": { @@ -787,14 +787,14 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "auditConfigs": { diff --git a/privateca/v1beta1/privateca-gen.go b/privateca/v1beta1/privateca-gen.go index 66f9e19de63..65920a339ac 100644 --- a/privateca/v1beta1/privateca-gen.go +++ b/privateca/v1beta1/privateca-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // privatecaService, err := privateca.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // privatecaService, err := privateca.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // privatecaService, err := privateca.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package privateca // import "google.golang.org/api/privateca/v1beta1" import ( @@ -607,8 +620,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -658,7 +671,7 @@ func (s *Operation) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -667,17 +680,17 @@ func (s *Operation) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // AuditConfigs: Specifies cloud audit logging configuration for this // policy. diff --git a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go index c56a0d2766d..13b3ba9b4e1 100644 --- a/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go +++ b/prod_tt_sasportal/v1alpha1/prod_tt_sasportal-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/spectrum-access-system/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // prod_tt_sasportalService, err := prod_tt_sasportal.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // prod_tt_sasportalService, err := prod_tt_sasportal.NewService(ctx, option.WithScopes(prod_tt_sasportal.SasportalScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // prod_tt_sasportalService, err := prod_tt_sasportal.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // prod_tt_sasportalService, err := prod_tt_sasportal.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package prod_tt_sasportal // import "google.golang.org/api/prod_tt_sasportal/v1alpha1" import ( diff --git a/publicca/v1/publicca-gen.go b/publicca/v1/publicca-gen.go index 208c9c686fd..bc871752376 100644 --- a/publicca/v1/publicca-gen.go +++ b/publicca/v1/publicca-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/public-certificate-authority/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // publiccaService, err := publicca.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // publiccaService, err := publicca.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // publiccaService, err := publicca.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package publicca // import "google.golang.org/api/publicca/v1" import ( diff --git a/publicca/v1alpha1/publicca-gen.go b/publicca/v1alpha1/publicca-gen.go index 1cd26402855..da6d0bd1889 100644 --- a/publicca/v1alpha1/publicca-gen.go +++ b/publicca/v1alpha1/publicca-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/public-certificate-authority/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // publiccaService, err := publicca.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // publiccaService, err := publicca.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // publiccaService, err := publicca.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package publicca // import "google.golang.org/api/publicca/v1alpha1" import ( diff --git a/publicca/v1beta1/publicca-gen.go b/publicca/v1beta1/publicca-gen.go index 06ce2cac85a..bf3164f1fbf 100644 --- a/publicca/v1beta1/publicca-gen.go +++ b/publicca/v1beta1/publicca-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/public-certificate-authority/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // publiccaService, err := publicca.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // publiccaService, err := publicca.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // publiccaService, err := publicca.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package publicca // import "google.golang.org/api/publicca/v1beta1" import ( diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index d291406eeb3..a1459b4c461 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -18,6 +18,13 @@ "description": "Provides reliable, many-to-many, asynchronous messaging between applications. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/pubsub/docs", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" @@ -1566,7 +1573,7 @@ } } }, - "revision": "20230801", + "revision": "20230830", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index 61ed2393bb4..61c04ab96b9 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/pubsub/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // pubsubService, err := pubsub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // pubsubService, err := pubsub.NewService(ctx, option.WithScopes(pubsub.PubsubScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // pubsubService, err := pubsub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // pubsubService, err := pubsub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package pubsub // import "google.golang.org/api/pubsub/v1" import ( diff --git a/pubsub/v1beta1a/pubsub-api.json b/pubsub/v1beta1a/pubsub-api.json index 9870ee2da0c..c8ad5682bcd 100644 --- a/pubsub/v1beta1a/pubsub-api.json +++ b/pubsub/v1beta1a/pubsub-api.json @@ -18,6 +18,13 @@ "description": "Provides reliable, many-to-many, asynchronous messaging between applications. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/pubsub/docs", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" @@ -457,7 +464,7 @@ } } }, - "revision": "20230711", + "revision": "20230830", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsub/v1beta1a/pubsub-gen.go b/pubsub/v1beta1a/pubsub-gen.go index 71700c2c580..ed5aabd0e41 100644 --- a/pubsub/v1beta1a/pubsub-gen.go +++ b/pubsub/v1beta1a/pubsub-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/pubsub/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // pubsubService, err := pubsub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // pubsubService, err := pubsub.NewService(ctx, option.WithScopes(pubsub.PubsubScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // pubsubService, err := pubsub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // pubsubService, err := pubsub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package pubsub // import "google.golang.org/api/pubsub/v1beta1a" import ( diff --git a/pubsub/v1beta2/pubsub-api.json b/pubsub/v1beta2/pubsub-api.json index c9a01aa5cbb..2fc7e7b28c3 100644 --- a/pubsub/v1beta2/pubsub-api.json +++ b/pubsub/v1beta2/pubsub-api.json @@ -18,6 +18,13 @@ "description": "Provides reliable, many-to-many, asynchronous messaging between applications. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/pubsub/docs", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" @@ -724,7 +731,7 @@ } } }, - "revision": "20230801", + "revision": "20230830", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsub/v1beta2/pubsub-gen.go b/pubsub/v1beta2/pubsub-gen.go index c4679753c3a..14969d296ec 100644 --- a/pubsub/v1beta2/pubsub-gen.go +++ b/pubsub/v1beta2/pubsub-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/pubsub/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // pubsubService, err := pubsub.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // pubsubService, err := pubsub.NewService(ctx, option.WithScopes(pubsub.PubsubScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // pubsubService, err := pubsub.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // pubsubService, err := pubsub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package pubsub // import "google.golang.org/api/pubsub/v1beta2" import ( diff --git a/pubsublite/v1/pubsublite-gen.go b/pubsublite/v1/pubsublite-gen.go index a017660cf57..4d1c4ef1d9a 100644 --- a/pubsublite/v1/pubsublite-gen.go +++ b/pubsublite/v1/pubsublite-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/pubsub/lite/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // pubsubliteService, err := pubsublite.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // pubsubliteService, err := pubsublite.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // pubsubliteService, err := pubsublite.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package pubsublite // import "google.golang.org/api/pubsublite/v1" import ( diff --git a/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go b/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go index 44551969cb9..e0f83c85902 100644 --- a/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go +++ b/readerrevenuesubscriptionlinking/v1/readerrevenuesubscriptionlinking-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/news/subscribe/subscription-linking/overview // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // readerrevenuesubscriptionlinkingService, err := readerrevenuesubscriptionlinking.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // readerrevenuesubscriptionlinkingService, err := readerrevenuesubscriptionlinking.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // readerrevenuesubscriptionlinkingService, err := readerrevenuesubscriptionlinking.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package readerrevenuesubscriptionlinking // import "google.golang.org/api/readerrevenuesubscriptionlinking/v1" import ( diff --git a/realtimebidding/v1/realtimebidding-api.json b/realtimebidding/v1/realtimebidding-api.json index 26cba11de7e..4b4edefd222 100644 --- a/realtimebidding/v1/realtimebidding-api.json +++ b/realtimebidding/v1/realtimebidding-api.json @@ -885,7 +885,7 @@ ] }, "getRemarketingTag": { - "description": "Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", + "description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", "flatPath": "v1/buyers/{buyersId}:getRemarketingTag", "httpMethod": "GET", "id": "realtimebidding.buyers.getRemarketingTag", @@ -894,7 +894,7 @@ ], "parameters": { "name": { - "description": "Required. To fetch remarketing tag for an account, name must follow the pattern `buyers/{accountId}` where `{accountId}` represents ID of a buyer that owns the remarketing tag. For a bidder accessing remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch remarketing tag for a specific user list, name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", + "description": "Required. To fetch the remarketing tag for an account, the name must follow the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of the buyer that owns the remarketing tag. For a bidder accessing the remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch the remarketing tag for a specific user list, the name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", "location": "path", "pattern": "^buyers/[^/]+$", "required": true, @@ -1103,7 +1103,7 @@ "userLists": { "methods": { "close": { - "description": "Change the status of a user list to CLOSED. This prevents new users from being added to the user list.", + "description": "Changes the status of a user list to CLOSED. This prevents new users from being added to the user list.", "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:close", "httpMethod": "POST", "id": "realtimebidding.buyers.userLists.close", @@ -1131,7 +1131,7 @@ ] }, "create": { - "description": "Create a new user list.", + "description": "Creates a new user list.", "flatPath": "v1/buyers/{buyersId}/userLists", "httpMethod": "POST", "id": "realtimebidding.buyers.userLists.create", @@ -1140,7 +1140,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the parent buyer of the user list to be retrieved that must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns user lists. For a bidder accessing user lists on behalf of a child seat buyer , `{buyerAccountId}` should represent the account ID of the child seat buyer.", + "description": "Required. The name of the parent buyer of the user list to be retrieved, which must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns the user list. For a bidder accessing user lists on behalf of a child seat buyer, `{buyerAccountId}` should represent the account ID of the child seat buyer.", "location": "path", "pattern": "^buyers/[^/]+$", "required": true, @@ -1184,7 +1184,7 @@ ] }, "getRemarketingTag": { - "description": "Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", + "description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:getRemarketingTag", "httpMethod": "GET", "id": "realtimebidding.buyers.userLists.getRemarketingTag", @@ -1193,7 +1193,7 @@ ], "parameters": { "name": { - "description": "Required. To fetch remarketing tag for an account, name must follow the pattern `buyers/{accountId}` where `{accountId}` represents ID of a buyer that owns the remarketing tag. For a bidder accessing remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch remarketing tag for a specific user list, name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", + "description": "Required. To fetch the remarketing tag for an account, the name must follow the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of the buyer that owns the remarketing tag. For a bidder accessing the remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch the remarketing tag for a specific user list, the name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", "location": "path", "pattern": "^buyers/[^/]+/userLists/[^/]+$", "required": true, @@ -1224,7 +1224,7 @@ "type": "integer" }, "pageToken": { - "description": "Continuation page token (as received from a previous response).", + "description": "Continuation page token as received from a previous response.", "location": "query", "type": "string" }, @@ -1245,7 +1245,7 @@ ] }, "open": { - "description": "Change the status of a user list to OPEN. This allows new users to be added to the user list.", + "description": "Changes the status of a user list to OPEN. This allows new users to be added to the user list.", "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:open", "httpMethod": "POST", "id": "realtimebidding.buyers.userLists.open", @@ -1273,7 +1273,7 @@ ] }, "update": { - "description": "Update the given user list. Only user lists with URLRestrictions can be updated.", + "description": "Updates the given user list. Only user lists with URLRestrictions can be updated.", "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}", "httpMethod": "PUT", "id": "realtimebidding.buyers.userLists.update", @@ -1305,7 +1305,7 @@ } } }, - "revision": "20230705", + "revision": "20230907", "rootUrl": "https://realtimebidding.googleapis.com/", "schemas": { "ActivatePretargetingConfigRequest": { @@ -2311,11 +2311,11 @@ "type": "object" }, "GetRemarketingTagResponse": { - "description": "Response for a request to get remarketing tag.", + "description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Response for a request to get remarketing tag.", "id": "GetRemarketingTagResponse", "properties": { "snippet": { - "description": "A HTML tag that can be placed on the advertiser's page to add users to a user list. For more information and code samples on using snippet on your website refer to [Tag your site for remarketing]( https://support.google.com/google-ads/answer/2476688).", + "description": "An HTML tag that can be placed on the advertiser's page to add users to a user list. For more information and code samples on using snippets on your website, refer to [Tag your site for remarketing](https://support.google.com/google-ads/answer/2476688).", "type": "string" } }, @@ -2509,7 +2509,7 @@ "id": "ListUserListsResponse", "properties": { "nextPageToken": { - "description": "The continuation page token to send back to the server in a subsequent request. Due to a currently known issue, it is recommended that the caller keep invoking the list method till the time a next page token is not returned (even if the result set is empty).", + "description": "The continuation page token to send back to the server in a subsequent request. Due to a currently known issue, it is recommended that the caller keep invoking the list method until the time a next page token is not returned, even if the result set is empty.", "type": "string" }, "userLists": { @@ -3124,7 +3124,7 @@ "type": "object" }, "UrlRestriction": { - "description": "Represents the URL restriction (for the URL captured by the pixel callback) for a user list.", + "description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Represents the URL restriction (for the URL captured by the pixel callback) for a user list.", "id": "UrlRestriction", "properties": { "endDate": { @@ -3207,7 +3207,7 @@ }, "urlRestriction": { "$ref": "UrlRestriction", - "description": "Required. The URL restriction for the user list." + "description": "Required. Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api The URL restriction for the user list." } }, "type": "object" diff --git a/realtimebidding/v1/realtimebidding-gen.go b/realtimebidding/v1/realtimebidding-gen.go index c4acb00bfc1..bfa1dec6335 100644 --- a/realtimebidding/v1/realtimebidding-gen.go +++ b/realtimebidding/v1/realtimebidding-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // realtimebiddingService, err := realtimebidding.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // realtimebiddingService, err := realtimebidding.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // realtimebiddingService, err := realtimebidding.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package realtimebidding // import "google.golang.org/api/realtimebidding/v1" import ( @@ -1607,13 +1620,15 @@ func (s *Endpoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GetRemarketingTagResponse: Response for a request to get remarketing -// tag. +// GetRemarketingTagResponse: Deprecated. This will be removed in +// October 2023. For more information, see the release notes: +// https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api +// Response for a request to get remarketing tag. type GetRemarketingTagResponse struct { - // Snippet: A HTML tag that can be placed on the advertiser's page to + // Snippet: An HTML tag that can be placed on the advertiser's page to // add users to a user list. For more information and code samples on - // using snippet on your website refer to Tag your site for remarketing - // ( https://support.google.com/google-ads/answer/2476688). + // using snippets on your website, refer to Tag your site for + // remarketing (https://support.google.com/google-ads/answer/2476688). Snippet string `json:"snippet,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2012,9 +2027,9 @@ func (s *ListPublisherConnectionsResponse) MarshalJSON() ([]byte, error) { type ListUserListsResponse struct { // NextPageToken: The continuation page token to send back to the server // in a subsequent request. Due to a currently known issue, it is - // recommended that the caller keep invoking the list method till the - // time a next page token is not returned (even if the result set is - // empty). + // recommended that the caller keep invoking the list method until the + // time a next page token is not returned, even if the result set is + // empty. NextPageToken string `json:"nextPageToken,omitempty"` // UserLists: List of user lists from the search. @@ -2854,8 +2869,11 @@ func (s *UrlDownloadSize) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// UrlRestriction: Represents the URL restriction (for the URL captured -// by the pixel callback) for a user list. +// UrlRestriction: Deprecated. This will be removed in October 2023. For +// more information, see the release notes: +// https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api +// Represents the URL restriction (for the URL captured by the pixel +// callback) for a user list. type UrlRestriction struct { // EndDate: End date (if specified) of the URL restriction. End date // should be later than the start date for the date range to be valid. @@ -2950,7 +2968,10 @@ type UserList struct { // "CLOSED" - New users cannot be added to the user list. Status string `json:"status,omitempty"` - // UrlRestriction: Required. The URL restriction for the user list. + // UrlRestriction: Required. Deprecated. This will be removed in October + // 2023. For more information, see the release notes: + // https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api + // The URL restriction for the user list. UrlRestriction *UrlRestriction `json:"urlRestriction,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -7137,19 +7158,22 @@ type BuyersGetRemarketingTagCall struct { header_ http.Header } -// GetRemarketingTag: Gets remarketing tag for a buyer. A remarketing -// tag is a piece of JavaScript code that can be placed on a web page. -// When a user visits a page containing a remarketing tag, Google adds -// the user to a user list. +// GetRemarketingTag: Deprecated. This will be removed in October 2023. +// For more information, see the release notes: +// https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api +// Gets remarketing tag for a buyer. A remarketing tag is a piece of +// JavaScript code that can be placed on a web page. When a user visits +// a page containing a remarketing tag, Google adds the user to a user +// list. // -// - name: To fetch remarketing tag for an account, name must follow the -// pattern `buyers/{accountId}` where `{accountId}` represents ID of a -// buyer that owns the remarketing tag. For a bidder accessing -// remarketing tag on behalf of a child seat buyer, `{accountId}` -// should represent the ID of the child seat buyer. To fetch -// remarketing tag for a specific user list, name must follow the -// pattern `buyers/{accountId}/userLists/{userListId}`. See -// UserList.name. +// - name: To fetch the remarketing tag for an account, the name must +// follow the pattern `buyers/{accountId}`, where `{accountId}` +// represents the ID of the buyer that owns the remarketing tag. For a +// bidder accessing the remarketing tag on behalf of a child seat +// buyer, `{accountId}` should represent the ID of the child seat +// buyer. To fetch the remarketing tag for a specific user list, the +// name must follow the pattern +// `buyers/{accountId}/userLists/{userListId}`. See UserList.name. func (r *BuyersService) GetRemarketingTag(name string) *BuyersGetRemarketingTagCall { c := &BuyersGetRemarketingTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7255,7 +7279,7 @@ func (c *BuyersGetRemarketingTagCall) Do(opts ...googleapi.CallOption) (*GetRema } return ret, nil // { - // "description": "Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", + // "description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", // "flatPath": "v1/buyers/{buyersId}:getRemarketingTag", // "httpMethod": "GET", // "id": "realtimebidding.buyers.getRemarketingTag", @@ -7264,7 +7288,7 @@ func (c *BuyersGetRemarketingTagCall) Do(opts ...googleapi.CallOption) (*GetRema // ], // "parameters": { // "name": { - // "description": "Required. To fetch remarketing tag for an account, name must follow the pattern `buyers/{accountId}` where `{accountId}` represents ID of a buyer that owns the remarketing tag. For a bidder accessing remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch remarketing tag for a specific user list, name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", + // "description": "Required. To fetch the remarketing tag for an account, the name must follow the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of the buyer that owns the remarketing tag. For a bidder accessing the remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch the remarketing tag for a specific user list, the name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", // "location": "path", // "pattern": "^buyers/[^/]+$", // "required": true, @@ -8236,7 +8260,7 @@ type BuyersUserListsCloseCall struct { header_ http.Header } -// Close: Change the status of a user list to CLOSED. This prevents new +// Close: Changes the status of a user list to CLOSED. This prevents new // users from being added to the user list. // // - name: The name of the user list to close. See UserList.name. @@ -8338,7 +8362,7 @@ func (c *BuyersUserListsCloseCall) Do(opts ...googleapi.CallOption) (*UserList, } return ret, nil // { - // "description": "Change the status of a user list to CLOSED. This prevents new users from being added to the user list.", + // "description": "Changes the status of a user list to CLOSED. This prevents new users from being added to the user list.", // "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:close", // "httpMethod": "POST", // "id": "realtimebidding.buyers.userLists.close", @@ -8379,13 +8403,13 @@ type BuyersUserListsCreateCall struct { header_ http.Header } -// Create: Create a new user list. +// Create: Creates a new user list. // // - parent: The name of the parent buyer of the user list to be -// retrieved that must follow the pattern `buyers/{buyerAccountId}`, +// retrieved, which must follow the pattern `buyers/{buyerAccountId}`, // where `{buyerAccountId}` represents the account ID of the buyer who -// owns user lists. For a bidder accessing user lists on behalf of a -// child seat buyer , `{buyerAccountId}` should represent the account +// owns the user list. For a bidder accessing user lists on behalf of +// a child seat buyer, `{buyerAccountId}` should represent the account // ID of the child seat buyer. func (r *BuyersUserListsService) Create(parent string, userlist *UserList) *BuyersUserListsCreateCall { c := &BuyersUserListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -8485,7 +8509,7 @@ func (c *BuyersUserListsCreateCall) Do(opts ...googleapi.CallOption) (*UserList, } return ret, nil // { - // "description": "Create a new user list.", + // "description": "Creates a new user list.", // "flatPath": "v1/buyers/{buyersId}/userLists", // "httpMethod": "POST", // "id": "realtimebidding.buyers.userLists.create", @@ -8494,7 +8518,7 @@ func (c *BuyersUserListsCreateCall) Do(opts ...googleapi.CallOption) (*UserList, // ], // "parameters": { // "parent": { - // "description": "Required. The name of the parent buyer of the user list to be retrieved that must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns user lists. For a bidder accessing user lists on behalf of a child seat buyer , `{buyerAccountId}` should represent the account ID of the child seat buyer.", + // "description": "Required. The name of the parent buyer of the user list to be retrieved, which must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns the user list. For a bidder accessing user lists on behalf of a child seat buyer, `{buyerAccountId}` should represent the account ID of the child seat buyer.", // "location": "path", // "pattern": "^buyers/[^/]+$", // "required": true, @@ -8672,19 +8696,22 @@ type BuyersUserListsGetRemarketingTagCall struct { header_ http.Header } -// GetRemarketingTag: Gets remarketing tag for a buyer. A remarketing -// tag is a piece of JavaScript code that can be placed on a web page. -// When a user visits a page containing a remarketing tag, Google adds -// the user to a user list. +// GetRemarketingTag: Deprecated. This will be removed in October 2023. +// For more information, see the release notes: +// https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api +// Gets remarketing tag for a buyer. A remarketing tag is a piece of +// JavaScript code that can be placed on a web page. When a user visits +// a page containing a remarketing tag, Google adds the user to a user +// list. // -// - name: To fetch remarketing tag for an account, name must follow the -// pattern `buyers/{accountId}` where `{accountId}` represents ID of a -// buyer that owns the remarketing tag. For a bidder accessing -// remarketing tag on behalf of a child seat buyer, `{accountId}` -// should represent the ID of the child seat buyer. To fetch -// remarketing tag for a specific user list, name must follow the -// pattern `buyers/{accountId}/userLists/{userListId}`. See -// UserList.name. +// - name: To fetch the remarketing tag for an account, the name must +// follow the pattern `buyers/{accountId}`, where `{accountId}` +// represents the ID of the buyer that owns the remarketing tag. For a +// bidder accessing the remarketing tag on behalf of a child seat +// buyer, `{accountId}` should represent the ID of the child seat +// buyer. To fetch the remarketing tag for a specific user list, the +// name must follow the pattern +// `buyers/{accountId}/userLists/{userListId}`. See UserList.name. func (r *BuyersUserListsService) GetRemarketingTag(name string) *BuyersUserListsGetRemarketingTagCall { c := &BuyersUserListsGetRemarketingTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -8790,7 +8817,7 @@ func (c *BuyersUserListsGetRemarketingTagCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", + // "description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", // "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:getRemarketingTag", // "httpMethod": "GET", // "id": "realtimebidding.buyers.userLists.getRemarketingTag", @@ -8799,7 +8826,7 @@ func (c *BuyersUserListsGetRemarketingTagCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "Required. To fetch remarketing tag for an account, name must follow the pattern `buyers/{accountId}` where `{accountId}` represents ID of a buyer that owns the remarketing tag. For a bidder accessing remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch remarketing tag for a specific user list, name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", + // "description": "Required. To fetch the remarketing tag for an account, the name must follow the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of the buyer that owns the remarketing tag. For a bidder accessing the remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch the remarketing tag for a specific user list, the name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", // "location": "path", // "pattern": "^buyers/[^/]+/userLists/[^/]+$", // "required": true, @@ -8850,7 +8877,7 @@ func (c *BuyersUserListsListCall) PageSize(pageSize int64) *BuyersUserListsListC } // PageToken sets the optional parameter "pageToken": Continuation page -// token (as received from a previous response). +// token as received from a previous response. func (c *BuyersUserListsListCall) PageToken(pageToken string) *BuyersUserListsListCall { c.urlParams_.Set("pageToken", pageToken) return c @@ -8970,7 +8997,7 @@ func (c *BuyersUserListsListCall) Do(opts ...googleapi.CallOption) (*ListUserLis // "type": "integer" // }, // "pageToken": { - // "description": "Continuation page token (as received from a previous response).", + // "description": "Continuation page token as received from a previous response.", // "location": "query", // "type": "string" // }, @@ -9025,8 +9052,8 @@ type BuyersUserListsOpenCall struct { header_ http.Header } -// Open: Change the status of a user list to OPEN. This allows new users -// to be added to the user list. +// Open: Changes the status of a user list to OPEN. This allows new +// users to be added to the user list. // // - name: The name of the user list to open. See UserList.name. func (r *BuyersUserListsService) Open(name string, openuserlistrequest *OpenUserListRequest) *BuyersUserListsOpenCall { @@ -9127,7 +9154,7 @@ func (c *BuyersUserListsOpenCall) Do(opts ...googleapi.CallOption) (*UserList, e } return ret, nil // { - // "description": "Change the status of a user list to OPEN. This allows new users to be added to the user list.", + // "description": "Changes the status of a user list to OPEN. This allows new users to be added to the user list.", // "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:open", // "httpMethod": "POST", // "id": "realtimebidding.buyers.userLists.open", @@ -9168,7 +9195,7 @@ type BuyersUserListsUpdateCall struct { header_ http.Header } -// Update: Update the given user list. Only user lists with +// Update: Updates the given user list. Only user lists with // URLRestrictions can be updated. // // - name: Output only. Name of the user list that must follow the @@ -9276,7 +9303,7 @@ func (c *BuyersUserListsUpdateCall) Do(opts ...googleapi.CallOption) (*UserList, } return ret, nil // { - // "description": "Update the given user list. Only user lists with URLRestrictions can be updated.", + // "description": "Updates the given user list. Only user lists with URLRestrictions can be updated.", // "flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}", // "httpMethod": "PUT", // "id": "realtimebidding.buyers.userLists.update", diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index b69d810b07d..b5508477a53 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recaptcha-enterprise/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // recaptchaenterpriseService, err := recaptchaenterprise.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package recaptchaenterprise // import "google.golang.org/api/recaptchaenterprise/v1" import ( diff --git a/recommendationengine/v1beta1/recommendationengine-gen.go b/recommendationengine/v1beta1/recommendationengine-gen.go index ea1d8024d47..1d202edaba2 100644 --- a/recommendationengine/v1beta1/recommendationengine-gen.go +++ b/recommendationengine/v1beta1/recommendationengine-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recommendations-ai/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // recommendationengineService, err := recommendationengine.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // recommendationengineService, err := recommendationengine.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // recommendationengineService, err := recommendationengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package recommendationengine // import "google.golang.org/api/recommendationengine/v1beta1" import ( diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index 889b077de28..6cc96d09017 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recommender/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // recommenderService, err := recommender.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // recommenderService, err := recommender.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // recommenderService, err := recommender.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package recommender // import "google.golang.org/api/recommender/v1" import ( diff --git a/recommender/v1beta1/recommender-gen.go b/recommender/v1beta1/recommender-gen.go index 869d117eb83..a613d419ab9 100644 --- a/recommender/v1beta1/recommender-gen.go +++ b/recommender/v1beta1/recommender-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recommender/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // recommenderService, err := recommender.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // recommenderService, err := recommender.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // recommenderService, err := recommender.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package recommender // import "google.golang.org/api/recommender/v1beta1" import ( diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 3127b911d83..40351fb3170 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/memorystore/docs/redis/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // redisService, err := redis.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // redisService, err := redis.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // redisService, err := redis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package redis // import "google.golang.org/api/redis/v1" import ( diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 0a4336493f1..6675ddd484d 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/memorystore/docs/redis/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // redisService, err := redis.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // redisService, err := redis.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // redisService, err := redis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package redis // import "google.golang.org/api/redis/v1beta1" import ( diff --git a/reseller/v1/reseller-gen.go b/reseller/v1/reseller-gen.go index b29d9558e36..81cd8b25357 100644 --- a/reseller/v1/reseller-gen.go +++ b/reseller/v1/reseller-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/google-apps/reseller/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // resellerService, err := reseller.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // resellerService, err := reseller.NewService(ctx, option.WithScopes(reseller.AppsOrderReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // resellerService, err := reseller.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // resellerService, err := reseller.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package reseller // import "google.golang.org/api/reseller/v1" import ( diff --git a/resourcesettings/v1/resourcesettings-gen.go b/resourcesettings/v1/resourcesettings-gen.go index 28f17e6cbd6..798198ae8be 100644 --- a/resourcesettings/v1/resourcesettings-gen.go +++ b/resourcesettings/v1/resourcesettings-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/resource-manager/docs/resource-settings/overview // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // resourcesettingsService, err := resourcesettings.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // resourcesettingsService, err := resourcesettings.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // resourcesettingsService, err := resourcesettings.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package resourcesettings // import "google.golang.org/api/resourcesettings/v1" import ( diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index d6e01ebc493..89b3e151937 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2059,7 +2059,7 @@ } } }, - "revision": "20230805", + "revision": "20230906", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2449,6 +2449,10 @@ ], "type": "string" }, + "facetConfig": { + "$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfig", + "description": "Contains facet options." + }, "inUse": { "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, @@ -2518,6 +2522,76 @@ }, "type": "object" }, + "GoogleCloudRetailV2CatalogAttributeFacetConfig": { + "description": "Possible options for the facet that corresponds to the current attribute config.", + "id": "GoogleCloudRetailV2CatalogAttributeFacetConfig", + "properties": { + "facetIntervals": { + "description": "If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.", + "items": { + "$ref": "GoogleCloudRetailV2Interval" + }, + "type": "array" + }, + "ignoredFacetValues": { + "description": "Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.", + "items": { + "$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues" + }, + "type": "array" + }, + "mergedFacetValues": { + "description": "Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if \"dark_blue\" merged into \"BLUE\", then the latter can't merge into \"blues\" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100.", + "items": { + "$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues": { + "description": "Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.", + "id": "GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues", + "properties": { + "endTime": { + "description": "If start time is empty and end time is not empty, then ignore these facet values before end time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.", + "format": "google-datetime", + "type": "string" + }, + "values": { + "description": "List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 60 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue": { + "description": "Replaces a set of facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute.", + "id": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue", + "properties": { + "mergedValue": { + "description": "All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 60 characters.", + "type": "string" + }, + "values": { + "description": "All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 60 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2ColorInfo", @@ -2696,6 +2770,13 @@ }, "type": "array" }, + "pageCategories": { + "description": "Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;", + "items": { + "type": "string" + }, + "type": "array" + }, "queryTerms": { "description": "A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).", "items": { @@ -4222,6 +4303,10 @@ "$ref": "GoogleCloudRetailV2RuleFilterAction", "description": "Filters results." }, + "forceReturnFacetAction": { + "$ref": "GoogleCloudRetailV2RuleForceReturnFacetAction", + "description": "Force returns an attribute as a facet in the request." + }, "ignoreAction": { "$ref": "GoogleCloudRetailV2RuleIgnoreAction", "description": "Ignores specific terms from query during search." @@ -4234,6 +4319,10 @@ "$ref": "GoogleCloudRetailV2RuleRedirectAction", "description": "Redirects a shopper to a specific page." }, + "removeFacetAction": { + "$ref": "GoogleCloudRetailV2RuleRemoveFacetAction", + "description": "Remove an attribute as a facet in the request (if present)." + }, "replacementAction": { "$ref": "GoogleCloudRetailV2RuleReplacementAction", "description": "Replaces specific terms in the query." @@ -4300,6 +4389,36 @@ }, "type": "object" }, + "GoogleCloudRetailV2RuleForceReturnFacetAction": { + "description": "Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: - Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is \"size\" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key \"size\" is not already in the top 8 slots, then the facet \"size\" will appear at a position close to 8. b) The facet key \"size\" in among the top 8 positions in the request, then it will stay at its current rank.", + "id": "GoogleCloudRetailV2RuleForceReturnFacetAction", + "properties": { + "facetPositionAdjustments": { + "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", + "items": { + "$ref": "GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment": { + "description": "Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.", + "id": "GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment", + "properties": { + "attributeName": { + "description": "The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long.", + "type": "string" + }, + "position": { + "description": "This is the position in the request as explained above. It should be strictly positive be at most 100.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRetailV2RuleIgnoreAction": { "description": "Prevents a term in the query from being used in search. Example: Don't search for \"shoddy\".", "id": "GoogleCloudRetailV2RuleIgnoreAction", @@ -4353,6 +4472,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2RuleRemoveFacetAction": { + "description": "Removes an attribute/facet in the request if is present. * Rule Condition: - Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: attribute name * Action Result: Will remove the attribute (as a facet) from the request if it is present. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\" and the attribute name \"size\", then facet key \"size\" will be removed from the request (if it is present).", + "id": "GoogleCloudRetailV2RuleRemoveFacetAction", + "properties": { + "attributeNames": { + "description": "The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2RuleReplacementAction": { "description": "Replaces a term in the query. Multiple replacement candidates can be specified. All `query_terms` will be replaced with the replacement term. Example: Replace \"gShoe\" with \"google shoe\".", "id": "GoogleCloudRetailV2RuleReplacementAction", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 8e8ad6b308d..f6a5ee83612 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recommendations // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // retailService, err := retail.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // retailService, err := retail.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // retailService, err := retail.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package retail // import "google.golang.org/api/retail/v2" import ( @@ -1063,6 +1076,9 @@ type GoogleCloudRetailV2CatalogAttribute struct { // an attribute. ExactSearchableOption string `json:"exactSearchableOption,omitempty"` + // FacetConfig: Contains facet options. + FacetConfig *GoogleCloudRetailV2CatalogAttributeFacetConfig `json:"facetConfig,omitempty"` + // InUse: Output only. Indicates whether this attribute has been used by // any products. `True` if at least one Product is using this attribute // in Product.attributes. Otherwise, this field is `False`. @@ -1167,6 +1183,142 @@ func (s *GoogleCloudRetailV2CatalogAttribute) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2CatalogAttributeFacetConfig: Possible options for +// the facet that corresponds to the current attribute config. +type GoogleCloudRetailV2CatalogAttributeFacetConfig struct { + // FacetIntervals: If you don't set the facet + // SearchRequest.FacetSpec.FacetKey.intervals in the request to a + // numerical attribute, then we use the computed intervals with rounded + // bounds obtained from all its product numerical attribute values. The + // computed intervals might not be ideal for some attributes. Therefore, + // we give you the option to overwrite them with the facet_intervals + // field. The maximum of facet intervals per CatalogAttribute is 40. + // Each interval must have a lower bound or an upper bound. If both + // bounds are provided, then the lower bound must be smaller or equal + // than the upper bound. + FacetIntervals []*GoogleCloudRetailV2Interval `json:"facetIntervals,omitempty"` + + // IgnoredFacetValues: Each instance represents a list of attribute + // values to ignore as facet values for a specific time range. The + // maximum number of instances per CatalogAttribute is 25. + IgnoredFacetValues []*GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues `json:"ignoredFacetValues,omitempty"` + + // MergedFacetValues: Each instance replaces a list of facet values by a + // merged facet value. If a facet value is not in any list, then it will + // stay the same. To avoid conflicts, only paths of length 1 are + // accepted. In other words, if "dark_blue" merged into "BLUE", then the + // latter can't merge into "blues" because this would create a path of + // length 2. The maximum number of instances of MergedFacetValue per + // CatalogAttribute is 100. + MergedFacetValues []*GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FacetIntervals") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetIntervals") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2CatalogAttributeFacetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues: +// Facet values to ignore on facets during the specified time range for +// the given SearchResponse.Facet.key attribute. +type GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues struct { + // EndTime: If start time is empty and end time is not empty, then + // ignore these facet values before end time. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Time range for the current list of facet values to ignore. + // If multiple time ranges are specified for an facet value for the + // current attribute, consider all of them. If both are empty, ignore + // always. If start time and end time are set, then start time must be + // before end time. If start time is not empty and end time is empty, + // then will ignore these facet values after the start time. + StartTime string `json:"startTime,omitempty"` + + // Values: List of facet values to ignore for the following time range. + // The facet values are the same as the attribute values. There is a + // limit of 10 values per instance of IgnoredFacetValues. Each value can + // have at most 60 characters. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue: +// Replaces a set of facet values by the same (possibly different) +// merged facet value. Each facet value should appear at most once as a +// value per CatalogAttribute. +type GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue struct { + // MergedValue: All the previous values are replaced by this merged + // facet value. This merged_value must be non-empty and can have up to + // 60 characters. + MergedValue string `json:"mergedValue,omitempty"` + + // Values: All the facet values that are replaces by the same + // merged_value that follows. The maximum number of values per + // MergedFacetValue is 25. Each value can have up to 60 characters. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MergedValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MergedValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ColorInfo: The color information of a Product. type GoogleCloudRetailV2ColorInfo struct { // ColorFamilies: The standard color families. Strongly recommended to @@ -1508,6 +1660,11 @@ type GoogleCloudRetailV2Condition struct { // active. Condition true if any time range matches. ActiveTimeRange []*GoogleCloudRetailV2ConditionTimeRange `json:"activeTimeRange,omitempty"` + // PageCategories: Used to support browse uses cases. A list (up to 10 + // entries) of categories or departments. The format should be the same + // as UserEvent.page_categories; + PageCategories []string `json:"pageCategories,omitempty"` + // QueryTerms: A list (up to 10 entries) of terms to match the query on. // If not specified, match all queries. If many query terms are // specified, the condition is matched if any of the terms is a match @@ -4519,6 +4676,10 @@ type GoogleCloudRetailV2Rule struct { // FilterAction: Filters results. FilterAction *GoogleCloudRetailV2RuleFilterAction `json:"filterAction,omitempty"` + // ForceReturnFacetAction: Force returns an attribute as a facet in the + // request. + ForceReturnFacetAction *GoogleCloudRetailV2RuleForceReturnFacetAction `json:"forceReturnFacetAction,omitempty"` + // IgnoreAction: Ignores specific terms from query during search. IgnoreAction *GoogleCloudRetailV2RuleIgnoreAction `json:"ignoreAction,omitempty"` @@ -4530,6 +4691,10 @@ type GoogleCloudRetailV2Rule struct { // RedirectAction: Redirects a shopper to a specific page. RedirectAction *GoogleCloudRetailV2RuleRedirectAction `json:"redirectAction,omitempty"` + // RemoveFacetAction: Remove an attribute as a facet in the request (if + // present). + RemoveFacetAction *GoogleCloudRetailV2RuleRemoveFacetAction `json:"removeFacetAction,omitempty"` + // ReplacementAction: Replaces specific terms in the query. ReplacementAction *GoogleCloudRetailV2RuleReplacementAction `json:"replacementAction,omitempty"` @@ -4705,6 +4870,88 @@ func (s *GoogleCloudRetailV2RuleFilterAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2RuleForceReturnFacetAction: Force returns an +// attribute/facet in the request around a certain position or above. * +// Rule Condition: - Must specify non-empty Condition.query_terms (for +// search only) or Condition.page_categories (for browse only), but +// can't specify both. * Action Inputs: attribute name, position * +// Action Result: Will force return a facet key around a certain +// position or above if the condition is satisfied. Example: Suppose the +// query is "shoes", the Condition.query_terms is "shoes", the +// ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is +// "size" and the +// ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two +// cases: a) The facet key "size" is not already in the top 8 slots, +// then the facet "size" will appear at a position close to 8. b) The +// facet key "size" in among the top 8 positions in the request, then it +// will stay at its current rank. +type GoogleCloudRetailV2RuleForceReturnFacetAction struct { + // FacetPositionAdjustments: Each instance corresponds to a force return + // attribute for the given condition. There can't be more 3 instances + // here. + FacetPositionAdjustments []*GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FacetPositionAdjustments") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetPositionAdjustments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2RuleForceReturnFacetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2RuleForceReturnFacetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment: +// Each facet position adjustment consists of a single attribute name +// (i.e. facet key) along with a specified position. +type GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment struct { + // AttributeName: The attribute name to force return as a facet. Each + // attribute name should be a valid attribute name, be non-empty and + // contain at most 80 characters long. + AttributeName string `json:"attributeName,omitempty"` + + // Position: This is the position in the request as explained above. It + // should be strictly positive be at most 100. + Position int64 `json:"position,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributeName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2RuleIgnoreAction: Prevents a term in the query // from being used in search. Example: Don't search for "shoddy". type GoogleCloudRetailV2RuleIgnoreAction struct { @@ -4806,6 +5053,46 @@ func (s *GoogleCloudRetailV2RuleRedirectAction) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2RuleRemoveFacetAction: Removes an attribute/facet +// in the request if is present. * Rule Condition: - Must specify +// non-empty Condition.query_terms (for search only) or +// Condition.page_categories (for browse only), but can't specify both. +// * Action Input: attribute name * Action Result: Will remove the +// attribute (as a facet) from the request if it is present. Example: +// Suppose the query is "shoes", the Condition.query_terms is "shoes" +// and the attribute name "size", then facet key "size" will be removed +// from the request (if it is present). +type GoogleCloudRetailV2RuleRemoveFacetAction struct { + // AttributeNames: The attribute names (i.e. facet keys) to remove from + // the dynamic facets (if present in the request). There can't be more 3 + // attribute names. Each attribute name should be a valid attribute + // name, be non-empty and contain at most 80 characters. + AttributeNames []string `json:"attributeNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeNames") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributeNames") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2RuleRemoveFacetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2RuleRemoveFacetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2RuleReplacementAction: Replaces a term in the // query. Multiple replacement candidates can be specified. All // `query_terms` will be replaced with the replacement term. Example: diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 5d026c98b6a..b6b167c6b60 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2329,7 +2329,7 @@ } } }, - "revision": "20230805", + "revision": "20230906", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3247,6 +3247,10 @@ ], "type": "string" }, + "facetConfig": { + "$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfig", + "description": "Contains facet options." + }, "inUse": { "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, @@ -3330,6 +3334,76 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaCatalogAttributeFacetConfig": { + "description": "Possible options for the facet that corresponds to the current attribute config.", + "id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfig", + "properties": { + "facetIntervals": { + "description": "If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.", + "items": { + "$ref": "GoogleCloudRetailV2alphaInterval" + }, + "type": "array" + }, + "ignoredFacetValues": { + "description": "Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.", + "items": { + "$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues" + }, + "type": "array" + }, + "mergedFacetValues": { + "description": "Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if \"dark_blue\" merged into \"BLUE\", then the latter can't merge into \"blues\" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100.", + "items": { + "$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues": { + "description": "Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.", + "id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues", + "properties": { + "endTime": { + "description": "If start time is empty and end time is not empty, then ignore these facet values before end time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.", + "format": "google-datetime", + "type": "string" + }, + "values": { + "description": "List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 60 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue": { + "description": "Replaces a set of facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute.", + "id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue", + "properties": { + "mergedValue": { + "description": "All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 60 characters.", + "type": "string" + }, + "values": { + "description": "All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 60 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2alphaColorInfo", @@ -3541,6 +3615,13 @@ }, "type": "array" }, + "pageCategories": { + "description": "Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;", + "items": { + "type": "string" + }, + "type": "array" + }, "queryTerms": { "description": "A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).", "items": { @@ -5546,6 +5627,10 @@ "$ref": "GoogleCloudRetailV2alphaRuleFilterAction", "description": "Filters results." }, + "forceReturnFacetAction": { + "$ref": "GoogleCloudRetailV2alphaRuleForceReturnFacetAction", + "description": "Force returns an attribute as a facet in the request." + }, "ignoreAction": { "$ref": "GoogleCloudRetailV2alphaRuleIgnoreAction", "description": "Ignores specific terms from query during search." @@ -5558,6 +5643,10 @@ "$ref": "GoogleCloudRetailV2alphaRuleRedirectAction", "description": "Redirects a shopper to a specific page." }, + "removeFacetAction": { + "$ref": "GoogleCloudRetailV2alphaRuleRemoveFacetAction", + "description": "Remove an attribute as a facet in the request (if present)." + }, "replacementAction": { "$ref": "GoogleCloudRetailV2alphaRuleReplacementAction", "description": "Replaces specific terms in the query." @@ -5624,6 +5713,36 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaRuleForceReturnFacetAction": { + "description": "Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: - Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is \"size\" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key \"size\" is not already in the top 8 slots, then the facet \"size\" will appear at a position close to 8. b) The facet key \"size\" in among the top 8 positions in the request, then it will stay at its current rank.", + "id": "GoogleCloudRetailV2alphaRuleForceReturnFacetAction", + "properties": { + "facetPositionAdjustments": { + "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", + "items": { + "$ref": "GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment": { + "description": "Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.", + "id": "GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment", + "properties": { + "attributeName": { + "description": "The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long.", + "type": "string" + }, + "position": { + "description": "This is the position in the request as explained above. It should be strictly positive be at most 100.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaRuleIgnoreAction": { "description": "Prevents a term in the query from being used in search. Example: Don't search for \"shoddy\".", "id": "GoogleCloudRetailV2alphaRuleIgnoreAction", @@ -5677,6 +5796,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaRuleRemoveFacetAction": { + "description": "Removes an attribute/facet in the request if is present. * Rule Condition: - Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: attribute name * Action Result: Will remove the attribute (as a facet) from the request if it is present. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\" and the attribute name \"size\", then facet key \"size\" will be removed from the request (if it is present).", + "id": "GoogleCloudRetailV2alphaRuleRemoveFacetAction", + "properties": { + "attributeNames": { + "description": "The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaRuleReplacementAction": { "description": "Replaces a term in the query. Multiple replacement candidates can be specified. All `query_terms` will be replaced with the replacement term. Example: Replace \"gShoe\" with \"google shoe\".", "id": "GoogleCloudRetailV2alphaRuleReplacementAction", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 3bfad294371..989a53f53ed 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recommendations // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // retailService, err := retail.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // retailService, err := retail.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // retailService, err := retail.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package retail // import "google.golang.org/api/retail/v2alpha" import ( @@ -2027,6 +2040,9 @@ type GoogleCloudRetailV2alphaCatalogAttribute struct { // an attribute. ExactSearchableOption string `json:"exactSearchableOption,omitempty"` + // FacetConfig: Contains facet options. + FacetConfig *GoogleCloudRetailV2alphaCatalogAttributeFacetConfig `json:"facetConfig,omitempty"` + // InUse: Output only. Indicates whether this attribute has been used by // any products. `True` if at least one Product is using this attribute // in Product.attributes. Otherwise, this field is `False`. @@ -2148,6 +2164,144 @@ func (s *GoogleCloudRetailV2alphaCatalogAttribute) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaCatalogAttributeFacetConfig: Possible options +// for the facet that corresponds to the current attribute config. +type GoogleCloudRetailV2alphaCatalogAttributeFacetConfig struct { + // FacetIntervals: If you don't set the facet + // SearchRequest.FacetSpec.FacetKey.intervals in the request to a + // numerical attribute, then we use the computed intervals with rounded + // bounds obtained from all its product numerical attribute values. The + // computed intervals might not be ideal for some attributes. Therefore, + // we give you the option to overwrite them with the facet_intervals + // field. The maximum of facet intervals per CatalogAttribute is 40. + // Each interval must have a lower bound or an upper bound. If both + // bounds are provided, then the lower bound must be smaller or equal + // than the upper bound. + FacetIntervals []*GoogleCloudRetailV2alphaInterval `json:"facetIntervals,omitempty"` + + // IgnoredFacetValues: Each instance represents a list of attribute + // values to ignore as facet values for a specific time range. The + // maximum number of instances per CatalogAttribute is 25. + IgnoredFacetValues []*GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues `json:"ignoredFacetValues,omitempty"` + + // MergedFacetValues: Each instance replaces a list of facet values by a + // merged facet value. If a facet value is not in any list, then it will + // stay the same. To avoid conflicts, only paths of length 1 are + // accepted. In other words, if "dark_blue" merged into "BLUE", then the + // latter can't merge into "blues" because this would create a path of + // length 2. The maximum number of instances of MergedFacetValue per + // CatalogAttribute is 100. + MergedFacetValues []*GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FacetIntervals") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetIntervals") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaCatalogAttributeFacetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCatalogAttributeFacetConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues: +// +// Facet values to ignore on facets during the specified time range for +// +// the given SearchResponse.Facet.key attribute. +type GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues struct { + // EndTime: If start time is empty and end time is not empty, then + // ignore these facet values before end time. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Time range for the current list of facet values to ignore. + // If multiple time ranges are specified for an facet value for the + // current attribute, consider all of them. If both are empty, ignore + // always. If start time and end time are set, then start time must be + // before end time. If start time is not empty and end time is empty, + // then will ignore these facet values after the start time. + StartTime string `json:"startTime,omitempty"` + + // Values: List of facet values to ignore for the following time range. + // The facet values are the same as the attribute values. There is a + // limit of 10 values per instance of IgnoredFacetValues. Each value can + // have at most 60 characters. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue: +// Replaces a set of facet values by the same (possibly different) +// merged facet value. Each facet value should appear at most once as a +// value per CatalogAttribute. +type GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue struct { + // MergedValue: All the previous values are replaced by this merged + // facet value. This merged_value must be non-empty and can have up to + // 60 characters. + MergedValue string `json:"mergedValue,omitempty"` + + // Values: All the facet values that are replaces by the same + // merged_value that follows. The maximum number of values per + // MergedFacetValue is 25. Each value can have up to 60 characters. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MergedValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MergedValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaColorInfo: The color information of a // Product. type GoogleCloudRetailV2alphaColorInfo struct { @@ -2538,6 +2692,11 @@ type GoogleCloudRetailV2alphaCondition struct { // active. Condition true if any time range matches. ActiveTimeRange []*GoogleCloudRetailV2alphaConditionTimeRange `json:"activeTimeRange,omitempty"` + // PageCategories: Used to support browse uses cases. A list (up to 10 + // entries) of categories or departments. The format should be the same + // as UserEvent.page_categories; + PageCategories []string `json:"pageCategories,omitempty"` + // QueryTerms: A list (up to 10 entries) of terms to match the query on. // If not specified, match all queries. If many query terms are // specified, the condition is matched if any of the terms is a match @@ -6449,6 +6608,10 @@ type GoogleCloudRetailV2alphaRule struct { // FilterAction: Filters results. FilterAction *GoogleCloudRetailV2alphaRuleFilterAction `json:"filterAction,omitempty"` + // ForceReturnFacetAction: Force returns an attribute as a facet in the + // request. + ForceReturnFacetAction *GoogleCloudRetailV2alphaRuleForceReturnFacetAction `json:"forceReturnFacetAction,omitempty"` + // IgnoreAction: Ignores specific terms from query during search. IgnoreAction *GoogleCloudRetailV2alphaRuleIgnoreAction `json:"ignoreAction,omitempty"` @@ -6460,6 +6623,10 @@ type GoogleCloudRetailV2alphaRule struct { // RedirectAction: Redirects a shopper to a specific page. RedirectAction *GoogleCloudRetailV2alphaRuleRedirectAction `json:"redirectAction,omitempty"` + // RemoveFacetAction: Remove an attribute as a facet in the request (if + // present). + RemoveFacetAction *GoogleCloudRetailV2alphaRuleRemoveFacetAction `json:"removeFacetAction,omitempty"` + // ReplacementAction: Replaces specific terms in the query. ReplacementAction *GoogleCloudRetailV2alphaRuleReplacementAction `json:"replacementAction,omitempty"` @@ -6635,6 +6802,88 @@ func (s *GoogleCloudRetailV2alphaRuleFilterAction) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaRuleForceReturnFacetAction: Force returns an +// attribute/facet in the request around a certain position or above. * +// Rule Condition: - Must specify non-empty Condition.query_terms (for +// search only) or Condition.page_categories (for browse only), but +// can't specify both. * Action Inputs: attribute name, position * +// Action Result: Will force return a facet key around a certain +// position or above if the condition is satisfied. Example: Suppose the +// query is "shoes", the Condition.query_terms is "shoes", the +// ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is +// "size" and the +// ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two +// cases: a) The facet key "size" is not already in the top 8 slots, +// then the facet "size" will appear at a position close to 8. b) The +// facet key "size" in among the top 8 positions in the request, then it +// will stay at its current rank. +type GoogleCloudRetailV2alphaRuleForceReturnFacetAction struct { + // FacetPositionAdjustments: Each instance corresponds to a force return + // attribute for the given condition. There can't be more 3 instances + // here. + FacetPositionAdjustments []*GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FacetPositionAdjustments") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetPositionAdjustments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaRuleForceReturnFacetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaRuleForceReturnFacetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustm +// ent: Each facet position adjustment consists of a single attribute +// name (i.e. facet key) along with a specified position. +type GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment struct { + // AttributeName: The attribute name to force return as a facet. Each + // attribute name should be a valid attribute name, be non-empty and + // contain at most 80 characters long. + AttributeName string `json:"attributeName,omitempty"` + + // Position: This is the position in the request as explained above. It + // should be strictly positive be at most 100. + Position int64 `json:"position,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributeName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaRuleIgnoreAction: Prevents a term in the // query from being used in search. Example: Don't search for "shoddy". type GoogleCloudRetailV2alphaRuleIgnoreAction struct { @@ -6736,6 +6985,46 @@ func (s *GoogleCloudRetailV2alphaRuleRedirectAction) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaRuleRemoveFacetAction: Removes an +// attribute/facet in the request if is present. * Rule Condition: - +// Must specify non-empty Condition.query_terms (for search only) or +// Condition.page_categories (for browse only), but can't specify both. +// * Action Input: attribute name * Action Result: Will remove the +// attribute (as a facet) from the request if it is present. Example: +// Suppose the query is "shoes", the Condition.query_terms is "shoes" +// and the attribute name "size", then facet key "size" will be removed +// from the request (if it is present). +type GoogleCloudRetailV2alphaRuleRemoveFacetAction struct { + // AttributeNames: The attribute names (i.e. facet keys) to remove from + // the dynamic facets (if present in the request). There can't be more 3 + // attribute names. Each attribute name should be a valid attribute + // name, be non-empty and contain at most 80 characters. + AttributeNames []string `json:"attributeNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeNames") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributeNames") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2alphaRuleRemoveFacetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaRuleRemoveFacetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaRuleReplacementAction: Replaces a term in the // query. Multiple replacement candidates can be specified. All // `query_terms` will be replaced with the replacement term. Example: diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 0a58a90ea4a..7de69cee065 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2087,7 +2087,7 @@ } } }, - "revision": "20230805", + "revision": "20230906", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3807,6 +3807,10 @@ ], "type": "string" }, + "facetConfig": { + "$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfig", + "description": "Contains facet options." + }, "inUse": { "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, @@ -3890,6 +3894,76 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaCatalogAttributeFacetConfig": { + "description": "Possible options for the facet that corresponds to the current attribute config.", + "id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfig", + "properties": { + "facetIntervals": { + "description": "If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.", + "items": { + "$ref": "GoogleCloudRetailV2betaInterval" + }, + "type": "array" + }, + "ignoredFacetValues": { + "description": "Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.", + "items": { + "$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues" + }, + "type": "array" + }, + "mergedFacetValues": { + "description": "Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if \"dark_blue\" merged into \"BLUE\", then the latter can't merge into \"blues\" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100.", + "items": { + "$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues": { + "description": "Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.", + "id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues", + "properties": { + "endTime": { + "description": "If start time is empty and end time is not empty, then ignore these facet values before end time.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.", + "format": "google-datetime", + "type": "string" + }, + "values": { + "description": "List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 60 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue": { + "description": "Replaces a set of facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute.", + "id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue", + "properties": { + "mergedValue": { + "description": "All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 60 characters.", + "type": "string" + }, + "values": { + "description": "All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 60 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaColorInfo": { "description": "The color information of a Product.", "id": "GoogleCloudRetailV2betaColorInfo", @@ -4068,6 +4142,13 @@ }, "type": "array" }, + "pageCategories": { + "description": "Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;", + "items": { + "type": "string" + }, + "type": "array" + }, "queryTerms": { "description": "A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).", "items": { @@ -5871,6 +5952,10 @@ "$ref": "GoogleCloudRetailV2betaRuleFilterAction", "description": "Filters results." }, + "forceReturnFacetAction": { + "$ref": "GoogleCloudRetailV2betaRuleForceReturnFacetAction", + "description": "Force returns an attribute as a facet in the request." + }, "ignoreAction": { "$ref": "GoogleCloudRetailV2betaRuleIgnoreAction", "description": "Ignores specific terms from query during search." @@ -5883,6 +5968,10 @@ "$ref": "GoogleCloudRetailV2betaRuleRedirectAction", "description": "Redirects a shopper to a specific page." }, + "removeFacetAction": { + "$ref": "GoogleCloudRetailV2betaRuleRemoveFacetAction", + "description": "Remove an attribute as a facet in the request (if present)." + }, "replacementAction": { "$ref": "GoogleCloudRetailV2betaRuleReplacementAction", "description": "Replaces specific terms in the query." @@ -5949,6 +6038,36 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaRuleForceReturnFacetAction": { + "description": "Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: - Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is \"size\" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key \"size\" is not already in the top 8 slots, then the facet \"size\" will appear at a position close to 8. b) The facet key \"size\" in among the top 8 positions in the request, then it will stay at its current rank.", + "id": "GoogleCloudRetailV2betaRuleForceReturnFacetAction", + "properties": { + "facetPositionAdjustments": { + "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", + "items": { + "$ref": "GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment": { + "description": "Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.", + "id": "GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment", + "properties": { + "attributeName": { + "description": "The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long.", + "type": "string" + }, + "position": { + "description": "This is the position in the request as explained above. It should be strictly positive be at most 100.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaRuleIgnoreAction": { "description": "Prevents a term in the query from being used in search. Example: Don't search for \"shoddy\".", "id": "GoogleCloudRetailV2betaRuleIgnoreAction", @@ -6002,6 +6121,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaRuleRemoveFacetAction": { + "description": "Removes an attribute/facet in the request if is present. * Rule Condition: - Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: attribute name * Action Result: Will remove the attribute (as a facet) from the request if it is present. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\" and the attribute name \"size\", then facet key \"size\" will be removed from the request (if it is present).", + "id": "GoogleCloudRetailV2betaRuleRemoveFacetAction", + "properties": { + "attributeNames": { + "description": "The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaRuleReplacementAction": { "description": "Replaces a term in the query. Multiple replacement candidates can be specified. All `query_terms` will be replaced with the replacement term. Example: Replace \"gShoe\" with \"google shoe\".", "id": "GoogleCloudRetailV2betaRuleReplacementAction", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 254716eaef3..6f57d202b58 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/recommendations // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // retailService, err := retail.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // retailService, err := retail.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // retailService, err := retail.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package retail // import "google.golang.org/api/retail/v2beta" import ( @@ -3428,6 +3441,9 @@ type GoogleCloudRetailV2betaCatalogAttribute struct { // an attribute. ExactSearchableOption string `json:"exactSearchableOption,omitempty"` + // FacetConfig: Contains facet options. + FacetConfig *GoogleCloudRetailV2betaCatalogAttributeFacetConfig `json:"facetConfig,omitempty"` + // InUse: Output only. Indicates whether this attribute has been used by // any products. `True` if at least one Product is using this attribute // in Product.attributes. Otherwise, this field is `False`. @@ -3549,6 +3565,142 @@ func (s *GoogleCloudRetailV2betaCatalogAttribute) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaCatalogAttributeFacetConfig: Possible options +// for the facet that corresponds to the current attribute config. +type GoogleCloudRetailV2betaCatalogAttributeFacetConfig struct { + // FacetIntervals: If you don't set the facet + // SearchRequest.FacetSpec.FacetKey.intervals in the request to a + // numerical attribute, then we use the computed intervals with rounded + // bounds obtained from all its product numerical attribute values. The + // computed intervals might not be ideal for some attributes. Therefore, + // we give you the option to overwrite them with the facet_intervals + // field. The maximum of facet intervals per CatalogAttribute is 40. + // Each interval must have a lower bound or an upper bound. If both + // bounds are provided, then the lower bound must be smaller or equal + // than the upper bound. + FacetIntervals []*GoogleCloudRetailV2betaInterval `json:"facetIntervals,omitempty"` + + // IgnoredFacetValues: Each instance represents a list of attribute + // values to ignore as facet values for a specific time range. The + // maximum number of instances per CatalogAttribute is 25. + IgnoredFacetValues []*GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues `json:"ignoredFacetValues,omitempty"` + + // MergedFacetValues: Each instance replaces a list of facet values by a + // merged facet value. If a facet value is not in any list, then it will + // stay the same. To avoid conflicts, only paths of length 1 are + // accepted. In other words, if "dark_blue" merged into "BLUE", then the + // latter can't merge into "blues" because this would create a path of + // length 2. The maximum number of instances of MergedFacetValue per + // CatalogAttribute is 100. + MergedFacetValues []*GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue `json:"mergedFacetValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FacetIntervals") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetIntervals") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCatalogAttributeFacetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCatalogAttributeFacetConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues: +// Facet values to ignore on facets during the specified time range for +// the given SearchResponse.Facet.key attribute. +type GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues struct { + // EndTime: If start time is empty and end time is not empty, then + // ignore these facet values before end time. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Time range for the current list of facet values to ignore. + // If multiple time ranges are specified for an facet value for the + // current attribute, consider all of them. If both are empty, ignore + // always. If start time and end time are set, then start time must be + // before end time. If start time is not empty and end time is empty, + // then will ignore these facet values after the start time. + StartTime string `json:"startTime,omitempty"` + + // Values: List of facet values to ignore for the following time range. + // The facet values are the same as the attribute values. There is a + // limit of 10 values per instance of IgnoredFacetValues. Each value can + // have at most 60 characters. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue: +// Replaces a set of facet values by the same (possibly different) +// merged facet value. Each facet value should appear at most once as a +// value per CatalogAttribute. +type GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue struct { + // MergedValue: All the previous values are replaced by this merged + // facet value. This merged_value must be non-empty and can have up to + // 60 characters. + MergedValue string `json:"mergedValue,omitempty"` + + // Values: All the facet values that are replaces by the same + // merged_value that follows. The maximum number of values per + // MergedFacetValue is 25. Each value can have up to 60 characters. + Values []string `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MergedValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MergedValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaColorInfo: The color information of a Product. type GoogleCloudRetailV2betaColorInfo struct { // ColorFamilies: The standard color families. Strongly recommended to @@ -3891,6 +4043,11 @@ type GoogleCloudRetailV2betaCondition struct { // active. Condition true if any time range matches. ActiveTimeRange []*GoogleCloudRetailV2betaConditionTimeRange `json:"activeTimeRange,omitempty"` + // PageCategories: Used to support browse uses cases. A list (up to 10 + // entries) of categories or departments. The format should be the same + // as UserEvent.page_categories; + PageCategories []string `json:"pageCategories,omitempty"` + // QueryTerms: A list (up to 10 entries) of terms to match the query on. // If not specified, match all queries. If many query terms are // specified, the condition is matched if any of the terms is a match @@ -7405,6 +7562,10 @@ type GoogleCloudRetailV2betaRule struct { // FilterAction: Filters results. FilterAction *GoogleCloudRetailV2betaRuleFilterAction `json:"filterAction,omitempty"` + // ForceReturnFacetAction: Force returns an attribute as a facet in the + // request. + ForceReturnFacetAction *GoogleCloudRetailV2betaRuleForceReturnFacetAction `json:"forceReturnFacetAction,omitempty"` + // IgnoreAction: Ignores specific terms from query during search. IgnoreAction *GoogleCloudRetailV2betaRuleIgnoreAction `json:"ignoreAction,omitempty"` @@ -7416,6 +7577,10 @@ type GoogleCloudRetailV2betaRule struct { // RedirectAction: Redirects a shopper to a specific page. RedirectAction *GoogleCloudRetailV2betaRuleRedirectAction `json:"redirectAction,omitempty"` + // RemoveFacetAction: Remove an attribute as a facet in the request (if + // present). + RemoveFacetAction *GoogleCloudRetailV2betaRuleRemoveFacetAction `json:"removeFacetAction,omitempty"` + // ReplacementAction: Replaces specific terms in the query. ReplacementAction *GoogleCloudRetailV2betaRuleReplacementAction `json:"replacementAction,omitempty"` @@ -7591,6 +7756,88 @@ func (s *GoogleCloudRetailV2betaRuleFilterAction) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaRuleForceReturnFacetAction: Force returns an +// attribute/facet in the request around a certain position or above. * +// Rule Condition: - Must specify non-empty Condition.query_terms (for +// search only) or Condition.page_categories (for browse only), but +// can't specify both. * Action Inputs: attribute name, position * +// Action Result: Will force return a facet key around a certain +// position or above if the condition is satisfied. Example: Suppose the +// query is "shoes", the Condition.query_terms is "shoes", the +// ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is +// "size" and the +// ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two +// cases: a) The facet key "size" is not already in the top 8 slots, +// then the facet "size" will appear at a position close to 8. b) The +// facet key "size" in among the top 8 positions in the request, then it +// will stay at its current rank. +type GoogleCloudRetailV2betaRuleForceReturnFacetAction struct { + // FacetPositionAdjustments: Each instance corresponds to a force return + // attribute for the given condition. There can't be more 3 instances + // here. + FacetPositionAdjustments []*GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "FacetPositionAdjustments") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetPositionAdjustments") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaRuleForceReturnFacetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaRuleForceReturnFacetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustme +// nt: Each facet position adjustment consists of a single attribute +// name (i.e. facet key) along with a specified position. +type GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment struct { + // AttributeName: The attribute name to force return as a facet. Each + // attribute name should be a valid attribute name, be non-empty and + // contain at most 80 characters long. + AttributeName string `json:"attributeName,omitempty"` + + // Position: This is the position in the request as explained above. It + // should be strictly positive be at most 100. + Position int64 `json:"position,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributeName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaRuleIgnoreAction: Prevents a term in the query // from being used in search. Example: Don't search for "shoddy". type GoogleCloudRetailV2betaRuleIgnoreAction struct { @@ -7692,6 +7939,46 @@ func (s *GoogleCloudRetailV2betaRuleRedirectAction) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaRuleRemoveFacetAction: Removes an +// attribute/facet in the request if is present. * Rule Condition: - +// Must specify non-empty Condition.query_terms (for search only) or +// Condition.page_categories (for browse only), but can't specify both. +// * Action Input: attribute name * Action Result: Will remove the +// attribute (as a facet) from the request if it is present. Example: +// Suppose the query is "shoes", the Condition.query_terms is "shoes" +// and the attribute name "size", then facet key "size" will be removed +// from the request (if it is present). +type GoogleCloudRetailV2betaRuleRemoveFacetAction struct { + // AttributeNames: The attribute names (i.e. facet keys) to remove from + // the dynamic facets (if present in the request). There can't be more 3 + // attribute names. Each attribute name should be a valid attribute + // name, be non-empty and contain at most 80 characters. + AttributeNames []string `json:"attributeNames,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeNames") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AttributeNames") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2betaRuleRemoveFacetAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaRuleRemoveFacetAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaRuleReplacementAction: Replaces a term in the // query. Multiple replacement candidates can be specified. All // `query_terms` will be replaced with the replacement term. Example: diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index fcbc04ed84e..6262958d37a 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/run/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // runService, err := run.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // runService, err := run.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // runService, err := run.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package run // import "google.golang.org/api/run/v1" import ( diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 584f6450453..dff81cfbb10 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/run/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // runService, err := run.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // runService, err := run.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // runService, err := run.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package run // import "google.golang.org/api/run/v2" import ( diff --git a/runtimeconfig/v1/runtimeconfig-gen.go b/runtimeconfig/v1/runtimeconfig-gen.go index 736738e6032..73133c21754 100644 --- a/runtimeconfig/v1/runtimeconfig-gen.go +++ b/runtimeconfig/v1/runtimeconfig-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/deployment-manager/runtime-configurator/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // runtimeconfigService, err := runtimeconfig.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithScopes(runtimeconfig.CloudruntimeconfigScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package runtimeconfig // import "google.golang.org/api/runtimeconfig/v1" import ( diff --git a/runtimeconfig/v1beta1/runtimeconfig-gen.go b/runtimeconfig/v1beta1/runtimeconfig-gen.go index a6445a338e2..a1dd8abf733 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/deployment-manager/runtime-configurator/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // runtimeconfigService, err := runtimeconfig.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithScopes(runtimeconfig.CloudruntimeconfigScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // runtimeconfigService, err := runtimeconfig.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package runtimeconfig // import "google.golang.org/api/runtimeconfig/v1beta1" import ( diff --git a/safebrowsing/v4/safebrowsing-gen.go b/safebrowsing/v4/safebrowsing-gen.go index c23c2c0affd..74d029ddd75 100644 --- a/safebrowsing/v4/safebrowsing-gen.go +++ b/safebrowsing/v4/safebrowsing-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/safe-browsing/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // safebrowsingService, err := safebrowsing.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // safebrowsingService, err := safebrowsing.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // safebrowsingService, err := safebrowsing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package safebrowsing // import "google.golang.org/api/safebrowsing/v4" import ( diff --git a/sasportal/v1alpha1/sasportal-api.json b/sasportal/v1alpha1/sasportal-api.json index 9149ec5d06a..529dbc83ab7 100644 --- a/sasportal/v1alpha1/sasportal-api.json +++ b/sasportal/v1alpha1/sasportal-api.json @@ -251,6 +251,25 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/sasportal" ] + }, + "setupSasAnalytics": { + "description": "Setups the a GCP Project to receive SAS Analytics messages via GCP Pub/Sub with a subscription to BigQuery. All the Pub/Sub topics and BigQuery tables are created automatically as part of this service.", + "flatPath": "v1alpha1/customers:setupSasAnalytics", + "httpMethod": "POST", + "id": "sasportal.customers.setupSasAnalytics", + "parameterOrder": [], + "parameters": {}, + "path": "v1alpha1/customers:setupSasAnalytics", + "request": { + "$ref": "SasPortalSetupSasAnalyticsRequest" + }, + "response": { + "$ref": "SasPortalOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/sasportal" + ] } }, "resources": { @@ -2617,7 +2636,7 @@ } } }, - "revision": "20230808", + "revision": "20230829", "rootUrl": "https://sasportal.googleapis.com/", "schemas": { "SasPortalAssignment": { @@ -3556,6 +3575,24 @@ }, "type": "object" }, + "SasPortalSetupSasAnalyticsMetadata": { + "description": "Metadata returned by the long running operation for the SetupSasAnalytics rpc.", + "id": "SasPortalSetupSasAnalyticsMetadata", + "properties": {}, + "type": "object" + }, + "SasPortalSetupSasAnalyticsRequest": { + "description": "Request for the SetupSasAnalytics rpc.", + "id": "SasPortalSetupSasAnalyticsRequest", + "properties": {}, + "type": "object" + }, + "SasPortalSetupSasAnalyticsResponse": { + "description": "Response returned by the long running operation for the SetupSasAnalytics rpc.", + "id": "SasPortalSetupSasAnalyticsResponse", + "properties": {}, + "type": "object" + }, "SasPortalSignDeviceRequest": { "description": "Request for SignDevice.", "id": "SasPortalSignDeviceRequest", diff --git a/sasportal/v1alpha1/sasportal-gen.go b/sasportal/v1alpha1/sasportal-gen.go index f2259a5f558..bc6bdbb528c 100644 --- a/sasportal/v1alpha1/sasportal-gen.go +++ b/sasportal/v1alpha1/sasportal-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/spectrum-access-system/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // sasportalService, err := sasportal.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // sasportalService, err := sasportal.NewService(ctx, option.WithScopes(sasportal.SasportalScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // sasportalService, err := sasportal.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // sasportalService, err := sasportal.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sasportal // import "google.golang.org/api/sasportal/v1alpha1" import ( @@ -1986,6 +2000,21 @@ func (s *SasPortalSetPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SasPortalSetupSasAnalyticsMetadata: Metadata returned by the long +// running operation for the SetupSasAnalytics rpc. +type SasPortalSetupSasAnalyticsMetadata struct { +} + +// SasPortalSetupSasAnalyticsRequest: Request for the SetupSasAnalytics +// rpc. +type SasPortalSetupSasAnalyticsRequest struct { +} + +// SasPortalSetupSasAnalyticsResponse: Response returned by the long +// running operation for the SetupSasAnalytics rpc. +type SasPortalSetupSasAnalyticsResponse struct { +} + // SasPortalSignDeviceRequest: Request for SignDevice. type SasPortalSignDeviceRequest struct { // Device: Required. The device to sign. The device fields name, fcc_id @@ -3074,6 +3103,135 @@ func (c *CustomersProvisionDeploymentCall) Do(opts ...googleapi.CallOption) (*Sa } +// method id "sasportal.customers.setupSasAnalytics": + +type CustomersSetupSasAnalyticsCall struct { + s *Service + sasportalsetupsasanalyticsrequest *SasPortalSetupSasAnalyticsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetupSasAnalytics: Setups the a GCP Project to receive SAS Analytics +// messages via GCP Pub/Sub with a subscription to BigQuery. All the +// Pub/Sub topics and BigQuery tables are created automatically as part +// of this service. +func (r *CustomersService) SetupSasAnalytics(sasportalsetupsasanalyticsrequest *SasPortalSetupSasAnalyticsRequest) *CustomersSetupSasAnalyticsCall { + c := &CustomersSetupSasAnalyticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sasportalsetupsasanalyticsrequest = sasportalsetupsasanalyticsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersSetupSasAnalyticsCall) Fields(s ...googleapi.Field) *CustomersSetupSasAnalyticsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersSetupSasAnalyticsCall) Context(ctx context.Context) *CustomersSetupSasAnalyticsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersSetupSasAnalyticsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersSetupSasAnalyticsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.sasportalsetupsasanalyticsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/customers:setupSasAnalytics") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "sasportal.customers.setupSasAnalytics" call. +// Exactly one of *SasPortalOperation or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *SasPortalOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CustomersSetupSasAnalyticsCall) Do(opts ...googleapi.CallOption) (*SasPortalOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SasPortalOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Setups the a GCP Project to receive SAS Analytics messages via GCP Pub/Sub with a subscription to BigQuery. All the Pub/Sub topics and BigQuery tables are created automatically as part of this service.", + // "flatPath": "v1alpha1/customers:setupSasAnalytics", + // "httpMethod": "POST", + // "id": "sasportal.customers.setupSasAnalytics", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1alpha1/customers:setupSasAnalytics", + // "request": { + // "$ref": "SasPortalSetupSasAnalyticsRequest" + // }, + // "response": { + // "$ref": "SasPortalOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/sasportal" + // ] + // } + +} + // method id "sasportal.customers.deployments.create": type CustomersDeploymentsCreateCall struct { diff --git a/script/v1/script-gen.go b/script/v1/script-gen.go index aea305e6f1e..9f98f79014c 100644 --- a/script/v1/script-gen.go +++ b/script/v1/script-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/apps-script/api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // scriptService, err := script.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // scriptService, err := script.NewService(ctx, option.WithScopes(script.UserinfoEmailScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // scriptService, err := script.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // scriptService, err := script.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package script // import "google.golang.org/api/script/v1" import ( diff --git a/searchads360/v0/searchads360-api.json b/searchads360/v0/searchads360-api.json index 7b97bba024f..ce7f9b8c035 100644 --- a/searchads360/v0/searchads360-api.json +++ b/searchads360/v0/searchads360-api.json @@ -260,9 +260,92 @@ } } }, - "revision": "20230625", + "revision": "20230818", "rootUrl": "https://searchads360.googleapis.com/", "schemas": { + "GoogleAdsSearchads360V0Common__AdScheduleInfo": { + "description": "Represents an AdSchedule criterion. AdSchedule is specified as the day of the week and a time interval within which ads will be shown. No more than six AdSchedules can be added for the same day.", + "id": "GoogleAdsSearchads360V0Common__AdScheduleInfo", + "properties": { + "dayOfWeek": { + "description": "Day of the week the schedule applies to. This field is required for CREATE operations and is prohibited on UPDATE operations.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "Not specified.", + "The value is unknown in this version.", + "Monday.", + "Tuesday.", + "Wednesday.", + "Thursday.", + "Friday.", + "Saturday.", + "Sunday." + ], + "type": "string" + }, + "endHour": { + "description": "Ending hour in 24 hour time; 24 signifies end of the day. This field must be between 0 and 24, inclusive. This field is required for CREATE operations and is prohibited on UPDATE operations.", + "format": "int32", + "type": "integer" + }, + "endMinute": { + "description": "Minutes after the end hour at which this schedule ends. The schedule is exclusive of the end minute. This field is required for CREATE operations and is prohibited on UPDATE operations.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ZERO", + "FIFTEEN", + "THIRTY", + "FORTY_FIVE" + ], + "enumDescriptions": [ + "Not specified.", + "The value is unknown in this version.", + "Zero minutes past the hour.", + "Fifteen minutes past the hour.", + "Thirty minutes past the hour.", + "Forty-five minutes past the hour." + ], + "type": "string" + }, + "startHour": { + "description": "Starting hour in 24 hour time. This field must be between 0 and 23, inclusive. This field is required for CREATE operations and is prohibited on UPDATE operations.", + "format": "int32", + "type": "integer" + }, + "startMinute": { + "description": "Minutes after the start hour at which this schedule starts. This field is required for CREATE operations and is prohibited on UPDATE operations.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ZERO", + "FIFTEEN", + "THIRTY", + "FORTY_FIVE" + ], + "enumDescriptions": [ + "Not specified.", + "The value is unknown in this version.", + "Zero minutes past the hour.", + "Fifteen minutes past the hour.", + "Thirty minutes past the hour.", + "Forty-five minutes past the hour." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Common__AgeRangeInfo": { "description": "An age range criterion.", "id": "GoogleAdsSearchads360V0Common__AgeRangeInfo", @@ -296,6 +379,44 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Common__AssetInteractionTarget": { + "description": "An AssetInteractionTarget segment.", + "id": "GoogleAdsSearchads360V0Common__AssetInteractionTarget", + "properties": { + "asset": { + "description": "The asset resource name.", + "type": "string" + }, + "interactionOnThisAsset": { + "description": "Only used with CustomerAsset, CampaignAsset and AdGroupAsset metrics. Indicates whether the interaction metrics occurred on the asset itself or a different asset or ad unit.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Common__BusinessProfileLocation": { + "description": "Business Profile location data synced from the linked Business Profile account.", + "id": "GoogleAdsSearchads360V0Common__BusinessProfileLocation", + "properties": { + "labels": { + "description": "Advertiser specified label for the location on the Business Profile account. This is synced from the Business Profile account.", + "items": { + "type": "string" + }, + "type": "array" + }, + "listingId": { + "description": "Listing ID of this Business Profile location. This is synced from the linked Business Profile account.", + "format": "int64", + "type": "string" + }, + "storeCode": { + "description": "Business Profile store code of this location. This is synced from the Business Profile account.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Common__CustomParameter": { "description": "A mapping that can be used by custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.", "id": "GoogleAdsSearchads360V0Common__CustomParameter", @@ -662,12 +783,12 @@ "type": "number" }, "averageCpc": { - "description": "The total cost of all clicks divided by the total number of clicks received.", + "description": "The total cost of all clicks divided by the total number of clicks received. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", "format": "double", "type": "number" }, "averageCpm": { - "description": "Average cost-per-thousand impressions (CPM).", + "description": "Average cost-per-thousand impressions (CPM). This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", "format": "double", "type": "number" }, @@ -742,7 +863,7 @@ "type": "number" }, "costMicros": { - "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period.", + "description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", "format": "int64", "type": "string" }, @@ -1176,6 +1297,10 @@ ], "type": "string" }, + "assetInteractionTarget": { + "$ref": "GoogleAdsSearchads360V0Common__AssetInteractionTarget", + "description": "Only used with CustomerAsset, CampaignAsset and AdGroupAsset metrics. Indicates whether the interaction metrics occurred on the asset itself or a different asset or ad unit. Interactions (for example, clicks) are counted across all the parts of the served ad (for example, Ad itself and other components like Sitelinks) when they are served together. When interaction_on_this_asset is true, it means the interactions are on this specific asset and when interaction_on_this_asset is false, it means the interactions is not on this specific asset but on other parts of the served ad this asset is served with." + }, "conversionAction": { "description": "Resource name of the conversion action.", "type": "string" @@ -1462,6 +1587,7 @@ "type": "string" }, "targetSpendMicros": { + "deprecated": true, "description": "The spend target under which to maximize clicks. A TargetSpend bidder will attempt to spend the smaller of this value or the natural throttling spend amount. If not specified, the budget is used as the spend target. This field is deprecated and should no longer be used. See https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html for details.", "format": "int64", "type": "string" @@ -1498,6 +1624,200 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Common__UnifiedCallAsset": { + "description": "A unified call asset.", + "id": "GoogleAdsSearchads360V0Common__UnifiedCallAsset", + "properties": { + "adScheduleTargets": { + "description": "List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.", + "items": { + "$ref": "GoogleAdsSearchads360V0Common__AdScheduleInfo" + }, + "type": "array" + }, + "callConversionAction": { + "description": "The conversion action to attribute a call conversion to. If not set, the default conversion action is used. This field only has effect if call_conversion_reporting_state is set to USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.", + "type": "string" + }, + "callConversionReportingState": { + "description": "Output only. Indicates whether this CallAsset should use its own call conversion setting, follow the account level setting, or disable call conversion.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "DISABLED", + "USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION", + "USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION" + ], + "enumDescriptions": [ + "Not specified.", + "Used for return value only. Represents value unknown in this version.", + "Call conversion action is disabled.", + "Call conversion action will use call conversion type set at the account level.", + "Call conversion action will use call conversion type set at the resource (call only ads/call extensions) level." + ], + "readOnly": true, + "type": "string" + }, + "callOnly": { + "description": "Whether the call only shows the phone number without a link to the website. Applies to Microsoft Ads.", + "type": "boolean" + }, + "callTrackingEnabled": { + "description": "Whether the call should be enabled on call tracking. Applies to Microsoft Ads.", + "type": "boolean" + }, + "countryCode": { + "description": "Two-letter country code of the phone number. Examples: 'US', 'us'.", + "type": "string" + }, + "endDate": { + "description": "Last date of when this asset is effective and still serving, in yyyy-MM-dd format.", + "type": "string" + }, + "phoneNumber": { + "description": "The advertiser's raw phone number. Examples: '1234567890', '(123)456-7890'", + "type": "string" + }, + "startDate": { + "description": "Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.", + "type": "string" + }, + "useSearcherTimeZone": { + "description": "Whether to show the call extension in search user's time zone. Applies to Microsoft Ads.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Common__UnifiedCalloutAsset": { + "description": "A unified callout asset.", + "id": "GoogleAdsSearchads360V0Common__UnifiedCalloutAsset", + "properties": { + "adScheduleTargets": { + "description": "List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.", + "items": { + "$ref": "GoogleAdsSearchads360V0Common__AdScheduleInfo" + }, + "type": "array" + }, + "calloutText": { + "description": "The callout text. The length of this string should be between 1 and 25, inclusive.", + "type": "string" + }, + "endDate": { + "description": "Last date of when this asset is effective and still serving, in yyyy-MM-dd format.", + "type": "string" + }, + "startDate": { + "description": "Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.", + "type": "string" + }, + "useSearcherTimeZone": { + "description": "Whether to show the asset in search user's time zone. Applies to Microsoft Ads.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Common__UnifiedLocationAsset": { + "description": "A unified location asset.", + "id": "GoogleAdsSearchads360V0Common__UnifiedLocationAsset", + "properties": { + "businessProfileLocations": { + "description": "The list of business locations for the customer. This will only be returned if the Location Asset is syncing from the Business Profile account. It is possible to have multiple Business Profile listings under the same account that point to the same Place ID.", + "items": { + "$ref": "GoogleAdsSearchads360V0Common__BusinessProfileLocation" + }, + "type": "array" + }, + "locationOwnershipType": { + "description": "The type of location ownership. If the type is BUSINESS_OWNER, it will be served as a location extension. If the type is AFFILIATE, it will be served as an affiliate location.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "BUSINESS_OWNER", + "AFFILIATE" + ], + "enumDescriptions": [ + "Not specified.", + "Used for return value only. Represents value unknown in this version.", + "Business Owner of location(legacy location extension - LE).", + "Affiliate location(Third party location extension - ALE)." + ], + "type": "string" + }, + "placeId": { + "description": "Place IDs uniquely identify a place in the Google Places database and on Google Maps. This field is unique for a given customer ID and asset type. See https://developers.google.com/places/web-service/place-id to learn more about Place ID.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset": { + "description": "A Unified Page Feed asset.", + "id": "GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset", + "properties": { + "labels": { + "description": "Labels used to group the page urls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pageUrl": { + "description": "The webpage that advertisers want to target.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset": { + "description": "A unified sitelink asset.", + "id": "GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset", + "properties": { + "adScheduleTargets": { + "description": "List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.", + "items": { + "$ref": "GoogleAdsSearchads360V0Common__AdScheduleInfo" + }, + "type": "array" + }, + "description1": { + "description": "First line of the description for the sitelink. If set, the length should be between 1 and 35, inclusive, and description2 must also be set.", + "type": "string" + }, + "description2": { + "description": "Second line of the description for the sitelink. If set, the length should be between 1 and 35, inclusive, and description1 must also be set.", + "type": "string" + }, + "endDate": { + "description": "Last date of when this asset is effective and still serving, in yyyy-MM-dd format.", + "type": "string" + }, + "linkText": { + "description": "URL display text for the sitelink. The length of this string should be between 1 and 25, inclusive.", + "type": "string" + }, + "mobilePreferred": { + "description": "Whether the preference is for the sitelink asset to be displayed on mobile devices. Applies to Microsoft Ads.", + "type": "boolean" + }, + "startDate": { + "description": "Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.", + "type": "string" + }, + "trackingId": { + "description": "ID used for tracking clicks for the sitelink asset. This is a Yahoo! Japan only field.", + "format": "int64", + "type": "string" + }, + "useSearcherTimeZone": { + "description": "Whether to show the sitelink asset in search user's time zone. Applies to Microsoft Ads.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Common__UserListInfo": { "description": "A User List criterion. Represents a user list that is defined by the advertiser to be targeted.", "id": "GoogleAdsSearchads360V0Common__UserListInfo", @@ -1835,6 +2155,20 @@ ], "type": "string" }, + "invalidParameterError": { + "description": "The reasons for invalid parameter errors.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "INVALID_CURRENCY_CODE" + ], + "enumDescriptions": [ + "Enum unspecified.", + "The received error code is not known in this version.", + "The specified currency code is invalid." + ], + "type": "string" + }, "queryError": { "description": "An error with the query", "enum": [ @@ -2160,6 +2494,19 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Resources_AdGroupCriterion_PositionEstimates": { + "description": "Estimates for criterion bids at various positions.", + "id": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_PositionEstimates", + "properties": { + "topOfPageCpcMicros": { + "description": "Output only. The estimate of the CPC bid required for ad to be displayed at the top of the first page of search results.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Resources_AdGroupCriterion_QualityInfo": { "description": "A container for ad group criterion quality information.", "id": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_QualityInfo", @@ -2285,7 +2632,7 @@ "type": "object" }, "GoogleAdsSearchads360V0Resources_Campaign_SelectiveOptimization": { - "description": "Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards.", + "description": "Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards. This feature only applies to app campaigns that use MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType.", "id": "GoogleAdsSearchads360V0Resources_Campaign_SelectiveOptimization", "properties": { "conversionActions": { @@ -2524,7 +2871,8 @@ "APP_PRE_REGISTRATION_AD", "DISCOVERY_MULTI_ASSET_AD", "DISCOVERY_CAROUSEL_AD", - "TRAVEL_AD" + "TRAVEL_AD", + "DISCOVERY_VIDEO_RESPONSIVE_AD" ], "enumDescriptions": [ "No value has been specified.", @@ -2559,7 +2907,8 @@ "Universal app pre-registration ad.", "Discovery multi asset ad.", "Discovery carousel ad.", - "Travel ad." + "Travel ad.", + "Discovery video responsive ad." ], "readOnly": true, "type": "string" @@ -2622,6 +2971,19 @@ "CAMPAIGN_PAUSED", "ACCOUNT_PAUSED" ], + "enumDeprecated": [ + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false + ], "enumDescriptions": [ "Not specified.", "Used for return value only. Represents value unknown in this version.", @@ -2789,6 +3151,27 @@ "AD_GROUP_AD_CAMPAIGN_PAUSED", "AD_GROUP_AD_AD_GROUP_PAUSED" ], + "enumDeprecated": [ + false, + false, + true, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], "enumDescriptions": [ "No value has been specified.", "Used for return value only. Represents value unknown in this version.", @@ -2870,6 +3253,79 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Resources__AdGroupAsset": { + "description": "A link between an ad group and an asset.", + "id": "GoogleAdsSearchads360V0Resources__AdGroupAsset", + "properties": { + "adGroup": { + "description": "Required. Immutable. The ad group to which the asset is linked.", + "type": "string" + }, + "asset": { + "description": "Required. Immutable. The asset which is linked to the ad group.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the ad group asset. AdGroupAsset resource names have the form: `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}`", + "type": "string" + }, + "status": { + "description": "Status of the ad group asset.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED", + "PAUSED" + ], + "enumDescriptions": [ + "Not specified.", + "Used for return value only. Represents value unknown in this version.", + "Asset link is enabled.", + "Asset link has been removed.", + "Asset link is paused." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Resources__AdGroupAssetSet": { + "description": "AdGroupAssetSet is the linkage between an ad group and an asset set. Creating an AdGroupAssetSet links an asset set with an ad group.", + "id": "GoogleAdsSearchads360V0Resources__AdGroupAssetSet", + "properties": { + "adGroup": { + "description": "Immutable. The ad group to which this asset set is linked.", + "type": "string" + }, + "assetSet": { + "description": "Immutable. The asset set which is linked to the ad group.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the ad group asset set. Ad group asset set resource names have the form: `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}`", + "type": "string" + }, + "status": { + "description": "Output only. The status of the ad group asset set. Read-only.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED" + ], + "enumDescriptions": [ + "The status has not been specified.", + "The received value is not known in this version. This is a response-only value.", + "The linkage between asset set and its container is enabled.", + "The linkage between asset set and its container is removed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Resources__AdGroupAudienceView": { "description": "An ad group audience view. Includes performance data from interests and remarketing lists for Display Network and YouTube Network ads, and remarketing lists for search ads (RLSA), aggregated at the audience level.", "id": "GoogleAdsSearchads360V0Resources__AdGroupAudienceView", @@ -2971,6 +3427,29 @@ "AD_GROUP_CRITERION_SERVING", "AD_GROUP_CRITERION_ACCOUNT_PAUSED" ], + "enumDeprecated": [ + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false + ], "enumDescriptions": [ "Not specified.", "Used for return value only. Represents value unknown in this version.", @@ -3035,13 +3514,17 @@ }, "location": { "$ref": "GoogleAdsSearchads360V0Common__LocationInfo", - "description": "Output only. Location.", - "readOnly": true + "description": "Immutable. Location." }, "negative": { "description": "Immutable. Whether to target (`false`) or exclude (`true`) the criterion. This field is immutable. To switch a criterion from positive to negative, remove then re-add it.", "type": "boolean" }, + "positionEstimates": { + "$ref": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_PositionEstimates", + "description": "Output only. Estimates for criterion bids at various positions.", + "readOnly": true + }, "qualityInfo": { "$ref": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_QualityInfo", "description": "Output only. Information regarding the quality of the criterion.", @@ -3112,7 +3595,9 @@ "COMBINED_AUDIENCE", "KEYWORD_THEME", "AUDIENCE", - "LOCAL_SERVICE_ID" + "LOCAL_SERVICE_ID", + "BRAND", + "BRAND_LIST" ], "enumDescriptions": [ "Not specified.", @@ -3151,7 +3636,9 @@ "Combined audience", "Smart Campaign keyword theme", "Audience", - "Local Services Ads Service ID." + "Local Services Ads Service ID.", + "Brand", + "Brand List" ], "readOnly": true, "type": "string" @@ -3221,6 +3708,16 @@ "description": "Asset is a part of an ad which can be shared across multiple ads. It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. Assets are immutable and cannot be removed. To stop an asset from serving, remove the asset from the entity that is using it.", "id": "GoogleAdsSearchads360V0Resources__Asset", "properties": { + "callAsset": { + "$ref": "GoogleAdsSearchads360V0Common__UnifiedCallAsset", + "description": "Output only. A unified call asset.", + "readOnly": true + }, + "calloutAsset": { + "$ref": "GoogleAdsSearchads360V0Common__UnifiedCalloutAsset", + "description": "Output only. A unified callout asset.", + "readOnly": true + }, "creationTime": { "description": "Output only. The timestamp when this asset was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", "readOnly": true, @@ -3267,14 +3764,29 @@ "readOnly": true, "type": "string" }, + "locationAsset": { + "$ref": "GoogleAdsSearchads360V0Common__UnifiedLocationAsset", + "description": "Output only. A unified location asset.", + "readOnly": true + }, "mobileAppAsset": { "$ref": "GoogleAdsSearchads360V0Common__MobileAppAsset", "description": "A mobile app asset." }, + "pageFeedAsset": { + "$ref": "GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset", + "description": "Output only. A unified page feed asset.", + "readOnly": true + }, "resourceName": { "description": "Immutable. The resource name of the asset. Asset resource names have the form: `customers/{customer_id}/assets/{asset_id}`", "type": "string" }, + "sitelinkAsset": { + "$ref": "GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset", + "description": "Output only. A unified sitelink asset.", + "readOnly": true + }, "status": { "description": "Output only. The status of the asset.", "enum": [ @@ -3387,6 +3899,42 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Resources__AssetSetAsset": { + "description": "AssetSetAsset is the link between an asset and an asset set. Adding an AssetSetAsset links an asset with an asset set.", + "id": "GoogleAdsSearchads360V0Resources__AssetSetAsset", + "properties": { + "asset": { + "description": "Immutable. The asset which this asset set asset is linking to.", + "type": "string" + }, + "assetSet": { + "description": "Immutable. The asset set which this asset set asset is linking to.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the asset set asset. Asset set asset resource names have the form: `customers/{customer_id}/assetSetAssets/{asset_set_id}~{asset_id}`", + "type": "string" + }, + "status": { + "description": "Output only. The status of the asset set asset. Read-only.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED" + ], + "enumDescriptions": [ + "The status has not been specified.", + "The received value is not known in this version. This is a response-only value.", + "The asset set asset is enabled.", + "The asset set asset is removed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Resources__BiddingStrategy": { "description": "A bidding strategy.", "id": "GoogleAdsSearchads360V0Resources__BiddingStrategy", @@ -3927,7 +4475,7 @@ }, "selectiveOptimization": { "$ref": "GoogleAdsSearchads360V0Resources_Campaign_SelectiveOptimization", - "description": "Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards." + "description": "Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards. This feature only applies to app campaigns that use MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType." }, "servingStatus": { "description": "Output only. The ad serving status of the campaign.", @@ -4021,6 +4569,80 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Resources__CampaignAsset": { + "description": "A link between a Campaign and an Asset.", + "id": "GoogleAdsSearchads360V0Resources__CampaignAsset", + "properties": { + "asset": { + "description": "Immutable. The asset which is linked to the campaign.", + "type": "string" + }, + "campaign": { + "description": "Immutable. The campaign to which the asset is linked.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the campaign asset. CampaignAsset resource names have the form: `customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}`", + "type": "string" + }, + "status": { + "description": "Output only. Status of the campaign asset.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED", + "PAUSED" + ], + "enumDescriptions": [ + "Not specified.", + "Used for return value only. Represents value unknown in this version.", + "Asset link is enabled.", + "Asset link has been removed.", + "Asset link is paused." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Resources__CampaignAssetSet": { + "description": "CampaignAssetSet is the linkage between a campaign and an asset set. Adding a CampaignAssetSet links an asset set with a campaign.", + "id": "GoogleAdsSearchads360V0Resources__CampaignAssetSet", + "properties": { + "assetSet": { + "description": "Immutable. The asset set which is linked to the campaign.", + "type": "string" + }, + "campaign": { + "description": "Immutable. The campaign to which this asset set is linked.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the campaign asset set. Asset set asset resource names have the form: `customers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id}`", + "type": "string" + }, + "status": { + "description": "Output only. The status of the campaign asset set asset. Read-only.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED" + ], + "enumDescriptions": [ + "The status has not been specified.", + "The received value is not known in this version. This is a response-only value.", + "The linkage between asset set and its container is enabled.", + "The linkage between asset set and its container is removed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Resources__CampaignAudienceView": { "description": "A campaign audience view. Includes performance data from interests and remarketing lists for Display Network and YouTube Network ads, and remarketing lists for search ads (RLSA), aggregated by campaign and audience criterion. This view only includes audiences attached at the campaign level.", "id": "GoogleAdsSearchads360V0Resources__CampaignAudienceView", @@ -4201,7 +4823,9 @@ "COMBINED_AUDIENCE", "KEYWORD_THEME", "AUDIENCE", - "LOCAL_SERVICE_ID" + "LOCAL_SERVICE_ID", + "BRAND", + "BRAND_LIST" ], "enumDescriptions": [ "Not specified.", @@ -4240,7 +4864,9 @@ "Combined audience", "Smart Campaign keyword theme", "Audience", - "Local Services Ads Service ID." + "Local Services Ads Service ID.", + "Brand", + "Brand List" ], "readOnly": true, "type": "string" @@ -4492,7 +5118,7 @@ "The user requests directions to a business location within Google Maps. Smart campaign only. Read only.", "Call conversions that occur on Smart campaign Ads with call tracking setup, using Smart campaign custom criteria. Read only.", "Conversions that occur when a user visits an advertiser's retail store. Read only.", - "Conversions created from website events (such as form submissions or page loads), that don't use individually coded event snippets.", + "Conversions created from website events (such as form submissions or page loads), that don't use individually coded event snippets. Read only.", "Conversions that come from linked Universal Analytics goals.", "Conversions that come from linked Universal Analytics transactions.", "Conversions that come from linked Google Analytics 4 custom event conversions.", @@ -4783,6 +5409,75 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Resources__CustomerAsset": { + "description": "A link between a customer and an asset.", + "id": "GoogleAdsSearchads360V0Resources__CustomerAsset", + "properties": { + "asset": { + "description": "Required. Immutable. The asset which is linked to the customer.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the customer asset. CustomerAsset resource names have the form: `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`", + "type": "string" + }, + "status": { + "description": "Status of the customer asset.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED", + "PAUSED" + ], + "enumDescriptions": [ + "Not specified.", + "Used for return value only. Represents value unknown in this version.", + "Asset link is enabled.", + "Asset link has been removed.", + "Asset link is paused." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleAdsSearchads360V0Resources__CustomerAssetSet": { + "description": "CustomerAssetSet is the linkage between a customer and an asset set. Adding a CustomerAssetSet links an asset set with a customer.", + "id": "GoogleAdsSearchads360V0Resources__CustomerAssetSet", + "properties": { + "assetSet": { + "description": "Immutable. The asset set which is linked to the customer.", + "type": "string" + }, + "customer": { + "description": "Immutable. The customer to which this asset set is linked.", + "type": "string" + }, + "resourceName": { + "description": "Immutable. The resource name of the customer asset set. Asset set asset resource names have the form: `customers/{customer_id}/customerAssetSets/{asset_set_id}`", + "type": "string" + }, + "status": { + "description": "Output only. The status of the customer asset set asset. Read-only.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVED" + ], + "enumDescriptions": [ + "The status has not been specified.", + "The received value is not known in this version. This is a response-only value.", + "The linkage between asset set and its container is enabled.", + "The linkage between asset set and its container is removed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Resources__CustomerClient": { "description": "A link between the given customer and a client customer. CustomerClients only exist for manager customers. All direct and indirect client customers are included, as well as the manager itself.", "id": "GoogleAdsSearchads360V0Resources__CustomerClient", @@ -4968,6 +5663,66 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Resources__GeoTargetConstant": { + "description": "A geo target constant.", + "id": "GoogleAdsSearchads360V0Resources__GeoTargetConstant", + "properties": { + "canonicalName": { + "description": "Output only. The fully qualified English name, consisting of the target's name and that of its parent and country.", + "readOnly": true, + "type": "string" + }, + "countryCode": { + "description": "Output only. The ISO-3166-1 alpha-2 country code that is associated with the target.", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "Output only. The ID of the geo target constant.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Geo target constant English name.", + "readOnly": true, + "type": "string" + }, + "parentGeoTarget": { + "description": "Output only. The resource name of the parent geo target constant. Geo target constant resource names have the form: `geoTargetConstants/{parent_geo_target_constant_id}`", + "readOnly": true, + "type": "string" + }, + "resourceName": { + "description": "Output only. The resource name of the geo target constant. Geo target constant resource names have the form: `geoTargetConstants/{geo_target_constant_id}`", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Output only. Geo target constant status.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "ENABLED", + "REMOVAL_PLANNED" + ], + "enumDescriptions": [ + "No value has been specified.", + "The received value is not known in this version. This is a response-only value.", + "The geo target constant is valid.", + "The geo target constant is obsolete and will be removed." + ], + "readOnly": true, + "type": "string" + }, + "targetType": { + "description": "Output only. Geo target constant target type.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Resources__KeywordView": { "description": "A keyword view.", "id": "GoogleAdsSearchads360V0Resources__KeywordView", @@ -5306,6 +6061,14 @@ "$ref": "GoogleAdsSearchads360V0Resources__AdGroupAdLabel", "description": "The ad group ad label referenced in the query." }, + "adGroupAsset": { + "$ref": "GoogleAdsSearchads360V0Resources__AdGroupAsset", + "description": "The ad group asset referenced in the query." + }, + "adGroupAssetSet": { + "$ref": "GoogleAdsSearchads360V0Resources__AdGroupAssetSet", + "description": "The ad group asset set referenced in the query." + }, "adGroupAudienceView": { "$ref": "GoogleAdsSearchads360V0Resources__AdGroupAudienceView", "description": "The ad group audience view referenced in the query." @@ -5338,6 +6101,10 @@ "$ref": "GoogleAdsSearchads360V0Resources__AssetSet", "description": "The asset set referenced in the query." }, + "assetSetAsset": { + "$ref": "GoogleAdsSearchads360V0Resources__AssetSetAsset", + "description": "The asset set asset referenced in the query." + }, "biddingStrategy": { "$ref": "GoogleAdsSearchads360V0Resources__BiddingStrategy", "description": "The bidding strategy referenced in the query." @@ -5346,6 +6113,14 @@ "$ref": "GoogleAdsSearchads360V0Resources__Campaign", "description": "The campaign referenced in the query." }, + "campaignAsset": { + "$ref": "GoogleAdsSearchads360V0Resources__CampaignAsset", + "description": "The campaign asset referenced in the query." + }, + "campaignAssetSet": { + "$ref": "GoogleAdsSearchads360V0Resources__CampaignAssetSet", + "description": "The campaign asset set referenced in the query." + }, "campaignAudienceView": { "$ref": "GoogleAdsSearchads360V0Resources__CampaignAudienceView", "description": "The campaign audience view referenced in the query." @@ -5377,6 +6152,14 @@ "$ref": "GoogleAdsSearchads360V0Resources__Customer", "description": "The customer referenced in the query." }, + "customerAsset": { + "$ref": "GoogleAdsSearchads360V0Resources__CustomerAsset", + "description": "The customer asset referenced in the query." + }, + "customerAssetSet": { + "$ref": "GoogleAdsSearchads360V0Resources__CustomerAssetSet", + "description": "The customer asset set referenced in the query." + }, "customerClient": { "$ref": "GoogleAdsSearchads360V0Resources__CustomerClient", "description": "The CustomerClient referenced in the query." @@ -5393,6 +6176,10 @@ "$ref": "GoogleAdsSearchads360V0Resources__GenderView", "description": "The gender view referenced in the query." }, + "geoTargetConstant": { + "$ref": "GoogleAdsSearchads360V0Resources__GeoTargetConstant", + "description": "The geo target constant referenced in the query." + }, "keywordView": { "$ref": "GoogleAdsSearchads360V0Resources__KeywordView", "description": "The keyword view referenced in the query." diff --git a/searchads360/v0/searchads360-gen.go b/searchads360/v0/searchads360-gen.go index b5f184aa76a..2c2a0cd579e 100644 --- a/searchads360/v0/searchads360-gen.go +++ b/searchads360/v0/searchads360-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/search-ads/reporting // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // searchads360Service, err := searchads360.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // searchads360Service, err := searchads360.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // searchads360Service, err := searchads360.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package searchads360 // import "google.golang.org/api/searchads360/v0" import ( @@ -182,6 +195,87 @@ type SearchAds360FieldsService struct { s *Service } +// GoogleAdsSearchads360V0Common__AdScheduleInfo: Represents an +// AdSchedule criterion. AdSchedule is specified as the day of the week +// and a time interval within which ads will be shown. No more than six +// AdSchedules can be added for the same day. +type GoogleAdsSearchads360V0Common__AdScheduleInfo struct { + // DayOfWeek: Day of the week the schedule applies to. This field is + // required for CREATE operations and is prohibited on UPDATE + // operations. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - The value is unknown in this version. + // "MONDAY" - Monday. + // "TUESDAY" - Tuesday. + // "WEDNESDAY" - Wednesday. + // "THURSDAY" - Thursday. + // "FRIDAY" - Friday. + // "SATURDAY" - Saturday. + // "SUNDAY" - Sunday. + DayOfWeek string `json:"dayOfWeek,omitempty"` + + // EndHour: Ending hour in 24 hour time; 24 signifies end of the day. + // This field must be between 0 and 24, inclusive. This field is + // required for CREATE operations and is prohibited on UPDATE + // operations. + EndHour int64 `json:"endHour,omitempty"` + + // EndMinute: Minutes after the end hour at which this schedule ends. + // The schedule is exclusive of the end minute. This field is required + // for CREATE operations and is prohibited on UPDATE operations. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - The value is unknown in this version. + // "ZERO" - Zero minutes past the hour. + // "FIFTEEN" - Fifteen minutes past the hour. + // "THIRTY" - Thirty minutes past the hour. + // "FORTY_FIVE" - Forty-five minutes past the hour. + EndMinute string `json:"endMinute,omitempty"` + + // StartHour: Starting hour in 24 hour time. This field must be between + // 0 and 23, inclusive. This field is required for CREATE operations and + // is prohibited on UPDATE operations. + StartHour int64 `json:"startHour,omitempty"` + + // StartMinute: Minutes after the start hour at which this schedule + // starts. This field is required for CREATE operations and is + // prohibited on UPDATE operations. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - The value is unknown in this version. + // "ZERO" - Zero minutes past the hour. + // "FIFTEEN" - Fifteen minutes past the hour. + // "THIRTY" - Thirty minutes past the hour. + // "FORTY_FIVE" - Forty-five minutes past the hour. + StartMinute string `json:"startMinute,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DayOfWeek") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DayOfWeek") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__AdScheduleInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__AdScheduleInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Common__AgeRangeInfo: An age range criterion. type GoogleAdsSearchads360V0Common__AgeRangeInfo struct { // Type: Type of the age range. @@ -222,6 +316,79 @@ func (s *GoogleAdsSearchads360V0Common__AgeRangeInfo) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Common__AssetInteractionTarget: An +// AssetInteractionTarget segment. +type GoogleAdsSearchads360V0Common__AssetInteractionTarget struct { + // Asset: The asset resource name. + Asset string `json:"asset,omitempty"` + + // InteractionOnThisAsset: Only used with CustomerAsset, CampaignAsset + // and AdGroupAsset metrics. Indicates whether the interaction metrics + // occurred on the asset itself or a different asset or ad unit. + InteractionOnThisAsset bool `json:"interactionOnThisAsset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__AssetInteractionTarget) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__AssetInteractionTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Common__BusinessProfileLocation: Business +// Profile location data synced from the linked Business Profile +// account. +type GoogleAdsSearchads360V0Common__BusinessProfileLocation struct { + // Labels: Advertiser specified label for the location on the Business + // Profile account. This is synced from the Business Profile account. + Labels []string `json:"labels,omitempty"` + + // ListingId: Listing ID of this Business Profile location. This is + // synced from the linked Business Profile account. + ListingId int64 `json:"listingId,omitempty,string"` + + // StoreCode: Business Profile store code of this location. This is + // synced from the Business Profile account. + StoreCode string `json:"storeCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__BusinessProfileLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__BusinessProfileLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Common__CustomParameter: A mapping that can be // used by custom parameter tags in a `tracking_url_template`, // `final_urls`, or `mobile_final_urls`. @@ -798,10 +965,16 @@ type GoogleAdsSearchads360V0Common__Metrics struct { AverageCost float64 `json:"averageCost,omitempty"` // AverageCpc: The total cost of all clicks divided by the total number - // of clicks received. + // of clicks received. This metric is a monetary value and returned in + // the customer's currency by default. See the metrics_currency + // parameter at + // https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause AverageCpc float64 `json:"averageCpc,omitempty"` - // AverageCpm: Average cost-per-thousand impressions (CPM). + // AverageCpm: Average cost-per-thousand impressions (CPM). This metric + // is a monetary value and returned in the customer's currency by + // default. See the metrics_currency parameter at + // https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause AverageCpm float64 `json:"averageCpm,omitempty"` // Clicks: The number of clicks. @@ -886,7 +1059,10 @@ type GoogleAdsSearchads360V0Common__Metrics struct { ConversionsValuePerCost float64 `json:"conversionsValuePerCost,omitempty"` // CostMicros: The sum of your cost-per-click (CPC) and - // cost-per-thousand impressions (CPM) costs during this period. + // cost-per-thousand impressions (CPM) costs during this period. This + // metric is a monetary value and returned in the customer's currency by + // default. See the metrics_currency parameter at + // https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause CostMicros int64 `json:"costMicros,omitempty,string"` // CostPerAllConversions: The cost of ad interactions divided by all @@ -1554,6 +1730,18 @@ type GoogleAdsSearchads360V0Common__Segments struct { // "MIXED" - Cross-network. AdNetworkType string `json:"adNetworkType,omitempty"` + // AssetInteractionTarget: Only used with CustomerAsset, CampaignAsset + // and AdGroupAsset metrics. Indicates whether the interaction metrics + // occurred on the asset itself or a different asset or ad unit. + // Interactions (for example, clicks) are counted across all the parts + // of the served ad (for example, Ad itself and other components like + // Sitelinks) when they are served together. When + // interaction_on_this_asset is true, it means the interactions are on + // this specific asset and when interaction_on_this_asset is false, it + // means the interactions is not on this specific asset but on other + // parts of the served ad this asset is served with. + AssetInteractionTarget *GoogleAdsSearchads360V0Common__AssetInteractionTarget `json:"assetInteractionTarget,omitempty"` + // ConversionAction: Resource name of the conversion action. ConversionAction string `json:"conversionAction,omitempty"` @@ -2038,6 +2226,290 @@ func (s *GoogleAdsSearchads360V0Common__TextLabel) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Common__UnifiedCallAsset: A unified call +// asset. +type GoogleAdsSearchads360V0Common__UnifiedCallAsset struct { + // AdScheduleTargets: List of non-overlapping schedules specifying all + // time intervals for which the asset may serve. There can be a maximum + // of 6 schedules per day, 42 in total. + AdScheduleTargets []*GoogleAdsSearchads360V0Common__AdScheduleInfo `json:"adScheduleTargets,omitempty"` + + // CallConversionAction: The conversion action to attribute a call + // conversion to. If not set, the default conversion action is used. + // This field only has effect if call_conversion_reporting_state is set + // to USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION. + CallConversionAction string `json:"callConversionAction,omitempty"` + + // CallConversionReportingState: Output only. Indicates whether this + // CallAsset should use its own call conversion setting, follow the + // account level setting, or disable call conversion. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Used for return value only. Represents value unknown in + // this version. + // "DISABLED" - Call conversion action is disabled. + // "USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION" - Call conversion action + // will use call conversion type set at the account level. + // "USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION" - Call conversion + // action will use call conversion type set at the resource (call only + // ads/call extensions) level. + CallConversionReportingState string `json:"callConversionReportingState,omitempty"` + + // CallOnly: Whether the call only shows the phone number without a link + // to the website. Applies to Microsoft Ads. + CallOnly bool `json:"callOnly,omitempty"` + + // CallTrackingEnabled: Whether the call should be enabled on call + // tracking. Applies to Microsoft Ads. + CallTrackingEnabled bool `json:"callTrackingEnabled,omitempty"` + + // CountryCode: Two-letter country code of the phone number. Examples: + // 'US', 'us'. + CountryCode string `json:"countryCode,omitempty"` + + // EndDate: Last date of when this asset is effective and still serving, + // in yyyy-MM-dd format. + EndDate string `json:"endDate,omitempty"` + + // PhoneNumber: The advertiser's raw phone number. Examples: + // '1234567890', '(123)456-7890' + PhoneNumber string `json:"phoneNumber,omitempty"` + + // StartDate: Start date of when this asset is effective and can begin + // serving, in yyyy-MM-dd format. + StartDate string `json:"startDate,omitempty"` + + // UseSearcherTimeZone: Whether to show the call extension in search + // user's time zone. Applies to Microsoft Ads. + UseSearcherTimeZone bool `json:"useSearcherTimeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdScheduleTargets") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdScheduleTargets") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__UnifiedCallAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__UnifiedCallAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Common__UnifiedCalloutAsset: A unified callout +// asset. +type GoogleAdsSearchads360V0Common__UnifiedCalloutAsset struct { + // AdScheduleTargets: List of non-overlapping schedules specifying all + // time intervals for which the asset may serve. There can be a maximum + // of 6 schedules per day, 42 in total. + AdScheduleTargets []*GoogleAdsSearchads360V0Common__AdScheduleInfo `json:"adScheduleTargets,omitempty"` + + // CalloutText: The callout text. The length of this string should be + // between 1 and 25, inclusive. + CalloutText string `json:"calloutText,omitempty"` + + // EndDate: Last date of when this asset is effective and still serving, + // in yyyy-MM-dd format. + EndDate string `json:"endDate,omitempty"` + + // StartDate: Start date of when this asset is effective and can begin + // serving, in yyyy-MM-dd format. + StartDate string `json:"startDate,omitempty"` + + // UseSearcherTimeZone: Whether to show the asset in search user's time + // zone. Applies to Microsoft Ads. + UseSearcherTimeZone bool `json:"useSearcherTimeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdScheduleTargets") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdScheduleTargets") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__UnifiedCalloutAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__UnifiedCalloutAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Common__UnifiedLocationAsset: A unified +// location asset. +type GoogleAdsSearchads360V0Common__UnifiedLocationAsset struct { + // BusinessProfileLocations: The list of business locations for the + // customer. This will only be returned if the Location Asset is syncing + // from the Business Profile account. It is possible to have multiple + // Business Profile listings under the same account that point to the + // same Place ID. + BusinessProfileLocations []*GoogleAdsSearchads360V0Common__BusinessProfileLocation `json:"businessProfileLocations,omitempty"` + + // LocationOwnershipType: The type of location ownership. If the type is + // BUSINESS_OWNER, it will be served as a location extension. If the + // type is AFFILIATE, it will be served as an affiliate location. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Used for return value only. Represents value unknown in + // this version. + // "BUSINESS_OWNER" - Business Owner of location(legacy location + // extension - LE). + // "AFFILIATE" - Affiliate location(Third party location extension - + // ALE). + LocationOwnershipType string `json:"locationOwnershipType,omitempty"` + + // PlaceId: Place IDs uniquely identify a place in the Google Places + // database and on Google Maps. This field is unique for a given + // customer ID and asset type. See + // https://developers.google.com/places/web-service/place-id to learn + // more about Place ID. + PlaceId string `json:"placeId,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BusinessProfileLocations") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BusinessProfileLocations") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__UnifiedLocationAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__UnifiedLocationAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset: A Unified Page +// Feed asset. +type GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset struct { + // Labels: Labels used to group the page urls. + Labels []string `json:"labels,omitempty"` + + // PageUrl: The webpage that advertisers want to target. + PageUrl string `json:"pageUrl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset: A unified +// sitelink asset. +type GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset struct { + // AdScheduleTargets: List of non-overlapping schedules specifying all + // time intervals for which the asset may serve. There can be a maximum + // of 6 schedules per day, 42 in total. + AdScheduleTargets []*GoogleAdsSearchads360V0Common__AdScheduleInfo `json:"adScheduleTargets,omitempty"` + + // Description1: First line of the description for the sitelink. If set, + // the length should be between 1 and 35, inclusive, and description2 + // must also be set. + Description1 string `json:"description1,omitempty"` + + // Description2: Second line of the description for the sitelink. If + // set, the length should be between 1 and 35, inclusive, and + // description1 must also be set. + Description2 string `json:"description2,omitempty"` + + // EndDate: Last date of when this asset is effective and still serving, + // in yyyy-MM-dd format. + EndDate string `json:"endDate,omitempty"` + + // LinkText: URL display text for the sitelink. The length of this + // string should be between 1 and 25, inclusive. + LinkText string `json:"linkText,omitempty"` + + // MobilePreferred: Whether the preference is for the sitelink asset to + // be displayed on mobile devices. Applies to Microsoft Ads. + MobilePreferred bool `json:"mobilePreferred,omitempty"` + + // StartDate: Start date of when this asset is effective and can begin + // serving, in yyyy-MM-dd format. + StartDate string `json:"startDate,omitempty"` + + // TrackingId: ID used for tracking clicks for the sitelink asset. This + // is a Yahoo! Japan only field. + TrackingId int64 `json:"trackingId,omitempty,string"` + + // UseSearcherTimeZone: Whether to show the sitelink asset in search + // user's time zone. Applies to Microsoft Ads. + UseSearcherTimeZone bool `json:"useSearcherTimeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdScheduleTargets") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdScheduleTargets") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Common__UserListInfo: A User List criterion. // Represents a user list that is defined by the advertiser to be // targeted. @@ -2435,6 +2907,14 @@ type GoogleAdsSearchads360V0Errors__ErrorCode struct { // "DEADLINE_EXCEEDED" - The request took longer than a deadline. InternalError string `json:"internalError,omitempty"` + // InvalidParameterError: The reasons for invalid parameter errors. + // + // Possible values: + // "UNSPECIFIED" - Enum unspecified. + // "UNKNOWN" - The received error code is not known in this version. + // "INVALID_CURRENCY_CODE" - The specified currency code is invalid. + InvalidParameterError string `json:"invalidParameterError,omitempty"` + // QueryError: An error with the query // // Possible values: @@ -2835,6 +3315,38 @@ func (s *GoogleAdsSearchads360V0Errors__SearchAds360Failure) MarshalJSON() ([]by return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0ResourcesAdGroupCriterionPositionEstimates: +// Estimates for criterion bids at various positions. +type GoogleAdsSearchads360V0ResourcesAdGroupCriterionPositionEstimates struct { + // TopOfPageCpcMicros: Output only. The estimate of the CPC bid required + // for ad to be displayed at the top of the first page of search + // results. + TopOfPageCpcMicros int64 `json:"topOfPageCpcMicros,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "TopOfPageCpcMicros") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TopOfPageCpcMicros") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0ResourcesAdGroupCriterionPositionEstimates) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0ResourcesAdGroupCriterionPositionEstimates + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0ResourcesAdGroupCriterionQualityInfo: A // container for ad group criterion quality information. type GoogleAdsSearchads360V0ResourcesAdGroupCriterionQualityInfo struct { @@ -3055,7 +3567,10 @@ func (s *GoogleAdsSearchads360V0ResourcesCampaignOptimizationGoalSetting) Marsha // GoogleAdsSearchads360V0ResourcesCampaignSelectiveOptimization: // Selective optimization setting for this campaign, which includes a -// set of conversion actions to optimize this campaign towards. +// set of conversion actions to optimize this campaign towards. This +// feature only applies to app campaigns that use MULTI_CHANNEL as +// AdvertisingChannelType and APP_CAMPAIGN or +// APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType. type GoogleAdsSearchads360V0ResourcesCampaignSelectiveOptimization struct { // ConversionActions: The selected set of conversion actions for // optimizing this campaign. @@ -3428,6 +3943,7 @@ type GoogleAdsSearchads360V0Resources__Ad struct { // "DISCOVERY_MULTI_ASSET_AD" - Discovery multi asset ad. // "DISCOVERY_CAROUSEL_AD" - Discovery carousel ad. // "TRAVEL_AD" - Travel ad. + // "DISCOVERY_VIDEO_RESPONSIVE_AD" - Discovery video responsive ad. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayUrl") to @@ -3685,18 +4201,107 @@ type GoogleAdsSearchads360V0Resources__AdGroupAd struct { // `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` ResourceName string `json:"resourceName,omitempty"` - // Status: The status of the ad. + // Status: The status of the ad. + // + // Possible values: + // "UNSPECIFIED" - No value has been specified. + // "UNKNOWN" - The received value is not known in this version. This + // is a response-only value. + // "ENABLED" - The ad group ad is enabled. + // "PAUSED" - The ad group ad is paused. + // "REMOVED" - The ad group ad is removed. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ad") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ad") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__AdGroupAd) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__AdGroupAd + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Resources__AdGroupAdLabel: A relationship +// between an ad group ad and a label. +type GoogleAdsSearchads360V0Resources__AdGroupAdLabel struct { + // AdGroupAd: Immutable. The ad group ad to which the label is attached. + AdGroupAd string `json:"adGroupAd,omitempty"` + + // Label: Immutable. The label assigned to the ad group ad. + Label string `json:"label,omitempty"` + + // ResourceName: Immutable. The resource name of the ad group ad label. + // Ad group ad label resource names have the form: + // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_ + // id}` + ResourceName string `json:"resourceName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdGroupAd") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdGroupAd") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__AdGroupAdLabel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__AdGroupAdLabel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Resources__AdGroupAsset: A link between an ad +// group and an asset. +type GoogleAdsSearchads360V0Resources__AdGroupAsset struct { + // AdGroup: Required. Immutable. The ad group to which the asset is + // linked. + AdGroup string `json:"adGroup,omitempty"` + + // Asset: Required. Immutable. The asset which is linked to the ad + // group. + Asset string `json:"asset,omitempty"` + + // ResourceName: Immutable. The resource name of the ad group asset. + // AdGroupAsset resource names have the form: + // `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field + // _type}` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Status of the ad group asset. // // Possible values: - // "UNSPECIFIED" - No value has been specified. - // "UNKNOWN" - The received value is not known in this version. This - // is a response-only value. - // "ENABLED" - The ad group ad is enabled. - // "PAUSED" - The ad group ad is paused. - // "REMOVED" - The ad group ad is removed. + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Used for return value only. Represents value unknown in + // this version. + // "ENABLED" - Asset link is enabled. + // "REMOVED" - Asset link has been removed. + // "PAUSED" - Asset link is paused. Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Ad") to + // ForceSendFields is a list of field names (e.g. "AdGroup") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3704,8 +4309,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupAd struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Ad") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "AdGroup") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3713,28 +4318,41 @@ type GoogleAdsSearchads360V0Resources__AdGroupAd struct { NullFields []string `json:"-"` } -func (s *GoogleAdsSearchads360V0Resources__AdGroupAd) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAdsSearchads360V0Resources__AdGroupAd +func (s *GoogleAdsSearchads360V0Resources__AdGroupAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__AdGroupAsset raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleAdsSearchads360V0Resources__AdGroupAdLabel: A relationship -// between an ad group ad and a label. -type GoogleAdsSearchads360V0Resources__AdGroupAdLabel struct { - // AdGroupAd: Immutable. The ad group ad to which the label is attached. - AdGroupAd string `json:"adGroupAd,omitempty"` +// GoogleAdsSearchads360V0Resources__AdGroupAssetSet: AdGroupAssetSet is +// the linkage between an ad group and an asset set. Creating an +// AdGroupAssetSet links an asset set with an ad group. +type GoogleAdsSearchads360V0Resources__AdGroupAssetSet struct { + // AdGroup: Immutable. The ad group to which this asset set is linked. + AdGroup string `json:"adGroup,omitempty"` - // Label: Immutable. The label assigned to the ad group ad. - Label string `json:"label,omitempty"` + // AssetSet: Immutable. The asset set which is linked to the ad group. + AssetSet string `json:"assetSet,omitempty"` - // ResourceName: Immutable. The resource name of the ad group ad label. - // Ad group ad label resource names have the form: - // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_ - // id}` + // ResourceName: Immutable. The resource name of the ad group asset set. + // Ad group asset set resource names have the form: + // `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id} + // ` ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdGroupAd") to + // Status: Output only. The status of the ad group asset set. Read-only. + // + // Possible values: + // "UNSPECIFIED" - The status has not been specified. + // "UNKNOWN" - The received value is not known in this version. This + // is a response-only value. + // "ENABLED" - The linkage between asset set and its container is + // enabled. + // "REMOVED" - The linkage between asset set and its container is + // removed. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdGroup") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3742,7 +4360,7 @@ type GoogleAdsSearchads360V0Resources__AdGroupAdLabel struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdGroupAd") to include in + // NullFields is a list of field names (e.g. "AdGroup") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3751,8 +4369,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupAdLabel struct { NullFields []string `json:"-"` } -func (s *GoogleAdsSearchads360V0Resources__AdGroupAdLabel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAdsSearchads360V0Resources__AdGroupAdLabel +func (s *GoogleAdsSearchads360V0Resources__AdGroupAssetSet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__AdGroupAssetSet raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -3948,7 +4566,7 @@ type GoogleAdsSearchads360V0Resources__AdGroupCriterion struct { // ListingGroup: Immutable. Listing group. ListingGroup *GoogleAdsSearchads360V0Common__ListingGroupInfo `json:"listingGroup,omitempty"` - // Location: Output only. Location. + // Location: Immutable. Location. Location *GoogleAdsSearchads360V0Common__LocationInfo `json:"location,omitempty"` // Negative: Immutable. Whether to target (`false`) or exclude (`true`) @@ -3956,6 +4574,10 @@ type GoogleAdsSearchads360V0Resources__AdGroupCriterion struct { // positive to negative, remove then re-add it. Negative bool `json:"negative,omitempty"` + // PositionEstimates: Output only. Estimates for criterion bids at + // various positions. + PositionEstimates *GoogleAdsSearchads360V0ResourcesAdGroupCriterionPositionEstimates `json:"positionEstimates,omitempty"` + // QualityInfo: Output only. Information regarding the quality of the // criterion. QualityInfo *GoogleAdsSearchads360V0ResourcesAdGroupCriterionQualityInfo `json:"qualityInfo,omitempty"` @@ -4031,6 +4653,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupCriterion struct { // "KEYWORD_THEME" - Smart Campaign keyword theme // "AUDIENCE" - Audience // "LOCAL_SERVICE_ID" - Local Services Ads Service ID. + // "BRAND" - Brand + // "BRAND_LIST" - Brand List Type string `json:"type,omitempty"` // UserList: Immutable. User List. The Similar Audiences sunset starts @@ -4192,6 +4816,12 @@ func (s *GoogleAdsSearchads360V0Resources__AgeRangeView) MarshalJSON() ([]byte, // and cannot be removed. To stop an asset from serving, remove the // asset from the entity that is using it. type GoogleAdsSearchads360V0Resources__Asset struct { + // CallAsset: Output only. A unified call asset. + CallAsset *GoogleAdsSearchads360V0Common__UnifiedCallAsset `json:"callAsset,omitempty"` + + // CalloutAsset: Output only. A unified callout asset. + CalloutAsset *GoogleAdsSearchads360V0Common__UnifiedCalloutAsset `json:"calloutAsset,omitempty"` + // CreationTime: Output only. The timestamp when this asset was created. // The timestamp is in the customer's time zone and in "yyyy-MM-dd // HH:mm:ss" format. @@ -4222,14 +4852,23 @@ type GoogleAdsSearchads360V0Resources__Asset struct { // "yyyy-MM-dd HH:mm:ss.ssssss" format. LastModifiedTime string `json:"lastModifiedTime,omitempty"` + // LocationAsset: Output only. A unified location asset. + LocationAsset *GoogleAdsSearchads360V0Common__UnifiedLocationAsset `json:"locationAsset,omitempty"` + // MobileAppAsset: A mobile app asset. MobileAppAsset *GoogleAdsSearchads360V0Common__MobileAppAsset `json:"mobileAppAsset,omitempty"` + // PageFeedAsset: Output only. A unified page feed asset. + PageFeedAsset *GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset `json:"pageFeedAsset,omitempty"` + // ResourceName: Immutable. The resource name of the asset. Asset // resource names have the form: // `customers/{customer_id}/assets/{asset_id}` ResourceName string `json:"resourceName,omitempty"` + // SitelinkAsset: Output only. A unified sitelink asset. + SitelinkAsset *GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset `json:"sitelinkAsset,omitempty"` + // Status: Output only. The status of the asset. // // Possible values: @@ -4281,7 +4920,7 @@ type GoogleAdsSearchads360V0Resources__Asset struct { // "HOTEL_PROPERTY" - Hotel property asset. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationTime") to + // ForceSendFields is a list of field names (e.g. "CallAsset") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4289,10 +4928,10 @@ type GoogleAdsSearchads360V0Resources__Asset struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTime") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CallAsset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -4339,6 +4978,55 @@ func (s *GoogleAdsSearchads360V0Resources__AssetSet) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Resources__AssetSetAsset: AssetSetAsset is the +// link between an asset and an asset set. Adding an AssetSetAsset links +// an asset with an asset set. +type GoogleAdsSearchads360V0Resources__AssetSetAsset struct { + // Asset: Immutable. The asset which this asset set asset is linking to. + Asset string `json:"asset,omitempty"` + + // AssetSet: Immutable. The asset set which this asset set asset is + // linking to. + AssetSet string `json:"assetSet,omitempty"` + + // ResourceName: Immutable. The resource name of the asset set asset. + // Asset set asset resource names have the form: + // `customers/{customer_id}/assetSetAssets/{asset_set_id}~{asset_id}` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Output only. The status of the asset set asset. Read-only. + // + // Possible values: + // "UNSPECIFIED" - The status has not been specified. + // "UNKNOWN" - The received value is not known in this version. This + // is a response-only value. + // "ENABLED" - The asset set asset is enabled. + // "REMOVED" - The asset set asset is removed. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__AssetSetAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__AssetSetAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Resources__BiddingStrategy: A bidding // strategy. type GoogleAdsSearchads360V0Resources__BiddingStrategy struct { @@ -4882,7 +5570,9 @@ type GoogleAdsSearchads360V0Resources__Campaign struct { // SelectiveOptimization: Selective optimization setting for this // campaign, which includes a set of conversion actions to optimize this - // campaign towards. + // campaign towards. This feature only applies to app campaigns that use + // MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or + // APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType. SelectiveOptimization *GoogleAdsSearchads360V0ResourcesCampaignSelectiveOptimization `json:"selectiveOptimization,omitempty"` // ServingStatus: Output only. The ad serving status of the campaign. @@ -4987,6 +5677,107 @@ func (s *GoogleAdsSearchads360V0Resources__Campaign) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Resources__CampaignAsset: A link between a +// Campaign and an Asset. +type GoogleAdsSearchads360V0Resources__CampaignAsset struct { + // Asset: Immutable. The asset which is linked to the campaign. + Asset string `json:"asset,omitempty"` + + // Campaign: Immutable. The campaign to which the asset is linked. + Campaign string `json:"campaign,omitempty"` + + // ResourceName: Immutable. The resource name of the campaign asset. + // CampaignAsset resource names have the form: + // `customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{fiel + // d_type}` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Output only. Status of the campaign asset. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Used for return value only. Represents value unknown in + // this version. + // "ENABLED" - Asset link is enabled. + // "REMOVED" - Asset link has been removed. + // "PAUSED" - Asset link is paused. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__CampaignAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__CampaignAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Resources__CampaignAssetSet: CampaignAssetSet +// is the linkage between a campaign and an asset set. Adding a +// CampaignAssetSet links an asset set with a campaign. +type GoogleAdsSearchads360V0Resources__CampaignAssetSet struct { + // AssetSet: Immutable. The asset set which is linked to the campaign. + AssetSet string `json:"assetSet,omitempty"` + + // Campaign: Immutable. The campaign to which this asset set is linked. + Campaign string `json:"campaign,omitempty"` + + // ResourceName: Immutable. The resource name of the campaign asset set. + // Asset set asset resource names have the form: + // `customers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id + // }` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Output only. The status of the campaign asset set asset. + // Read-only. + // + // Possible values: + // "UNSPECIFIED" - The status has not been specified. + // "UNKNOWN" - The received value is not known in this version. This + // is a response-only value. + // "ENABLED" - The linkage between asset set and its container is + // enabled. + // "REMOVED" - The linkage between asset set and its container is + // removed. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssetSet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssetSet") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__CampaignAssetSet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__CampaignAssetSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Resources__CampaignAudienceView: A campaign // audience view. Includes performance data from interests and // remarketing lists for Display Network and YouTube Network ads, and @@ -5192,6 +5983,8 @@ type GoogleAdsSearchads360V0Resources__CampaignCriterion struct { // "KEYWORD_THEME" - Smart Campaign keyword theme // "AUDIENCE" - Audience // "LOCAL_SERVICE_ID" - Local Services Ads Service ID. + // "BRAND" - Brand + // "BRAND_LIST" - Brand List Type string `json:"type,omitempty"` // UserList: Immutable. User List. The Similar Audiences sunset starts @@ -5485,7 +6278,7 @@ type GoogleAdsSearchads360V0Resources__ConversionAction struct { // advertiser's retail store. Read only. // "WEBPAGE_CODELESS" - Conversions created from website events (such // as form submissions or page loads), that don't use individually coded - // event snippets. + // event snippets. Read only. // "UNIVERSAL_ANALYTICS_GOAL" - Conversions that come from linked // Universal Analytics goals. // "UNIVERSAL_ANALYTICS_TRANSACTION" - Conversions that come from @@ -5816,6 +6609,103 @@ func (s *GoogleAdsSearchads360V0Resources__Customer) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Resources__CustomerAsset: A link between a +// customer and an asset. +type GoogleAdsSearchads360V0Resources__CustomerAsset struct { + // Asset: Required. Immutable. The asset which is linked to the + // customer. + Asset string `json:"asset,omitempty"` + + // ResourceName: Immutable. The resource name of the customer asset. + // CustomerAsset resource names have the form: + // `customers/{customer_id}/customerAssets/{asset_id}~{field_type}` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Status of the customer asset. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Used for return value only. Represents value unknown in + // this version. + // "ENABLED" - Asset link is enabled. + // "REMOVED" - Asset link has been removed. + // "PAUSED" - Asset link is paused. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Asset") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Asset") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__CustomerAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__CustomerAsset + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleAdsSearchads360V0Resources__CustomerAssetSet: CustomerAssetSet +// is the linkage between a customer and an asset set. Adding a +// CustomerAssetSet links an asset set with a customer. +type GoogleAdsSearchads360V0Resources__CustomerAssetSet struct { + // AssetSet: Immutable. The asset set which is linked to the customer. + AssetSet string `json:"assetSet,omitempty"` + + // Customer: Immutable. The customer to which this asset set is linked. + Customer string `json:"customer,omitempty"` + + // ResourceName: Immutable. The resource name of the customer asset set. + // Asset set asset resource names have the form: + // `customers/{customer_id}/customerAssetSets/{asset_set_id}` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Output only. The status of the customer asset set asset. + // Read-only. + // + // Possible values: + // "UNSPECIFIED" - The status has not been specified. + // "UNKNOWN" - The received value is not known in this version. This + // is a response-only value. + // "ENABLED" - The linkage between asset set and its container is + // enabled. + // "REMOVED" - The linkage between asset set and its container is + // removed. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssetSet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssetSet") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__CustomerAssetSet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__CustomerAssetSet + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Resources__CustomerClient: A link between the // given customer and a client customer. CustomerClients only exist for // manager customers. All direct and indirect client customers are @@ -6071,6 +6961,70 @@ func (s *GoogleAdsSearchads360V0Resources__GenderView) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Resources__GeoTargetConstant: A geo target +// constant. +type GoogleAdsSearchads360V0Resources__GeoTargetConstant struct { + // CanonicalName: Output only. The fully qualified English name, + // consisting of the target's name and that of its parent and country. + CanonicalName string `json:"canonicalName,omitempty"` + + // CountryCode: Output only. The ISO-3166-1 alpha-2 country code that is + // associated with the target. + CountryCode string `json:"countryCode,omitempty"` + + // Id: Output only. The ID of the geo target constant. + Id int64 `json:"id,omitempty,string"` + + // Name: Output only. Geo target constant English name. + Name string `json:"name,omitempty"` + + // ParentGeoTarget: Output only. The resource name of the parent geo + // target constant. Geo target constant resource names have the form: + // `geoTargetConstants/{parent_geo_target_constant_id}` + ParentGeoTarget string `json:"parentGeoTarget,omitempty"` + + // ResourceName: Output only. The resource name of the geo target + // constant. Geo target constant resource names have the form: + // `geoTargetConstants/{geo_target_constant_id}` + ResourceName string `json:"resourceName,omitempty"` + + // Status: Output only. Geo target constant status. + // + // Possible values: + // "UNSPECIFIED" - No value has been specified. + // "UNKNOWN" - The received value is not known in this version. This + // is a response-only value. + // "ENABLED" - The geo target constant is valid. + // "REMOVAL_PLANNED" - The geo target constant is obsolete and will be + // removed. + Status string `json:"status,omitempty"` + + // TargetType: Output only. Geo target constant target type. + TargetType string `json:"targetType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CanonicalName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CanonicalName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleAdsSearchads360V0Resources__GeoTargetConstant) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Resources__GeoTargetConstant + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Resources__KeywordView: A keyword view. type GoogleAdsSearchads360V0Resources__KeywordView struct { // ResourceName: Output only. The resource name of the keyword view. @@ -6549,6 +7503,12 @@ type GoogleAdsSearchads360V0Services__SearchAds360Row struct { // AdGroupAdLabel: The ad group ad label referenced in the query. AdGroupAdLabel *GoogleAdsSearchads360V0Resources__AdGroupAdLabel `json:"adGroupAdLabel,omitempty"` + // AdGroupAsset: The ad group asset referenced in the query. + AdGroupAsset *GoogleAdsSearchads360V0Resources__AdGroupAsset `json:"adGroupAsset,omitempty"` + + // AdGroupAssetSet: The ad group asset set referenced in the query. + AdGroupAssetSet *GoogleAdsSearchads360V0Resources__AdGroupAssetSet `json:"adGroupAssetSet,omitempty"` + // AdGroupAudienceView: The ad group audience view referenced in the // query. AdGroupAudienceView *GoogleAdsSearchads360V0Resources__AdGroupAudienceView `json:"adGroupAudienceView,omitempty"` @@ -6575,12 +7535,21 @@ type GoogleAdsSearchads360V0Services__SearchAds360Row struct { // AssetSet: The asset set referenced in the query. AssetSet *GoogleAdsSearchads360V0Resources__AssetSet `json:"assetSet,omitempty"` + // AssetSetAsset: The asset set asset referenced in the query. + AssetSetAsset *GoogleAdsSearchads360V0Resources__AssetSetAsset `json:"assetSetAsset,omitempty"` + // BiddingStrategy: The bidding strategy referenced in the query. BiddingStrategy *GoogleAdsSearchads360V0Resources__BiddingStrategy `json:"biddingStrategy,omitempty"` // Campaign: The campaign referenced in the query. Campaign *GoogleAdsSearchads360V0Resources__Campaign `json:"campaign,omitempty"` + // CampaignAsset: The campaign asset referenced in the query. + CampaignAsset *GoogleAdsSearchads360V0Resources__CampaignAsset `json:"campaignAsset,omitempty"` + + // CampaignAssetSet: The campaign asset set referenced in the query. + CampaignAssetSet *GoogleAdsSearchads360V0Resources__CampaignAssetSet `json:"campaignAssetSet,omitempty"` + // CampaignAudienceView: The campaign audience view referenced in the // query. CampaignAudienceView *GoogleAdsSearchads360V0Resources__CampaignAudienceView `json:"campaignAudienceView,omitempty"` @@ -6603,6 +7572,12 @@ type GoogleAdsSearchads360V0Services__SearchAds360Row struct { // Customer: The customer referenced in the query. Customer *GoogleAdsSearchads360V0Resources__Customer `json:"customer,omitempty"` + // CustomerAsset: The customer asset referenced in the query. + CustomerAsset *GoogleAdsSearchads360V0Resources__CustomerAsset `json:"customerAsset,omitempty"` + + // CustomerAssetSet: The customer asset set referenced in the query. + CustomerAssetSet *GoogleAdsSearchads360V0Resources__CustomerAssetSet `json:"customerAssetSet,omitempty"` + // CustomerClient: The CustomerClient referenced in the query. CustomerClient *GoogleAdsSearchads360V0Resources__CustomerClient `json:"customerClient,omitempty"` @@ -6616,6 +7591,9 @@ type GoogleAdsSearchads360V0Services__SearchAds360Row struct { // GenderView: The gender view referenced in the query. GenderView *GoogleAdsSearchads360V0Resources__GenderView `json:"genderView,omitempty"` + // GeoTargetConstant: The geo target constant referenced in the query. + GeoTargetConstant *GoogleAdsSearchads360V0Resources__GeoTargetConstant `json:"geoTargetConstant,omitempty"` + // KeywordView: The keyword view referenced in the query. KeywordView *GoogleAdsSearchads360V0Resources__KeywordView `json:"keywordView,omitempty"` diff --git a/searchconsole/v1/searchconsole-gen.go b/searchconsole/v1/searchconsole-gen.go index a7f0207685d..c231223ae27 100644 --- a/searchconsole/v1/searchconsole-gen.go +++ b/searchconsole/v1/searchconsole-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/webmaster-tools/search-console-api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // searchconsoleService, err := searchconsole.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // searchconsoleService, err := searchconsole.NewService(ctx, option.WithScopes(searchconsole.WebmastersReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // searchconsoleService, err := searchconsole.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // searchconsoleService, err := searchconsole.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package searchconsole // import "google.golang.org/api/searchconsole/v1" import ( diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index 94b0e314d52..fc91a7ea2d1 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/secret-manager/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // secretmanagerService, err := secretmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // secretmanagerService, err := secretmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // secretmanagerService, err := secretmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package secretmanager // import "google.golang.org/api/secretmanager/v1" import ( diff --git a/secretmanager/v1beta1/secretmanager-gen.go b/secretmanager/v1beta1/secretmanager-gen.go index 8116fcb4399..f81afcb8fa1 100644 --- a/secretmanager/v1beta1/secretmanager-gen.go +++ b/secretmanager/v1beta1/secretmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/secret-manager/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // secretmanagerService, err := secretmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // secretmanagerService, err := secretmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // secretmanagerService, err := secretmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package secretmanager // import "google.golang.org/api/secretmanager/v1beta1" import ( diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 77fe0e6d305..f8e028cd1b2 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -4750,7 +4750,7 @@ } } }, - "revision": "20230807", + "revision": "20230904", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -5753,6 +5753,11 @@ "$ref": "ExfilResource" }, "type": "array" + }, + "totalExfiltratedBytes": { + "description": "Total exfiltrated bytes processed for the entire job.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -6297,12 +6302,12 @@ "type": "array" }, "externalSystemUpdateTime": { - "description": "The most recent time when the corresponding finding's ticket/tracker was updated in the external system.", + "description": "The time when the case was last updated, as reported by the external system.", "format": "google-datetime", "type": "string" }, "externalUid": { - "description": "Identifier that's used to track the given finding in the external system.", + "description": "The identifier that's used to track the finding's corresponding case in the external system.", "type": "string" }, "name": { @@ -6310,7 +6315,7 @@ "type": "string" }, "status": { - "description": "Most recent status of the corresponding finding's ticket/tracker in the external system.", + "description": "The most recent status of the finding's corresponding case, as reported by the external system.", "type": "string" } }, diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 4800c237d10..a77dd721d89 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/security-command-center // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // securitycenterService, err := securitycenter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // securitycenterService, err := securitycenter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // securitycenterService, err := securitycenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package securitycenter // import "google.golang.org/api/securitycenter/v1" import ( @@ -2339,6 +2352,10 @@ type Exfiltration struct { // complete copy of the "joined" source data. Targets []*ExfilResource `json:"targets,omitempty"` + // TotalExfiltratedBytes: Total exfiltrated bytes processed for the + // entire job. + TotalExfiltratedBytes int64 `json:"totalExfiltratedBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Sources") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3188,12 +3205,12 @@ type GoogleCloudSecuritycenterV1ExternalSystem struct { // system. Assignees []string `json:"assignees,omitempty"` - // ExternalSystemUpdateTime: The most recent time when the corresponding - // finding's ticket/tracker was updated in the external system. + // ExternalSystemUpdateTime: The time when the case was last updated, as + // reported by the external system. ExternalSystemUpdateTime string `json:"externalSystemUpdateTime,omitempty"` - // ExternalUid: Identifier that's used to track the given finding in the - // external system. + // ExternalUid: The identifier that's used to track the finding's + // corresponding case in the external system. ExternalUid string `json:"externalUid,omitempty"` // Name: Full resource name of the external system, for example: @@ -3202,8 +3219,8 @@ type GoogleCloudSecuritycenterV1ExternalSystem struct { // "projects/1234/sources/5678/findings/123456/externalSystems/jira" Name string `json:"name,omitempty"` - // Status: Most recent status of the corresponding finding's - // ticket/tracker in the external system. + // Status: The most recent status of the finding's corresponding case, + // as reported by the external system. Status string `json:"status,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 56b3f890d6e..d52577ff057 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20230807", + "revision": "20230904", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1618,6 +1618,11 @@ "$ref": "ExfilResource" }, "type": "array" + }, + "totalExfiltratedBytes": { + "description": "Total exfiltrated bytes processed for the entire job.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -2162,12 +2167,12 @@ "type": "array" }, "externalSystemUpdateTime": { - "description": "The most recent time when the corresponding finding's ticket/tracker was updated in the external system.", + "description": "The time when the case was last updated, as reported by the external system.", "format": "google-datetime", "type": "string" }, "externalUid": { - "description": "Identifier that's used to track the given finding in the external system.", + "description": "The identifier that's used to track the finding's corresponding case in the external system.", "type": "string" }, "name": { @@ -2175,7 +2180,7 @@ "type": "string" }, "status": { - "description": "Most recent status of the corresponding finding's ticket/tracker in the external system.", + "description": "The most recent status of the finding's corresponding case, as reported by the external system.", "type": "string" } }, diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index a9af2d2dbc0..7dda81872cc 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/security-command-center // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // securitycenterService, err := securitycenter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // securitycenterService, err := securitycenter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // securitycenterService, err := securitycenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package securitycenter // import "google.golang.org/api/securitycenter/v1beta1" import ( @@ -1367,6 +1380,10 @@ type Exfiltration struct { // complete copy of the "joined" source data. Targets []*ExfilResource `json:"targets,omitempty"` + // TotalExfiltratedBytes: Total exfiltrated bytes processed for the + // entire job. + TotalExfiltratedBytes int64 `json:"totalExfiltratedBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Sources") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2204,12 +2221,12 @@ type GoogleCloudSecuritycenterV1ExternalSystem struct { // system. Assignees []string `json:"assignees,omitempty"` - // ExternalSystemUpdateTime: The most recent time when the corresponding - // finding's ticket/tracker was updated in the external system. + // ExternalSystemUpdateTime: The time when the case was last updated, as + // reported by the external system. ExternalSystemUpdateTime string `json:"externalSystemUpdateTime,omitempty"` - // ExternalUid: Identifier that's used to track the given finding in the - // external system. + // ExternalUid: The identifier that's used to track the finding's + // corresponding case in the external system. ExternalUid string `json:"externalUid,omitempty"` // Name: Full resource name of the external system, for example: @@ -2218,8 +2235,8 @@ type GoogleCloudSecuritycenterV1ExternalSystem struct { // "projects/1234/sources/5678/findings/123456/externalSystems/jira" Name string `json:"name,omitempty"` - // Status: Most recent status of the corresponding finding's - // ticket/tracker in the external system. + // Status: The most recent status of the finding's corresponding case, + // as reported by the external system. Status string `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "Assignees") to diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 3ff6174f521..9e980523a01 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20230727", + "revision": "20230904", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2710,6 +2710,11 @@ "$ref": "ExfilResource" }, "type": "array" + }, + "totalExfiltratedBytes": { + "description": "Total exfiltrated bytes processed for the entire job.", + "format": "int64", + "type": "string" } }, "type": "object" @@ -3231,12 +3236,12 @@ "type": "array" }, "externalSystemUpdateTime": { - "description": "The most recent time when the corresponding finding's ticket/tracker was updated in the external system.", + "description": "The time when the case was last updated, as reported by the external system.", "format": "google-datetime", "type": "string" }, "externalUid": { - "description": "Identifier that's used to track the given finding in the external system.", + "description": "The identifier that's used to track the finding's corresponding case in the external system.", "type": "string" }, "name": { @@ -3244,7 +3249,7 @@ "type": "string" }, "status": { - "description": "Most recent status of the corresponding finding's ticket/tracker in the external system.", + "description": "The most recent status of the finding's corresponding case, as reported by the external system.", "type": "string" } }, @@ -4605,12 +4610,14 @@ "enum": [ "TIER_UNSPECIFIED", "STANDARD", - "PREMIUM" + "PREMIUM", + "ENTERPRISE" ], "enumDescriptions": [ "Default value. This value is unused.", "The standard tier.", - "The premium tier." + "The premium tier.", + "The enterprise tier." ], "type": "string" } diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 98d9cb0e68a..c17bd44a1e7 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/security-command-center // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // securitycenterService, err := securitycenter.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // securitycenterService, err := securitycenter.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // securitycenterService, err := securitycenter.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package securitycenter // import "google.golang.org/api/securitycenter/v1beta2" import ( @@ -1511,6 +1524,10 @@ type Exfiltration struct { // complete copy of the "joined" source data. Targets []*ExfilResource `json:"targets,omitempty"` + // TotalExfiltratedBytes: Total exfiltrated bytes processed for the + // entire job. + TotalExfiltratedBytes int64 `json:"totalExfiltratedBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Sources") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2278,12 +2295,12 @@ type GoogleCloudSecuritycenterV1ExternalSystem struct { // system. Assignees []string `json:"assignees,omitempty"` - // ExternalSystemUpdateTime: The most recent time when the corresponding - // finding's ticket/tracker was updated in the external system. + // ExternalSystemUpdateTime: The time when the case was last updated, as + // reported by the external system. ExternalSystemUpdateTime string `json:"externalSystemUpdateTime,omitempty"` - // ExternalUid: Identifier that's used to track the given finding in the - // external system. + // ExternalUid: The identifier that's used to track the finding's + // corresponding case in the external system. ExternalUid string `json:"externalUid,omitempty"` // Name: Full resource name of the external system, for example: @@ -2292,8 +2309,8 @@ type GoogleCloudSecuritycenterV1ExternalSystem struct { // "projects/1234/sources/5678/findings/123456/externalSystems/jira" Name string `json:"name,omitempty"` - // Status: Most recent status of the corresponding finding's - // ticket/tracker in the external system. + // Status: The most recent status of the finding's corresponding case, + // as reported by the external system. Status string `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "Assignees") to @@ -4189,6 +4206,7 @@ type Subscription struct { // "TIER_UNSPECIFIED" - Default value. This value is unused. // "STANDARD" - The standard tier. // "PREMIUM" - The premium tier. + // "ENTERPRISE" - The enterprise tier. Tier string `json:"tier,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index 2ceef7b483f..3f456a94a5d 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-consumer-management/docs/overview // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package serviceconsumermanagement // import "google.golang.org/api/serviceconsumermanagement/v1" import ( diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 217239b4975..38ac48c972b 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-consumer-management/docs/overview // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // serviceconsumermanagementService, err := serviceconsumermanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package serviceconsumermanagement // import "google.golang.org/api/serviceconsumermanagement/v1beta1" import ( diff --git a/servicecontrol/v1/servicecontrol-gen.go b/servicecontrol/v1/servicecontrol-gen.go index a669a89dced..61eb422fdf9 100644 --- a/servicecontrol/v1/servicecontrol-gen.go +++ b/servicecontrol/v1/servicecontrol-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-control/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // servicecontrolService, err := servicecontrol.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // servicecontrolService, err := servicecontrol.NewService(ctx, option.WithScopes(servicecontrol.ServicecontrolScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicecontrolService, err := servicecontrol.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicecontrolService, err := servicecontrol.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicecontrol // import "google.golang.org/api/servicecontrol/v1" import ( diff --git a/servicecontrol/v2/servicecontrol-gen.go b/servicecontrol/v2/servicecontrol-gen.go index 1f799c92340..14483c5eaaa 100644 --- a/servicecontrol/v2/servicecontrol-gen.go +++ b/servicecontrol/v2/servicecontrol-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-control/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // servicecontrolService, err := servicecontrol.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // servicecontrolService, err := servicecontrol.NewService(ctx, option.WithScopes(servicecontrol.ServicecontrolScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicecontrolService, err := servicecontrol.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicecontrolService, err := servicecontrol.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicecontrol // import "google.golang.org/api/servicecontrol/v2" import ( diff --git a/servicedirectory/v1/servicedirectory-gen.go b/servicedirectory/v1/servicedirectory-gen.go index 3a6b7729fbb..ee9b63b1876 100644 --- a/servicedirectory/v1/servicedirectory-gen.go +++ b/servicedirectory/v1/servicedirectory-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-directory // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // servicedirectoryService, err := servicedirectory.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicedirectoryService, err := servicedirectory.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicedirectoryService, err := servicedirectory.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicedirectory // import "google.golang.org/api/servicedirectory/v1" import ( diff --git a/servicedirectory/v1beta1/servicedirectory-gen.go b/servicedirectory/v1beta1/servicedirectory-gen.go index 40c31d63297..60b357c99ab 100644 --- a/servicedirectory/v1beta1/servicedirectory-gen.go +++ b/servicedirectory/v1beta1/servicedirectory-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-directory // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // servicedirectoryService, err := servicedirectory.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicedirectoryService, err := servicedirectory.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicedirectoryService, err := servicedirectory.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicedirectory // import "google.golang.org/api/servicedirectory/v1beta1" import ( diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index c3fb4e46eec..c0871bb1430 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-management/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // servicemanagementService, err := servicemanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // servicemanagementService, err := servicemanagement.NewService(ctx, option.WithScopes(servicemanagement.ServiceManagementReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicemanagementService, err := servicemanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicemanagementService, err := servicemanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicemanagement // import "google.golang.org/api/servicemanagement/v1" import ( diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index 7913761f1dd..e880de683c8 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // servicenetworkingService, err := servicenetworking.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithScopes(servicenetworking.ServiceManagementScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicenetworking // import "google.golang.org/api/servicenetworking/v1" import ( diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index 080d6535354..ee67325416b 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // servicenetworkingService, err := servicenetworking.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithScopes(servicenetworking.ServiceManagementScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // servicenetworkingService, err := servicenetworking.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package servicenetworking // import "google.golang.org/api/servicenetworking/v1beta" import ( diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index 73ce7aa7e69..a433a888623 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-usage/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // serviceusageService, err := serviceusage.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // serviceusageService, err := serviceusage.NewService(ctx, option.WithScopes(serviceusage.ServiceManagementScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // serviceusageService, err := serviceusage.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // serviceusageService, err := serviceusage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package serviceusage // import "google.golang.org/api/serviceusage/v1" import ( diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index 91ef0261c67..871479c18af 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/service-usage/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // serviceusageService, err := serviceusage.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // serviceusageService, err := serviceusage.NewService(ctx, option.WithScopes(serviceusage.ServiceManagementScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // serviceusageService, err := serviceusage.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // serviceusageService, err := serviceusage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package serviceusage // import "google.golang.org/api/serviceusage/v1beta1" import ( diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index 877e4d9bfe5..cf8c02c919c 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -870,7 +870,7 @@ } } }, - "revision": "20230808", + "revision": "20230829", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -1207,7 +1207,7 @@ "id": "BandedRange", "properties": { "bandedRangeId": { - "description": "The id of the banded range.", + "description": "The ID of the banded range.", "format": "int32", "type": "integer" }, @@ -1623,7 +1623,7 @@ "description": "Color of the series data point. If empty, the series default is used. If color is also set, this field takes precedence." }, "index": { - "description": "Zero based index of the series data point.", + "description": "The zero-based index of the series data point.", "format": "int32", "type": "integer" }, @@ -2036,7 +2036,7 @@ "id": "BigQueryDataSourceSpec", "properties": { "projectId": { - "description": "The ID of a BigQuery enabled GCP project with a billing account attached. For any queries executed against the data source, the project is charged.", + "description": "The ID of a BigQuery enabled Google Cloud project with a billing account attached. For any queries executed against the data source, the project is charged.", "type": "string" }, "querySpec": { @@ -2062,7 +2062,7 @@ "type": "object" }, "BigQueryTableSpec": { - "description": "Specifies a BigQuery table definition. Only [native tables](https://cloud.google.com/bigquery/docs/tables-intro) is allowed.", + "description": "Specifies a BigQuery table definition. Only [native tables](https://cloud.google.com/bigquery/docs/tables-intro) are allowed.", "id": "BigQueryTableSpec", "properties": { "datasetId": { @@ -2178,7 +2178,7 @@ }, "format": { "$ref": "CellFormat", - "description": "The format to apply. Conditional formatting can only apply a subset of formatting: bold, italic, strikethrough, foreground color \u0026 background color." + "description": "The format to apply. Conditional formatting can only apply a subset of formatting: bold, italic, strikethrough, foreground color and, background color." } }, "type": "object" @@ -3506,7 +3506,7 @@ "id": "DataSourceRefreshMonthlySchedule", "properties": { "daysOfMonth": { - "description": "Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to the 28th day. At lesat one day must be specified.", + "description": "Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to the 28th day. At least one day must be specified.", "items": { "format": "int32", "type": "integer" @@ -3521,7 +3521,7 @@ "type": "object" }, "DataSourceRefreshSchedule": { - "description": "Schedule for refreshing the data source. Data sources in the spreadsheet are refreshed within a time interval. You can specify the start time by clicking the Scheduled Refresh button in the Sheets editor, but the interval is fixed at 4 hours. For example, if you specify a start time of 8am , the refresh will take place between 8am and 12pm every day.", + "description": "Schedule for refreshing the data source. Data sources in the spreadsheet are refreshed within a time interval. You can specify the start time by clicking the Scheduled Refresh button in the Sheets editor, but the interval is fixed at 4 hours. For example, if you specify a start time of 8 AM , the refresh will take place between 8 AM and 12 PM every day.", "id": "DataSourceRefreshSchedule", "properties": { "dailySchedule": { @@ -4496,7 +4496,7 @@ "id": "FilterSpec", "properties": { "columnIndex": { - "description": "The column index.", + "description": "The zero-based column index.", "format": "int32", "type": "integer" }, @@ -5465,7 +5465,7 @@ "id": "PivotFilterSpec", "properties": { "columnOffsetIndex": { - "description": "The column offset of the source range.", + "description": "The zero-based column offset of the source range.", "format": "int32", "type": "integer" }, @@ -5832,7 +5832,7 @@ "type": "array" }, "warningOnly": { - "description": "True if this protected range will show a warning when editing. Warning-based protection means that every user can edit data in the protected range, except editing will prompt a warning asking the user to confirm the edit. When writing: if this field is true, then editors is ignored. Additionally, if this field is changed from true to false and the `editors` field is not set (nor included in the field mask), then the editors will be set to all the editors in the document.", + "description": "True if this protected range will show a warning when editing. Warning-based protection means that every user can edit data in the protected range, except editing will prompt a warning asking the user to confirm the edit. When writing: if this field is true, then editors are ignored. Additionally, if this field is changed from true to false and the `editors` field is not set (nor included in the field mask), then the editors will be set to all the editors in the document.", "type": "boolean" } }, @@ -6533,7 +6533,7 @@ "type": "boolean" }, "index": { - "description": "The index of the sheet within the spreadsheet. When adding or updating sheet properties, if this field is excluded then the sheet is added or moved to the end of the sheet list. When updating sheet indices or inserting sheets, movement is considered in \"before the move\" indexes. For example, if there were 3 sheets (S1, S2, S3) in order to move S1 ahead of S2 the index would have to be set to 2. A sheet index update request is ignored if the requested index is identical to the sheets current index or if the requested new index is equal to the current sheet index + 1.", + "description": "The index of the sheet within the spreadsheet. When adding or updating sheet properties, if this field is excluded then the sheet is added or moved to the end of the sheet list. When updating sheet indices or inserting sheets, movement is considered in \"before the move\" indexes. For example, if there were three sheets (S1, S2, S3) in order to move S1 ahead of S2 the index would have to be set to 2. A sheet index update request is ignored if the requested index is identical to the sheets current index or if the requested new index is equal to the current sheet index + 1.", "format": "int32", "type": "integer" }, @@ -6616,7 +6616,7 @@ "description": "The background color of the slicer. If background_color is also set, this field takes precedence." }, "columnIndex": { - "description": "The column index in the data table on which the filter is applied to.", + "description": "The zero-based column index in the data table on which the filter is applied to.", "format": "int32", "type": "integer" }, @@ -7758,7 +7758,7 @@ "type": "string" }, "subtotalIndex": { - "description": "The 0-based index of a data point within the series. If data_is_subtotal is true, the data point at this index is the subtotal. Otherwise, the subtotal appears after the data point with this index. A series can have multiple subtotals at arbitrary indices, but subtotals do not affect the indices of the data points. For example, if a series has three data points, their indices will always be 0, 1, and 2, regardless of how many subtotals exist on the series or what data points they are associated with.", + "description": "The zero-based index of a data point within the series. If data_is_subtotal is true, the data point at this index is the subtotal. Otherwise, the subtotal appears after the data point with this index. A series can have multiple subtotals at arbitrary indices, but subtotals do not affect the indices of the data points. For example, if a series has three data points, their indices will always be 0, 1, and 2, regardless of how many subtotals exist on the series or what data points they are associated with.", "format": "int32", "type": "integer" } diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index 271ae0da3cd..9847ec22ba7 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/sheets/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // sheetsService, err := sheets.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // sheetsService, err := sheets.NewService(ctx, option.WithScopes(sheets.SpreadsheetsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // sheetsService, err := sheets.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // sheetsService, err := sheets.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sheets // import "google.golang.org/api/sheets/v4" import ( @@ -984,7 +998,7 @@ func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) { // BandedRange: A banded (alternating colors) range in a sheet. type BandedRange struct { - // BandedRangeId: The id of the banded range. + // BandedRangeId: The ID of the banded range. BandedRangeId int64 `json:"bandedRangeId,omitempty"` // ColumnProperties: Properties for column bands. These properties are @@ -1533,7 +1547,7 @@ type BasicSeriesDataPointStyleOverride struct { // default is used. If color is also set, this field takes precedence. ColorStyle *ColorStyle `json:"colorStyle,omitempty"` - // Index: Zero based index of the series data point. + // Index: The zero-based index of the series data point. Index int64 `json:"index,omitempty"` // PointStyle: Point style of the series data point. Valid only if the @@ -2245,9 +2259,9 @@ func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) { // BigQueryDataSourceSpec: The specification of a BigQuery data source // that's connected to a sheet. type BigQueryDataSourceSpec struct { - // ProjectId: The ID of a BigQuery enabled GCP project with a billing - // account attached. For any queries executed against the data source, - // the project is charged. + // ProjectId: The ID of a BigQuery enabled Google Cloud project with a + // billing account attached. For any queries executed against the data + // source, the project is charged. ProjectId string `json:"projectId,omitempty"` // QuerySpec: A BigQueryQuerySpec. @@ -2308,7 +2322,7 @@ func (s *BigQueryQuerySpec) MarshalJSON() ([]byte, error) { } // BigQueryTableSpec: Specifies a BigQuery table definition. Only native -// tables (https://cloud.google.com/bigquery/docs/tables-intro) is +// tables (https://cloud.google.com/bigquery/docs/tables-intro) are // allowed. type BigQueryTableSpec struct { // DatasetId: The BigQuery dataset id. @@ -2504,8 +2518,8 @@ type BooleanRule struct { Condition *BooleanCondition `json:"condition,omitempty"` // Format: The format to apply. Conditional formatting can only apply a - // subset of formatting: bold, italic, strikethrough, foreground color & - // background color. + // subset of formatting: bold, italic, strikethrough, foreground color + // and, background color. Format *CellFormat `json:"format,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -4625,7 +4639,7 @@ func (s *DataSourceRefreshDailySchedule) MarshalJSON() ([]byte, error) { // refresh on specific days in the month in a given time interval. type DataSourceRefreshMonthlySchedule struct { // DaysOfMonth: Days of the month to refresh. Only 1-28 are supported, - // mapping to the 1st to the 28th day. At lesat one day must be + // mapping to the 1st to the 28th day. At least one day must be // specified. DaysOfMonth []int64 `json:"daysOfMonth,omitempty"` @@ -4661,8 +4675,8 @@ func (s *DataSourceRefreshMonthlySchedule) MarshalJSON() ([]byte, error) { // Data sources in the spreadsheet are refreshed within a time interval. // You can specify the start time by clicking the Scheduled Refresh // button in the Sheets editor, but the interval is fixed at 4 hours. -// For example, if you specify a start time of 8am , the refresh will -// take place between 8am and 12pm every day. +// For example, if you specify a start time of 8 AM , the refresh will +// take place between 8 AM and 12 PM every day. type DataSourceRefreshSchedule struct { // DailySchedule: Daily refresh schedule. DailySchedule *DataSourceRefreshDailySchedule `json:"dailySchedule,omitempty"` @@ -6369,7 +6383,7 @@ func (s *FilterCriteria) MarshalJSON() ([]byte, error) { // FilterSpec: The filter criteria associated with a specific column. type FilterSpec struct { - // ColumnIndex: The column index. + // ColumnIndex: The zero-based column index. ColumnIndex int64 `json:"columnIndex,omitempty"` // DataSourceColumnReference: Reference to a data source column. @@ -7984,7 +7998,7 @@ func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) { // PivotFilterSpec: The pivot table filter criteria associated with a // specific source column offset. type PivotFilterSpec struct { - // ColumnOffsetIndex: The column offset of the source range. + // ColumnOffsetIndex: The zero-based column offset of the source range. ColumnOffsetIndex int64 `json:"columnOffsetIndex,omitempty"` // DataSourceColumnReference: The reference to the data source column. @@ -8503,7 +8517,7 @@ type ProtectedRange struct { // editing. Warning-based protection means that every user can edit data // in the protected range, except editing will prompt a warning asking // the user to confirm the edit. When writing: if this field is true, - // then editors is ignored. Additionally, if this field is changed from + // then editors are ignored. Additionally, if this field is changed from // true to false and the `editors` field is not set (nor included in the // field mask), then the editors will be set to all the editors in the // document. @@ -9395,9 +9409,9 @@ type SheetProperties struct { // updating sheet properties, if this field is excluded then the sheet // is added or moved to the end of the sheet list. When updating sheet // indices or inserting sheets, movement is considered in "before the - // move" indexes. For example, if there were 3 sheets (S1, S2, S3) in - // order to move S1 ahead of S2 the index would have to be set to 2. A - // sheet index update request is ignored if the requested index is + // move" indexes. For example, if there were three sheets (S1, S2, S3) + // in order to move S1 ahead of S2 the index would have to be set to 2. + // A sheet index update request is ignored if the requested index is // identical to the sheets current index or if the requested new index // is equal to the current sheet index + 1. Index int64 `json:"index,omitempty"` @@ -9512,8 +9526,8 @@ type SlicerSpec struct { // background_color is also set, this field takes precedence. BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` - // ColumnIndex: The column index in the data table on which the filter - // is applied to. + // ColumnIndex: The zero-based column index in the data table on which + // the filter is applied to. ColumnIndex int64 `json:"columnIndex,omitempty"` // DataRange: The data range of the slicer. @@ -11440,10 +11454,10 @@ type WaterfallChartCustomSubtotal struct { // Label: A label for the subtotal column. Label string `json:"label,omitempty"` - // SubtotalIndex: The 0-based index of a data point within the series. - // If data_is_subtotal is true, the data point at this index is the - // subtotal. Otherwise, the subtotal appears after the data point with - // this index. A series can have multiple subtotals at arbitrary + // SubtotalIndex: The zero-based index of a data point within the + // series. If data_is_subtotal is true, the data point at this index is + // the subtotal. Otherwise, the subtotal appears after the data point + // with this index. A series can have multiple subtotals at arbitrary // indices, but subtotals do not affect the indices of the data points. // For example, if a series has three data points, their indices will // always be 0, 1, and 2, regardless of how many subtotals exist on the diff --git a/siteverification/v1/siteverification-gen.go b/siteverification/v1/siteverification-gen.go index a1eda0701fd..bc178027109 100644 --- a/siteverification/v1/siteverification-gen.go +++ b/siteverification/v1/siteverification-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/site-verification/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // siteverificationService, err := siteverification.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // siteverificationService, err := siteverification.NewService(ctx, option.WithScopes(siteverification.SiteverificationVerifyOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // siteverificationService, err := siteverification.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // siteverificationService, err := siteverification.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package siteverification // import "google.golang.org/api/siteverification/v1" import ( diff --git a/slides/v1/slides-gen.go b/slides/v1/slides-gen.go index afebbaeebd1..86b91281db7 100644 --- a/slides/v1/slides-gen.go +++ b/slides/v1/slides-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/slides/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // slidesService, err := slides.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // slidesService, err := slides.NewService(ctx, option.WithScopes(slides.SpreadsheetsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // slidesService, err := slides.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // slidesService, err := slides.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package slides // import "google.golang.org/api/slides/v1" import ( diff --git a/smartdevicemanagement/v1/smartdevicemanagement-gen.go b/smartdevicemanagement/v1/smartdevicemanagement-gen.go index e621ad7494a..015bc75ec81 100644 --- a/smartdevicemanagement/v1/smartdevicemanagement-gen.go +++ b/smartdevicemanagement/v1/smartdevicemanagement-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/nest/device-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // smartdevicemanagementService, err := smartdevicemanagement.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // smartdevicemanagementService, err := smartdevicemanagement.NewService(ctx, option.WithScopes(smartdevicemanagement.UserinfoEmailScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // smartdevicemanagementService, err := smartdevicemanagement.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // smartdevicemanagementService, err := smartdevicemanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package smartdevicemanagement // import "google.golang.org/api/smartdevicemanagement/v1" import ( diff --git a/sourcerepo/v1/sourcerepo-gen.go b/sourcerepo/v1/sourcerepo-gen.go index c90af88e58b..71a93372bec 100644 --- a/sourcerepo/v1/sourcerepo-gen.go +++ b/sourcerepo/v1/sourcerepo-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/source-repositories/docs/apis // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // sourcerepoService, err := sourcerepo.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // sourcerepoService, err := sourcerepo.NewService(ctx, option.WithScopes(sourcerepo.SourceReadWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // sourcerepoService, err := sourcerepo.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // sourcerepoService, err := sourcerepo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sourcerepo // import "google.golang.org/api/sourcerepo/v1" import ( diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 9e240ee3ea0..641f4c24b82 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20230720", + "revision": "20230823", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -4349,7 +4349,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", "type": "object" } }, @@ -4602,7 +4602,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index a90bae84ad9..c60ed6d1dff 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/spanner/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // spannerService, err := spanner.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // spannerService, err := spanner.NewService(ctx, option.WithScopes(spanner.SpannerDataScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // spannerService, err := spanner.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // spannerService, err := spanner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package spanner // import "google.golang.org/api/spanner/v1" import ( @@ -3557,8 +3571,8 @@ type Operation struct { // `operations/{unique_id}`. Name string `json:"name,omitempty"` - // Response: The normal response of the operation in case of success. If - // the original method returns no data on success, such as `Delete`, the + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the // response is `google.protobuf.Empty`. If the original method is // standard `Get`/`Create`/`Update`, the response should be the // resource. For other methods, the response should have the type @@ -4075,7 +4089,7 @@ func (s *PlanNode) MarshalJSON() ([]byte, error) { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -4084,17 +4098,17 @@ func (s *PlanNode) MarshalJSON() ([]byte, error) { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and diff --git a/speech/v1/speech-gen.go b/speech/v1/speech-gen.go index 80b5c7d0050..1a915cf15bb 100644 --- a/speech/v1/speech-gen.go +++ b/speech/v1/speech-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/speech-to-text/docs/quickstart-protocol // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // speechService, err := speech.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // speechService, err := speech.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // speechService, err := speech.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package speech // import "google.golang.org/api/speech/v1" import ( diff --git a/speech/v1p1beta1/speech-gen.go b/speech/v1p1beta1/speech-gen.go index 7f2bbaf1fc9..5ea6bbf7097 100644 --- a/speech/v1p1beta1/speech-gen.go +++ b/speech/v1p1beta1/speech-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/speech-to-text/docs/quickstart-protocol // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // speechService, err := speech.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // speechService, err := speech.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // speechService, err := speech.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package speech // import "google.golang.org/api/speech/v1p1beta1" import ( diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index f9d4317e547..c10394e2d18 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/cloud-sql/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // sqladminService, err := sqladmin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sqladmin // import "google.golang.org/api/sqladmin/v1" import ( diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 3f0b2bd6d80..f185f4d00b4 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/cloud-sql/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // sqladminService, err := sqladmin.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sqladmin // import "google.golang.org/api/sqladmin/v1beta4" import ( diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index 69a6e41e7cc..a3f6591497a 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://developers.google.com/storage/docs/json_api/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // storageService, err := storage.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // storageService, err := storage.NewService(ctx, option.WithScopes(storage.DevstorageReadWriteScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // storageService, err := storage.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // storageService, err := storage.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package storage // import "google.golang.org/api/storage/v1" import ( diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index ee2359b6c7b..ec974052250 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -632,7 +632,7 @@ } } }, - "revision": "20230807", + "revision": "20230831", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -725,6 +725,10 @@ "description": "Required. S3 Bucket name (see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).", "type": "string" }, + "cloudfrontDomain": { + "description": "Optional. Cloudfront domain name pointing to this bucket (as origin), to use when fetching. Format: `https://{id}.cloudfront.net` or any valid custom domain `https://...`", + "type": "string" + }, "credentialsSecret": { "description": "Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { \"sas_token\" : \"SAS_TOKEN\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number}/secrets/{secret_name}`", "type": "string" diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index 6004232c584..48073655a86 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/storage-transfer/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // storagetransferService, err := storagetransfer.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // storagetransferService, err := storagetransfer.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // storagetransferService, err := storagetransfer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package storagetransfer // import "google.golang.org/api/storagetransfer/v1" import ( @@ -345,6 +358,12 @@ type AwsS3Data struct { // (https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). BucketName string `json:"bucketName,omitempty"` + // CloudfrontDomain: Optional. Cloudfront domain name pointing to this + // bucket (as origin), to use when fetching. Format: + // `https://{id}.cloudfront.net` or any valid custom domain + // `https://...` + CloudfrontDomain string `json:"cloudfrontDomain,omitempty"` + // CredentialsSecret: Optional. The Resource name of a secret in Secret // Manager. The Azure SAS token must be stored in Secret Manager in JSON // format: { "sas_token" : "SAS_TOKEN" } GoogleServiceAccount must be diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index 75c4c9f2d8b..d5255b6def2 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/streetview/publish/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // streetviewpublishService, err := streetviewpublish.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // streetviewpublishService, err := streetviewpublish.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // streetviewpublishService, err := streetviewpublish.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package streetviewpublish // import "google.golang.org/api/streetviewpublish/v1" import ( diff --git a/sts/v1/sts-gen.go b/sts/v1/sts-gen.go index 767273f05df..15c1a3f63e9 100644 --- a/sts/v1/sts-gen.go +++ b/sts/v1/sts-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: http://cloud.google.com/iam/docs/workload-identity-federation // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // stsService, err := sts.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // stsService, err := sts.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // stsService, err := sts.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sts // import "google.golang.org/api/sts/v1" import ( diff --git a/sts/v1beta/sts-gen.go b/sts/v1beta/sts-gen.go index 3299947cf78..c15610fcc4f 100644 --- a/sts/v1beta/sts-gen.go +++ b/sts/v1beta/sts-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: http://cloud.google.com/iam/docs/workload-identity-federation // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // stsService, err := sts.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // stsService, err := sts.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // stsService, err := sts.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package sts // import "google.golang.org/api/sts/v1beta" import ( diff --git a/tagmanager/v1/tagmanager-gen.go b/tagmanager/v1/tagmanager-gen.go index 08d701373d6..2fa1aea8fac 100644 --- a/tagmanager/v1/tagmanager-gen.go +++ b/tagmanager/v1/tagmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/tag-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // tagmanagerService, err := tagmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // tagmanagerService, err := tagmanager.NewService(ctx, option.WithScopes(tagmanager.TagmanagerReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tagmanagerService, err := tagmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tagmanagerService, err := tagmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tagmanager // import "google.golang.org/api/tagmanager/v1" import ( diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index 616ceb2416b..b3b2021c464 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -2451,7 +2451,7 @@ ] }, "move_entities_to_folder": { - "description": "Moves entities to a GTM Folder.", + "description": "Moves entities to a GTM Folder. If {folder_id} in the request path equals 0, this will instead move entities out of the folder they currently belong to.", "flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}:move_entities_to_folder", "httpMethod": "POST", "id": "tagmanager.accounts.containers.workspaces.folders.move_entities_to_folder", @@ -3890,7 +3890,7 @@ } } }, - "revision": "20230807", + "revision": "20230906", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { @@ -5527,7 +5527,7 @@ "id": "Parameter", "properties": { "isWeakReference": { - "description": "Whether or not a reference type parameter is strongly or weakly referenced. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", + "description": "Whether or not a reference type parameter is strongly or weakly referenced. Only used by Transformations. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", "type": "boolean" }, "key": { diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index 090a02653fb..6c26751d38c 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/tag-manager // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // tagmanagerService, err := tagmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // tagmanagerService, err := tagmanager.NewService(ctx, option.WithScopes(tagmanager.TagmanagerReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tagmanagerService, err := tagmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tagmanagerService, err := tagmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tagmanager // import "google.golang.org/api/tagmanager/v2" import ( @@ -2525,7 +2539,7 @@ func (s *MergeConflict) MarshalJSON() ([]byte, error) { // Parameter: Represents a Google Tag Manager Parameter. type Parameter struct { // IsWeakReference: Whether or not a reference type parameter is - // strongly or weakly referenced. @mutable + // strongly or weakly referenced. Only used by Transformations. @mutable // tagmanager.accounts.containers.workspaces.transformations.create // @mutable // tagmanager.accounts.containers.workspaces.transformations.update @@ -13406,7 +13420,9 @@ type AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall struct { header_ http.Header } -// MoveEntitiesToFolder: Moves entities to a GTM Folder. +// MoveEntitiesToFolder: Moves entities to a GTM Folder. If {folder_id} +// in the request path equals 0, this will instead move entities out of +// the folder they currently belong to. // // - path: GTM Folder's API relative path. Example: // accounts/{account_id}/containers/{container_id}/workspaces/{workspac @@ -13505,7 +13521,7 @@ func (c *AccountsContainersWorkspacesFoldersMoveEntitiesToFolderCall) Do(opts .. } return nil // { - // "description": "Moves entities to a GTM Folder.", + // "description": "Moves entities to a GTM Folder. If {folder_id} in the request path equals 0, this will instead move entities out of the folder they currently belong to.", // "flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}:move_entities_to_folder", // "httpMethod": "POST", // "id": "tagmanager.accounts.containers.workspaces.folders.move_entities_to_folder", diff --git a/tasks/v1/tasks-gen.go b/tasks/v1/tasks-gen.go index 523ac6f491a..a1ab3ae394c 100644 --- a/tasks/v1/tasks-gen.go +++ b/tasks/v1/tasks-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/tasks/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // tasksService, err := tasks.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // tasksService, err := tasks.NewService(ctx, option.WithScopes(tasks.TasksReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tasksService, err := tasks.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tasksService, err := tasks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tasks // import "google.golang.org/api/tasks/v1" import ( diff --git a/testing/v1/testing-api.json b/testing/v1/testing-api.json index c301df7afd0..162d62b595f 100644 --- a/testing/v1/testing-api.json +++ b/testing/v1/testing-api.json @@ -130,6 +130,166 @@ }, "projects": { "resources": { + "deviceSessions": { + "methods": { + "cancel": { + "description": "POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel Changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.", + "flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}:cancel", + "httpMethod": "POST", + "id": "testing.projects.deviceSessions.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + "location": "path", + "pattern": "^projects/[^/]+/deviceSessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelDeviceSessionRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "POST /v1/projects/{project_id}/deviceSessions", + "flatPath": "v1/projects/{projectsId}/deviceSessions", + "httpMethod": "POST", + "id": "testing.projects.deviceSessions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The Compute Engine project under which this device will be allocated. \"projects/{project_id}\"", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/deviceSessions", + "request": { + "$ref": "DeviceSession" + }, + "response": { + "$ref": "DeviceSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.", + "flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}", + "httpMethod": "GET", + "id": "testing.projects.deviceSessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + "location": "path", + "pattern": "^projects/[^/]+/deviceSessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "DeviceSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.", + "flatPath": "v1/projects/{projectsId}/deviceSessions", + "httpMethod": "GET", + "id": "testing.projects.deviceSessions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. If specified, responses will be filtered by the given filter. Allowed fields are: session_state.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of DeviceSessions to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A continuation token for paging.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent to request, e.g. \"projects/{project_id}\"", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/deviceSessions", + "response": { + "$ref": "ListDeviceSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask.", + "flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}", + "httpMethod": "PATCH", + "id": "testing.projects.deviceSessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Optional. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + "location": "path", + "pattern": "^projects/[^/]+/deviceSessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "DeviceSession" + }, + "response": { + "$ref": "DeviceSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "testMatrices": { "methods": { "cancel": { @@ -282,7 +442,7 @@ } } }, - "revision": "20230815", + "revision": "20230905", "rootUrl": "https://testing.googleapis.com/", "schemas": { "Account": { @@ -829,6 +989,12 @@ }, "type": "object" }, + "CancelDeviceSessionRequest": { + "description": "The request object for cancelling a Device Session.", + "id": "CancelDeviceSessionRequest", + "properties": {}, + "type": "object" + }, "CancelTestMatrixResponse": { "description": "Response containing the current state of the specified test matrix.", "id": "CancelTestMatrixResponse", @@ -981,6 +1147,107 @@ }, "type": "object" }, + "DeviceSession": { + "description": "Protobuf message describing the device message, used from several RPCs.", + "id": "DeviceSession", + "properties": { + "activeStartTime": { + "description": "Output only. The timestamp that the session first became ACTIVE.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "androidDevice": { + "$ref": "AndroidDevice", + "description": "Required. The requested device" + }, + "androidDeviceList": { + "$ref": "AndroidDeviceList", + "deprecated": true, + "description": "Optional. The list of requested devices. At most two devices may be simultaneously requested." + }, + "createTime": { + "description": "Output only. The time that the Session was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. The title of the DeviceSession to be presented in the UI.", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.", + "format": "google-datetime", + "type": "string" + }, + "inactivityTimeout": { + "description": "Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Optional. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + "type": "string" + }, + "state": { + "description": "Output only. Current state of the DeviceSession.", + "enum": [ + "SESSION_STATE_UNSPECIFIED", + "REQUESTED", + "PENDING", + "ACTIVE", + "EXPIRED", + "FINISHED", + "UNAVAILABLE", + "ERROR" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Initial state of a session request. The session is being validated for correctness and a device is not yet requested.", + "The session has been validated and is in the queue for a device.", + "The session has been granted and the device is accepting connections.", + "The session duration exceeded the device’s reservation time period and timed out automatically.", + "The user is finished with the session and it was canceled by the user while the request was still getting allocated or after allocation and during device usage period.", + "Unable to complete the session because the device was unavailable and it failed to allocate through the scheduler. For example, a device not in the catalog was requested or the request expired in the allocation queue.", + "Unable to complete the session for an internal reason, such as an infrastructure failure." + ], + "readOnly": true, + "type": "string" + }, + "stateHistories": { + "description": "Output only. The historical state transitions of the session_state message including the current session state.", + "items": { + "$ref": "SessionStateEvent" + }, + "readOnly": true, + "type": "array" + }, + "ttl": { + "description": "Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the ExtendDeviceSession RPC. Default: 3 hours.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "DirectAccessVersionInfo": { + "description": "Denotes whether Direct Access is supported, and by which client versions. DirectAccessService is currently available as a preview to select developers. You can register today on behalf of you and your team at https://developer.android.com/studio/preview/android-device-streaming", + "id": "DirectAccessVersionInfo", + "properties": { + "directAccessSupported": { + "description": "Whether direct access is supported at all. Clients are expected to filter down the device list to only android models and versions which support Direct Access when that is the user intent.", + "type": "boolean" + }, + "minimumAndroidStudioVersion": { + "description": "Output only. Indicates client-device compatibility, where a device is known to work only with certain workarounds implemented in the Android Studio client. Expected format \"major.minor.micro.patch\", e.g. \"5921.22.2211.8881706\".", + "type": "string" + } + }, + "type": "object" + }, "Distribution": { "description": "Data about the relative number of devices running a given configuration of the Android platform.", "id": "Distribution", @@ -998,6 +1265,12 @@ }, "type": "object" }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, "Environment": { "description": "The environment in which the test is run.", "id": "Environment", @@ -1436,6 +1709,24 @@ "properties": {}, "type": "object" }, + "ListDeviceSessionsResponse": { + "description": "A list of device sessions.", + "id": "ListDeviceSessionsResponse", + "properties": { + "deviceSessions": { + "description": "The sessions matching the specified filter in the given cloud project.", + "items": { + "$ref": "DeviceSession" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, "Locale": { "description": "A location/region designation for language.", "id": "Locale", @@ -1586,6 +1877,11 @@ ], "type": "string" }, + "directAccessVersionInfo": { + "$ref": "DirectAccessVersionInfo", + "description": "Output only. Identifies supported clients for DirectAccess for this Android version.", + "readOnly": true + }, "versionId": { "description": "An Android version.", "type": "string" @@ -1749,6 +2045,49 @@ }, "type": "object" }, + "SessionStateEvent": { + "description": "A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.", + "id": "SessionStateEvent", + "properties": { + "eventTime": { + "description": "Output only. The time that the session_state first encountered that state.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "sessionState": { + "description": "Output only. The session_state tracked by this event", + "enum": [ + "SESSION_STATE_UNSPECIFIED", + "REQUESTED", + "PENDING", + "ACTIVE", + "EXPIRED", + "FINISHED", + "UNAVAILABLE", + "ERROR" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Initial state of a session request. The session is being validated for correctness and a device is not yet requested.", + "The session has been validated and is in the queue for a device.", + "The session has been granted and the device is accepting connections.", + "The session duration exceeded the device’s reservation time period and timed out automatically.", + "The user is finished with the session and it was canceled by the user while the request was still getting allocated or after allocation and during device usage period.", + "Unable to complete the session because the device was unavailable and it failed to allocate through the scheduler. For example, a device not in the catalog was requested or the request expired in the allocation queue.", + "Unable to complete the session for an internal reason, such as an infrastructure failure." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. A human-readable message to explain the state.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Shard": { "description": "Output only. Details about the shard.", "id": "Shard", @@ -2199,7 +2538,7 @@ "description": "The device will be logged in on this account for the duration of the test." }, "additionalApks": { - "description": "APKs to install in addition to those being directly tested. Currently capped at 100.", + "description": "APKs to install in addition to those being directly tested. These will be installed after the app under test. Currently capped at 100.", "items": { "$ref": "Apk" }, diff --git a/testing/v1/testing-gen.go b/testing/v1/testing-gen.go index 0908481c07d..b3f74a70972 100644 --- a/testing/v1/testing-gen.go +++ b/testing/v1/testing-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/cloud-test-lab/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // testingService, err := testing.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // testingService, err := testing.NewService(ctx, option.WithScopes(testing.CloudPlatformReadOnlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // testingService, err := testing.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // testingService, err := testing.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package testing // import "google.golang.org/api/testing/v1" import ( @@ -164,6 +178,7 @@ type ApplicationDetailServiceService struct { func NewProjectsService(s *APIService) *ProjectsService { rs := &ProjectsService{s: s} + rs.DeviceSessions = NewProjectsDeviceSessionsService(s) rs.TestMatrices = NewProjectsTestMatricesService(s) return rs } @@ -171,9 +186,20 @@ func NewProjectsService(s *APIService) *ProjectsService { type ProjectsService struct { s *APIService + DeviceSessions *ProjectsDeviceSessionsService + TestMatrices *ProjectsTestMatricesService } +func NewProjectsDeviceSessionsService(s *APIService) *ProjectsDeviceSessionsService { + rs := &ProjectsDeviceSessionsService{s: s} + return rs +} + +type ProjectsDeviceSessionsService struct { + s *APIService +} + func NewProjectsTestMatricesService(s *APIService) *ProjectsTestMatricesService { rs := &ProjectsTestMatricesService{s: s} return rs @@ -936,6 +962,11 @@ func (s *AppBundle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CancelDeviceSessionRequest: The request object for cancelling a +// Device Session. +type CancelDeviceSessionRequest struct { +} + // CancelTestMatrixResponse: Response containing the current state of // the specified test matrix. type CancelTestMatrixResponse struct { @@ -1213,6 +1244,144 @@ func (s *DeviceIpBlockCatalog) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceSession: Protobuf message describing the device message, used +// from several RPCs. +type DeviceSession struct { + // ActiveStartTime: Output only. The timestamp that the session first + // became ACTIVE. + ActiveStartTime string `json:"activeStartTime,omitempty"` + + // AndroidDevice: Required. The requested device + AndroidDevice *AndroidDevice `json:"androidDevice,omitempty"` + + // AndroidDeviceList: Optional. The list of requested devices. At most + // two devices may be simultaneously requested. + AndroidDeviceList *AndroidDeviceList `json:"androidDeviceList,omitempty"` + + // CreateTime: Output only. The time that the Session was created. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Output only. The title of the DeviceSession to be + // presented in the UI. + DisplayName string `json:"displayName,omitempty"` + + // ExpireTime: Optional. If the device is still in use at this time, any + // connections will be ended and the SessionState will transition from + // ACTIVE to FINISHED. + ExpireTime string `json:"expireTime,omitempty"` + + // InactivityTimeout: Output only. The interval of time that this device + // must be interacted with before it transitions from ACTIVE to + // TIMEOUT_INACTIVITY. + InactivityTimeout string `json:"inactivityTimeout,omitempty"` + + // Name: Optional. Name of the DeviceSession, e.g. + // "projects/{project_id}/deviceSessions/{session_id}" + Name string `json:"name,omitempty"` + + // State: Output only. Current state of the DeviceSession. + // + // Possible values: + // "SESSION_STATE_UNSPECIFIED" - Default value. This value is unused. + // "REQUESTED" - Initial state of a session request. The session is + // being validated for correctness and a device is not yet requested. + // "PENDING" - The session has been validated and is in the queue for + // a device. + // "ACTIVE" - The session has been granted and the device is accepting + // connections. + // "EXPIRED" - The session duration exceeded the device’s + // reservation time period and timed out automatically. + // "FINISHED" - The user is finished with the session and it was + // canceled by the user while the request was still getting allocated or + // after allocation and during device usage period. + // "UNAVAILABLE" - Unable to complete the session because the device + // was unavailable and it failed to allocate through the scheduler. For + // example, a device not in the catalog was requested or the request + // expired in the allocation queue. + // "ERROR" - Unable to complete the session for an internal reason, + // such as an infrastructure failure. + State string `json:"state,omitempty"` + + // StateHistories: Output only. The historical state transitions of the + // session_state message including the current session state. + StateHistories []*SessionStateEvent `json:"stateHistories,omitempty"` + + // Ttl: Optional. The amount of time that a device will be initially + // allocated for. This can eventually be extended with the + // ExtendDeviceSession RPC. Default: 3 hours. + Ttl string `json:"ttl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ActiveStartTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActiveStartTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceSession) MarshalJSON() ([]byte, error) { + type NoMethod DeviceSession + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DirectAccessVersionInfo: Denotes whether Direct Access is supported, +// and by which client versions. DirectAccessService is currently +// available as a preview to select developers. You can register today +// on behalf of you and your team at +// https://developer.android.com/studio/preview/android-device-streaming +type DirectAccessVersionInfo struct { + // DirectAccessSupported: Whether direct access is supported at all. + // Clients are expected to filter down the device list to only android + // models and versions which support Direct Access when that is the user + // intent. + DirectAccessSupported bool `json:"directAccessSupported,omitempty"` + + // MinimumAndroidStudioVersion: Output only. Indicates client-device + // compatibility, where a device is known to work only with certain + // workarounds implemented in the Android Studio client. Expected format + // "major.minor.micro.patch", e.g. "5921.22.2211.8881706". + MinimumAndroidStudioVersion string `json:"minimumAndroidStudioVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DirectAccessSupported") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DirectAccessSupported") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DirectAccessVersionInfo) MarshalJSON() ([]byte, error) { + type NoMethod DirectAccessVersionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Distribution: Data about the relative number of devices running a // given configuration of the Android platform. type Distribution struct { @@ -1261,6 +1430,17 @@ func (s *Distribution) UnmarshalJSON(data []byte) error { return nil } +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + // Environment: The environment in which the test is run. type Environment struct { // AndroidDevice: An Android device which must be used with an Android @@ -1982,6 +2162,45 @@ func (s *IosXcTest) MarshalJSON() ([]byte, error) { type LauncherActivityIntent struct { } +// ListDeviceSessionsResponse: A list of device sessions. +type ListDeviceSessionsResponse struct { + // DeviceSessions: The sessions matching the specified filter in the + // given cloud project. + DeviceSessions []*DeviceSession `json:"deviceSessions,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceSessions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceSessions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDeviceSessionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Locale: A location/region designation for language. type Locale struct { // Id: The id for this locale. Example: "en_US". @@ -2259,6 +2478,10 @@ type PerAndroidVersionInfo struct { // as deprecated, this state is very likely permanent. DeviceCapacity string `json:"deviceCapacity,omitempty"` + // DirectAccessVersionInfo: Output only. Identifies supported clients + // for DirectAccess for this Android version. + DirectAccessVersionInfo *DirectAccessVersionInfo `json:"directAccessVersionInfo,omitempty"` + // VersionId: An Android version. VersionId string `json:"versionId,omitempty"` @@ -2596,6 +2819,63 @@ func (s *Service) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SessionStateEvent: A message encapsulating a series of Session states +// and the time that the DeviceSession first entered those states. +type SessionStateEvent struct { + // EventTime: Output only. The time that the session_state first + // encountered that state. + EventTime string `json:"eventTime,omitempty"` + + // SessionState: Output only. The session_state tracked by this event + // + // Possible values: + // "SESSION_STATE_UNSPECIFIED" - Default value. This value is unused. + // "REQUESTED" - Initial state of a session request. The session is + // being validated for correctness and a device is not yet requested. + // "PENDING" - The session has been validated and is in the queue for + // a device. + // "ACTIVE" - The session has been granted and the device is accepting + // connections. + // "EXPIRED" - The session duration exceeded the device’s + // reservation time period and timed out automatically. + // "FINISHED" - The user is finished with the session and it was + // canceled by the user while the request was still getting allocated or + // after allocation and during device usage period. + // "UNAVAILABLE" - Unable to complete the session because the device + // was unavailable and it failed to allocate through the scheduler. For + // example, a device not in the catalog was requested or the request + // expired in the allocation queue. + // "ERROR" - Unable to complete the session for an internal reason, + // such as an infrastructure failure. + SessionState string `json:"sessionState,omitempty"` + + // StateMessage: Output only. A human-readable message to explain the + // state. + StateMessage string `json:"stateMessage,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EventTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EventTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SessionStateEvent) MarshalJSON() ([]byte, error) { + type NoMethod SessionStateEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Shard: Output only. Details about the shard. type Shard struct { // EstimatedShardDuration: Output only. The estimated shard duration @@ -3194,7 +3474,8 @@ type TestSetup struct { Account *Account `json:"account,omitempty"` // AdditionalApks: APKs to install in addition to those being directly - // tested. Currently capped at 100. + // tested. These will be installed after the app under test. Currently + // capped at 100. AdditionalApks []*Apk `json:"additionalApks,omitempty"` // DirectoriesToPull: List of directories on the device to upload to GCS @@ -3745,6 +4026,813 @@ func (c *ApplicationDetailServiceGetApkDetailsCall) Do(opts ...googleapi.CallOpt } +// method id "testing.projects.deviceSessions.cancel": + +type ProjectsDeviceSessionsCancelCall struct { + s *APIService + name string + canceldevicesessionrequest *CancelDeviceSessionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: POST +// /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel +// Changes the DeviceSession to state FINISHED and terminates all +// connections. Canceled sessions are not deleted and can be retrieved +// or listed by the user until they expire based on the 28 day deletion +// policy. +// +// - name: Name of the DeviceSession, e.g. +// "projects/{project_id}/deviceSessions/{session_id}". +func (r *ProjectsDeviceSessionsService) Cancel(name string, canceldevicesessionrequest *CancelDeviceSessionRequest) *ProjectsDeviceSessionsCancelCall { + c := &ProjectsDeviceSessionsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceldevicesessionrequest = canceldevicesessionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDeviceSessionsCancelCall) Fields(s ...googleapi.Field) *ProjectsDeviceSessionsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDeviceSessionsCancelCall) Context(ctx context.Context) *ProjectsDeviceSessionsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDeviceSessionsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDeviceSessionsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceldevicesessionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.deviceSessions.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsDeviceSessionsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel Changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.", + // "flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}:cancel", + // "httpMethod": "POST", + // "id": "testing.projects.deviceSessions.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/deviceSessions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelDeviceSessionRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "testing.projects.deviceSessions.create": + +type ProjectsDeviceSessionsCreateCall struct { + s *APIService + parent string + devicesession *DeviceSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: POST /v1/projects/{project_id}/deviceSessions +// +// - parent: The Compute Engine project under which this device will be +// allocated. "projects/{project_id}". +func (r *ProjectsDeviceSessionsService) Create(parent string, devicesession *DeviceSession) *ProjectsDeviceSessionsCreateCall { + c := &ProjectsDeviceSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.devicesession = devicesession + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDeviceSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsDeviceSessionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDeviceSessionsCreateCall) Context(ctx context.Context) *ProjectsDeviceSessionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDeviceSessionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDeviceSessionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.devicesession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deviceSessions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.deviceSessions.create" call. +// Exactly one of *DeviceSession or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceSession.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDeviceSessionsCreateCall) Do(opts ...googleapi.CallOption) (*DeviceSession, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DeviceSession{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "POST /v1/projects/{project_id}/deviceSessions", + // "flatPath": "v1/projects/{projectsId}/deviceSessions", + // "httpMethod": "POST", + // "id": "testing.projects.deviceSessions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The Compute Engine project under which this device will be allocated. \"projects/{project_id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/deviceSessions", + // "request": { + // "$ref": "DeviceSession" + // }, + // "response": { + // "$ref": "DeviceSession" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "testing.projects.deviceSessions.get": + +type ProjectsDeviceSessionsGetCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: GET /v1/projects/{project_id}/deviceSessions/{device_session_id} +// Return a DeviceSession, which documents the allocation status and +// whether the device is allocated. Clients making requests from this +// API must poll GetDeviceSession. +// +// - name: Name of the DeviceSession, e.g. +// "projects/{project_id}/deviceSessions/{session_id}". +func (r *ProjectsDeviceSessionsService) Get(name string) *ProjectsDeviceSessionsGetCall { + c := &ProjectsDeviceSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDeviceSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsDeviceSessionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDeviceSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsDeviceSessionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDeviceSessionsGetCall) Context(ctx context.Context) *ProjectsDeviceSessionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDeviceSessionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDeviceSessionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.deviceSessions.get" call. +// Exactly one of *DeviceSession or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceSession.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDeviceSessionsGetCall) Do(opts ...googleapi.CallOption) (*DeviceSession, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DeviceSession{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.", + // "flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}", + // "httpMethod": "GET", + // "id": "testing.projects.deviceSessions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/deviceSessions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DeviceSession" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "testing.projects.deviceSessions.list": + +type ProjectsDeviceSessionsListCall struct { + s *APIService + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: GET /v1/projects/{project_id}/deviceSessions Lists device +// Sessions owned by the project user. +// +// - parent: The name of the parent to request, e.g. +// "projects/{project_id}". +func (r *ProjectsDeviceSessionsService) List(parent string) *ProjectsDeviceSessionsListCall { + c := &ProjectsDeviceSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": If specified, responses +// will be filtered by the given filter. Allowed fields are: +// session_state. +func (c *ProjectsDeviceSessionsListCall) Filter(filter string) *ProjectsDeviceSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of DeviceSessions to return. +func (c *ProjectsDeviceSessionsListCall) PageSize(pageSize int64) *ProjectsDeviceSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A continuation +// token for paging. +func (c *ProjectsDeviceSessionsListCall) PageToken(pageToken string) *ProjectsDeviceSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDeviceSessionsListCall) Fields(s ...googleapi.Field) *ProjectsDeviceSessionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDeviceSessionsListCall) IfNoneMatch(entityTag string) *ProjectsDeviceSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDeviceSessionsListCall) Context(ctx context.Context) *ProjectsDeviceSessionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDeviceSessionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDeviceSessionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deviceSessions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.deviceSessions.list" call. +// Exactly one of *ListDeviceSessionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListDeviceSessionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDeviceSessionsListCall) Do(opts ...googleapi.CallOption) (*ListDeviceSessionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListDeviceSessionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.", + // "flatPath": "v1/projects/{projectsId}/deviceSessions", + // "httpMethod": "GET", + // "id": "testing.projects.deviceSessions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. If specified, responses will be filtered by the given filter. Allowed fields are: session_state.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of DeviceSessions to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A continuation token for paging.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The name of the parent to request, e.g. \"projects/{project_id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/deviceSessions", + // "response": { + // "$ref": "ListDeviceSessionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDeviceSessionsListCall) Pages(ctx context.Context, f func(*ListDeviceSessionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "testing.projects.deviceSessions.patch": + +type ProjectsDeviceSessionsPatchCall struct { + s *APIService + name string + devicesession *DeviceSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: PATCH +// /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceS +// ession Updates the current device session to the fields described by +// the update_mask. +// +// - name: Optional. Name of the DeviceSession, e.g. +// "projects/{project_id}/deviceSessions/{session_id}". +func (r *ProjectsDeviceSessionsService) Patch(name string, devicesession *DeviceSession) *ProjectsDeviceSessionsPatchCall { + c := &ProjectsDeviceSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.devicesession = devicesession + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The +// list of fields to update. +func (c *ProjectsDeviceSessionsPatchCall) UpdateMask(updateMask string) *ProjectsDeviceSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsDeviceSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsDeviceSessionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsDeviceSessionsPatchCall) Context(ctx context.Context) *ProjectsDeviceSessionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsDeviceSessionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsDeviceSessionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.devicesession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "testing.projects.deviceSessions.patch" call. +// Exactly one of *DeviceSession or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceSession.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDeviceSessionsPatchCall) Do(opts ...googleapi.CallOption) (*DeviceSession, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &DeviceSession{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask.", + // "flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}", + // "httpMethod": "PATCH", + // "id": "testing.projects.deviceSessions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Optional. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/deviceSessions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. The list of fields to update.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "DeviceSession" + // }, + // "response": { + // "$ref": "DeviceSession" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "testing.projects.testMatrices.cancel": type ProjectsTestMatricesCancelCall struct { diff --git a/texttospeech/v1/texttospeech-gen.go b/texttospeech/v1/texttospeech-gen.go index 8de2acd89c3..f4c1a4be598 100644 --- a/texttospeech/v1/texttospeech-gen.go +++ b/texttospeech/v1/texttospeech-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/text-to-speech/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // texttospeechService, err := texttospeech.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // texttospeechService, err := texttospeech.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // texttospeechService, err := texttospeech.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package texttospeech // import "google.golang.org/api/texttospeech/v1" import ( diff --git a/texttospeech/v1beta1/texttospeech-gen.go b/texttospeech/v1beta1/texttospeech-gen.go index 29a9fb32e1b..0ee07cbc3da 100644 --- a/texttospeech/v1beta1/texttospeech-gen.go +++ b/texttospeech/v1beta1/texttospeech-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/text-to-speech/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // texttospeechService, err := texttospeech.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // texttospeechService, err := texttospeech.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // texttospeechService, err := texttospeech.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package texttospeech // import "google.golang.org/api/texttospeech/v1beta1" import ( diff --git a/toolresults/v1beta3/toolresults-gen.go b/toolresults/v1beta3/toolresults-gen.go index c7d4cd49c9f..1912e5354f6 100644 --- a/toolresults/v1beta3/toolresults-gen.go +++ b/toolresults/v1beta3/toolresults-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://firebase.google.com/docs/test-lab/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // toolresultsService, err := toolresults.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // toolresultsService, err := toolresults.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // toolresultsService, err := toolresults.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package toolresults // import "google.golang.org/api/toolresults/v1beta3" import ( diff --git a/tpu/v1/tpu-gen.go b/tpu/v1/tpu-gen.go index 5372a732b75..94f153cd37c 100644 --- a/tpu/v1/tpu-gen.go +++ b/tpu/v1/tpu-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/tpu/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // tpuService, err := tpu.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tpuService, err := tpu.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tpu // import "google.golang.org/api/tpu/v1" import ( diff --git a/tpu/v1alpha1/tpu-gen.go b/tpu/v1alpha1/tpu-gen.go index 45104b04dee..7614a7954ce 100644 --- a/tpu/v1alpha1/tpu-gen.go +++ b/tpu/v1alpha1/tpu-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/tpu/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // tpuService, err := tpu.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tpuService, err := tpu.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tpu // import "google.golang.org/api/tpu/v1alpha1" import ( diff --git a/tpu/v2/tpu-gen.go b/tpu/v2/tpu-gen.go index 11de6af65b0..1e3a626487d 100644 --- a/tpu/v2/tpu-gen.go +++ b/tpu/v2/tpu-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/tpu/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // tpuService, err := tpu.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tpuService, err := tpu.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tpu // import "google.golang.org/api/tpu/v2" import ( diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index a7e58fc74dc..a9ebe104fee 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -925,7 +925,7 @@ } } }, - "revision": "20230803", + "revision": "20230814", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1032,12 +1032,38 @@ "properties": {}, "type": "object" }, + "BootDiskConfig": { + "description": "Boot disk configurations.", + "id": "BootDiskConfig", + "properties": { + "customerEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "Optional. Customer encryption key for boot disk." + }, + "enableConfidentialCompute": { + "description": "Optional. Whether the boot disk will be created with confidential compute mode.", + "type": "boolean" + } + }, + "type": "object" + }, "CreatingData": { "description": "Further data for the creating state.", "id": "CreatingData", "properties": {}, "type": "object" }, + "CustomerEncryptionKey": { + "description": "Customer's encryption key.", + "id": "CustomerEncryptionKey", + "properties": { + "kmsKeyName": { + "description": "The name of the encryption key that is stored in Google Cloud KMS. For example: \"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: \"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 ", + "type": "string" + } + }, + "type": "object" + }, "DeletingData": { "description": "Further data for the deleting state.", "id": "DeletingData", @@ -1449,6 +1475,10 @@ "readOnly": true, "type": "string" }, + "bootDiskConfig": { + "$ref": "BootDiskConfig", + "description": "Optional. Boot disk configuration." + }, "cidrBlock": { "description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", "type": "string" diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index 75f5fcc06d1..e3fcbc3a045 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/tpu/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // tpuService, err := tpu.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // tpuService, err := tpu.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // tpuService, err := tpu.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package tpu // import "google.golang.org/api/tpu/v2alpha1" import ( @@ -377,10 +390,79 @@ func (s *AttachedDisk) MarshalJSON() ([]byte, error) { type BestEffort struct { } +// BootDiskConfig: Boot disk configurations. +type BootDiskConfig struct { + // CustomerEncryptionKey: Optional. Customer encryption key for boot + // disk. + CustomerEncryptionKey *CustomerEncryptionKey `json:"customerEncryptionKey,omitempty"` + + // EnableConfidentialCompute: Optional. Whether the boot disk will be + // created with confidential compute mode. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CustomerEncryptionKey") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomerEncryptionKey") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BootDiskConfig) MarshalJSON() ([]byte, error) { + type NoMethod BootDiskConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreatingData: Further data for the creating state. type CreatingData struct { } +// CustomerEncryptionKey: Customer's encryption key. +type CustomerEncryptionKey struct { + // KmsKeyName: The name of the encryption key that is stored in Google + // Cloud KMS. For example: "kmsKeyName": + // "projects/kms_project_id/locations/region/keyRings/ + // key_region/cryptoKeys/key The fully-qualifed key name may be returned + // for resource GET requests. For example: "kmsKeyName": + // "projects/kms_project_id/locations/region/keyRings/ + // key_region/cryptoKeys/key /cryptoKeyVersions/1 + KmsKeyName string `json:"kmsKeyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKeyName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KmsKeyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) { + type NoMethod CustomerEncryptionKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DeletingData: Further data for the deleting state. type DeletingData struct { } @@ -1109,6 +1191,9 @@ type Node struct { // "V2_ALPHA1" - TPU API V2Alpha1 version. ApiVersion string `json:"apiVersion,omitempty"` + // BootDiskConfig: Optional. Boot disk configuration. + BootDiskConfig *BootDiskConfig `json:"bootDiskConfig,omitempty"` + // CidrBlock: The CIDR block that the TPU node will use when selecting // an IP address. This CIDR block must be a /29 block; the Compute // Engine networks API forbids a smaller block, and using a larger block diff --git a/trafficdirector/v2/trafficdirector-gen.go b/trafficdirector/v2/trafficdirector-gen.go index 21559395b73..c66ec1e4850 100644 --- a/trafficdirector/v2/trafficdirector-gen.go +++ b/trafficdirector/v2/trafficdirector-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/traffic-director // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // trafficdirectorService, err := trafficdirector.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // trafficdirectorService, err := trafficdirector.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // trafficdirectorService, err := trafficdirector.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package trafficdirector // import "google.golang.org/api/trafficdirector/v2" import ( diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index 85cf8a0ad38..6f16269edc5 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/transcoder/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // transcoderService, err := transcoder.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // transcoderService, err := transcoder.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // transcoderService, err := transcoder.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package transcoder // import "google.golang.org/api/transcoder/v1" import ( diff --git a/translate/v2/translate-gen.go b/translate/v2/translate-gen.go index 3e37d71cba2..aa52a1569a8 100644 --- a/translate/v2/translate-gen.go +++ b/translate/v2/translate-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://code.google.com/apis/language/translate/v2/getting_started.html // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // translateService, err := translate.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // translateService, err := translate.NewService(ctx, option.WithScopes(translate.CloudTranslationScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // translateService, err := translate.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // translateService, err := translate.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package translate // import "google.golang.org/api/translate/v2" import ( diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index 1e3322f8129..1d33cc5f72e 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/translate/docs/quickstarts // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // translateService, err := translate.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // translateService, err := translate.NewService(ctx, option.WithScopes(translate.CloudTranslationScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // translateService, err := translate.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // translateService, err := translate.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package translate // import "google.golang.org/api/translate/v3" import ( diff --git a/translate/v3beta1/translate-gen.go b/translate/v3beta1/translate-gen.go index b9d406bd0cd..888d0310289 100644 --- a/translate/v3beta1/translate-gen.go +++ b/translate/v3beta1/translate-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/translate/docs/quickstarts // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // translateService, err := translate.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // translateService, err := translate.NewService(ctx, option.WithScopes(translate.CloudTranslationScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // translateService, err := translate.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // translateService, err := translate.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package translate // import "google.golang.org/api/translate/v3beta1" import ( diff --git a/travelimpactmodel/v1/travelimpactmodel-gen.go b/travelimpactmodel/v1/travelimpactmodel-gen.go index ed872fb7efa..d6b11879530 100644 --- a/travelimpactmodel/v1/travelimpactmodel-gen.go +++ b/travelimpactmodel/v1/travelimpactmodel-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/travel/impact-model // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // travelimpactmodelService, err := travelimpactmodel.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // travelimpactmodelService, err := travelimpactmodel.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // travelimpactmodelService, err := travelimpactmodel.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package travelimpactmodel // import "google.golang.org/api/travelimpactmodel/v1" import ( diff --git a/vault/v1/vault-gen.go b/vault/v1/vault-gen.go index 353b57425dc..c9d6091ac61 100644 --- a/vault/v1/vault-gen.go +++ b/vault/v1/vault-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/vault // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // vaultService, err := vault.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // vaultService, err := vault.NewService(ctx, option.WithScopes(vault.EdiscoveryReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // vaultService, err := vault.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // vaultService, err := vault.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vault // import "google.golang.org/api/vault/v1" import ( diff --git a/verifiedaccess/v1/verifiedaccess-api.json b/verifiedaccess/v1/verifiedaccess-api.json index 9608332b963..dfa57738032 100644 --- a/verifiedaccess/v1/verifiedaccess-api.json +++ b/verifiedaccess/v1/verifiedaccess-api.json @@ -146,7 +146,7 @@ } } }, - "revision": "20230711", + "revision": "20230822", "rootUrl": "https://verifiedaccess.googleapis.com/", "schemas": { "Challenge": { @@ -206,6 +206,10 @@ "description": "Result message for VerifiedAccess.VerifyChallengeResponse.", "id": "VerifyChallengeResponseResult", "properties": { + "attestedDeviceId": { + "description": "Attested device id (ADID) of the device, read from the verified data.", + "type": "string" + }, "deviceEnrollmentId": { "description": "Device enrollment id is returned in this field (for the machine response only).", "type": "string" diff --git a/verifiedaccess/v1/verifiedaccess-gen.go b/verifiedaccess/v1/verifiedaccess-gen.go index 151c7885a6b..3d4450bd364 100644 --- a/verifiedaccess/v1/verifiedaccess-gen.go +++ b/verifiedaccess/v1/verifiedaccess-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/chrome/verified-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // verifiedaccessService, err := verifiedaccess.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // verifiedaccessService, err := verifiedaccess.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // verifiedaccessService, err := verifiedaccess.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package verifiedaccess // import "google.golang.org/api/verifiedaccess/v1" import ( @@ -263,6 +276,10 @@ func (s *VerifyChallengeResponseRequest) MarshalJSON() ([]byte, error) { // VerifyChallengeResponseResult: Result message for // VerifiedAccess.VerifyChallengeResponse. type VerifyChallengeResponseResult struct { + // AttestedDeviceId: Attested device id (ADID) of the device, read from + // the verified data. + AttestedDeviceId string `json:"attestedDeviceId,omitempty"` + // DeviceEnrollmentId: Device enrollment id is returned in this field // (for the machine response only). DeviceEnrollmentId string `json:"deviceEnrollmentId,omitempty"` @@ -289,15 +306,15 @@ type VerifyChallengeResponseResult struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DeviceEnrollmentId") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AttestedDeviceId") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeviceEnrollmentId") to + // NullFields is a list of field names (e.g. "AttestedDeviceId") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/verifiedaccess/v2/verifiedaccess-gen.go b/verifiedaccess/v2/verifiedaccess-gen.go index 93c8c0c91c2..4dab891acbf 100644 --- a/verifiedaccess/v2/verifiedaccess-gen.go +++ b/verifiedaccess/v2/verifiedaccess-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/chrome/verified-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // verifiedaccessService, err := verifiedaccess.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // verifiedaccessService, err := verifiedaccess.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // verifiedaccessService, err := verifiedaccess.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package verifiedaccess // import "google.golang.org/api/verifiedaccess/v2" import ( diff --git a/versionhistory/v1/versionhistory-gen.go b/versionhistory/v1/versionhistory-gen.go index d321c43a040..7d9dd093e63 100644 --- a/versionhistory/v1/versionhistory-gen.go +++ b/versionhistory/v1/versionhistory-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.chrome.com/versionhistory // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // versionhistoryService, err := versionhistory.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // versionhistoryService, err := versionhistory.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // versionhistoryService, err := versionhistory.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package versionhistory // import "google.golang.org/api/versionhistory/v1" import ( diff --git a/videointelligence/v1/videointelligence-gen.go b/videointelligence/v1/videointelligence-gen.go index 5ef6fc53a2c..09daa0ecd00 100644 --- a/videointelligence/v1/videointelligence-gen.go +++ b/videointelligence/v1/videointelligence-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/video-intelligence/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // videointelligenceService, err := videointelligence.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // videointelligenceService, err := videointelligence.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // videointelligenceService, err := videointelligence.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package videointelligence // import "google.golang.org/api/videointelligence/v1" import ( diff --git a/videointelligence/v1beta2/videointelligence-gen.go b/videointelligence/v1beta2/videointelligence-gen.go index cacd5b6e438..b3de72f8d7c 100644 --- a/videointelligence/v1beta2/videointelligence-gen.go +++ b/videointelligence/v1beta2/videointelligence-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/video-intelligence/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // videointelligenceService, err := videointelligence.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // videointelligenceService, err := videointelligence.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // videointelligenceService, err := videointelligence.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package videointelligence // import "google.golang.org/api/videointelligence/v1beta2" import ( diff --git a/videointelligence/v1p1beta1/videointelligence-gen.go b/videointelligence/v1p1beta1/videointelligence-gen.go index 37eb8aaff0c..92a65b9a9a9 100644 --- a/videointelligence/v1p1beta1/videointelligence-gen.go +++ b/videointelligence/v1p1beta1/videointelligence-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/video-intelligence/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // videointelligenceService, err := videointelligence.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // videointelligenceService, err := videointelligence.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // videointelligenceService, err := videointelligence.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package videointelligence // import "google.golang.org/api/videointelligence/v1p1beta1" import ( diff --git a/videointelligence/v1p2beta1/videointelligence-gen.go b/videointelligence/v1p2beta1/videointelligence-gen.go index 60f0fbdf472..cbe0b78db1f 100644 --- a/videointelligence/v1p2beta1/videointelligence-gen.go +++ b/videointelligence/v1p2beta1/videointelligence-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/video-intelligence/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // videointelligenceService, err := videointelligence.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // videointelligenceService, err := videointelligence.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // videointelligenceService, err := videointelligence.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package videointelligence // import "google.golang.org/api/videointelligence/v1p2beta1" import ( diff --git a/videointelligence/v1p3beta1/videointelligence-gen.go b/videointelligence/v1p3beta1/videointelligence-gen.go index 836723f19a0..e032a603337 100644 --- a/videointelligence/v1p3beta1/videointelligence-gen.go +++ b/videointelligence/v1p3beta1/videointelligence-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/video-intelligence/docs/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,24 +30,26 @@ // ctx := context.Background() // videointelligenceService, err := videointelligence.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // videointelligenceService, err := videointelligence.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // videointelligenceService, err := videointelligence.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package videointelligence // import "google.golang.org/api/videointelligence/v1p3beta1" import ( diff --git a/vision/v1/vision-gen.go b/vision/v1/vision-gen.go index 06714924845..017eb677b6c 100644 --- a/vision/v1/vision-gen.go +++ b/vision/v1/vision-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/vision/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // visionService, err := vision.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // visionService, err := vision.NewService(ctx, option.WithScopes(vision.CloudVisionScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // visionService, err := vision.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // visionService, err := vision.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vision // import "google.golang.org/api/vision/v1" import ( diff --git a/vision/v1p1beta1/vision-gen.go b/vision/v1p1beta1/vision-gen.go index 9daad15cde2..566f3bc19bd 100644 --- a/vision/v1p1beta1/vision-gen.go +++ b/vision/v1p1beta1/vision-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/vision/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // visionService, err := vision.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // visionService, err := vision.NewService(ctx, option.WithScopes(vision.CloudVisionScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // visionService, err := vision.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // visionService, err := vision.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vision // import "google.golang.org/api/vision/v1p1beta1" import ( diff --git a/vision/v1p2beta1/vision-gen.go b/vision/v1p2beta1/vision-gen.go index 5d6d7a53e6e..736c8dfc262 100644 --- a/vision/v1p2beta1/vision-gen.go +++ b/vision/v1p2beta1/vision-gen.go @@ -10,6 +10,17 @@ // // For product documentation, see: https://cloud.google.com/vision/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -19,28 +30,31 @@ // ctx := context.Background() // visionService, err := vision.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // visionService, err := vision.NewService(ctx, option.WithScopes(vision.CloudVisionScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // visionService, err := vision.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // visionService, err := vision.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vision // import "google.golang.org/api/vision/v1p2beta1" import ( diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 0f3281dedf8..57888a95e3e 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -1972,7 +1972,7 @@ } } }, - "revision": "20230803", + "revision": "20230831", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2205,23 +2205,10 @@ ], "type": "string" }, - "vmCapabilities": { - "description": "Output only. Unordered list. List of VM certain capabilities needed for some Compute Engine features.", - "items": { - "enum": [ - "VM_CAPABILITY_UNSPECIFIED", - "VM_CAPABILITY_NVME_STORAGE_ACCESS", - "VM_CAPABILITY_GVNIC_NETWORK_INTERFACE" - ], - "enumDescriptions": [ - "Unknown capability.", - "NVMe driver install and the VM can use NVMe PD or local SSD.", - "gVNIC virtual NIC driver supported." - ], - "type": "string" - }, - "readOnly": true, - "type": "array" + "vmCapabilitiesInfo": { + "$ref": "VmCapabilities", + "description": "Output only. Information about VM capabilities needed for some Compute Engine features.", + "readOnly": true } }, "type": "object" @@ -2378,6 +2365,231 @@ }, "type": "object" }, + "AzureDiskDetails": { + "description": "The details of an Azure VM disk.", + "id": "AzureDiskDetails", + "properties": { + "diskId": { + "description": "Azure disk ID.", + "type": "string" + }, + "diskNumber": { + "description": "The ordinal number of the disk.", + "format": "int32", + "type": "integer" + }, + "sizeGb": { + "description": "Size in GB.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "AzureSourceDetails": { + "description": "AzureSourceDetails message describes a specific source details for the Azure source type.", + "id": "AzureSourceDetails", + "properties": { + "azureLocation": { + "description": "Immutable. The Azure location (region) that the source VMs will be migrated from.", + "type": "string" + }, + "clientSecretCreds": { + "$ref": "ClientSecretCredentials", + "description": "Azure Credentials using tenant ID, client ID and secret." + }, + "error": { + "$ref": "Status", + "description": "Output only. Provides details on the state of the Source in case of an error.", + "readOnly": true + }, + "migrationResourcesUserTags": { + "additionalProperties": { + "type": "string" + }, + "description": "User specified tags to add to every M2VM generated resource in Azure. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m4ce` or `m2vm`.", + "type": "object" + }, + "resourceGroupId": { + "description": "Output only. The ID of the Azure resource group that contains all resources related to the migration process of this source.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the source as determined by the health check.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "FAILED", + "ACTIVE" + ], + "enumDescriptions": [ + "The state is unknown. This is used for API compatibility only and is not used by the system.", + "The state was not sampled by the health checks yet.", + "The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details.", + "The source exists and its credentials were verified." + ], + "readOnly": true, + "type": "string" + }, + "subscriptionId": { + "description": "Immutable. Azure subscription ID.", + "type": "string" + } + }, + "type": "object" + }, + "AzureSourceVmDetails": { + "description": "Represent the source Azure VM details.", + "id": "AzureSourceVmDetails", + "properties": { + "committedStorageBytes": { + "description": "The total size of the disks being migrated in bytes.", + "format": "int64", + "type": "string" + }, + "disks": { + "description": "The disks attached to the source VM.", + "items": { + "$ref": "AzureDiskDetails" + }, + "type": "array" + }, + "firmware": { + "description": "The firmware type of the source VM.", + "enum": [ + "FIRMWARE_UNSPECIFIED", + "EFI", + "BIOS" + ], + "enumDescriptions": [ + "The firmware is unknown.", + "The firmware is EFI.", + "The firmware is BIOS." + ], + "type": "string" + }, + "vmCapabilitiesInfo": { + "$ref": "VmCapabilities", + "description": "Output only. Information about VM capabilities needed for some Compute Engine features.", + "readOnly": true + } + }, + "type": "object" + }, + "AzureVmDetails": { + "description": "AwsVmDetails describes a VM in AWS.", + "id": "AzureVmDetails", + "properties": { + "bootOption": { + "description": "The VM Boot Option.", + "enum": [ + "BOOT_OPTION_UNSPECIFIED", + "EFI", + "BIOS" + ], + "enumDescriptions": [ + "The boot option is unknown.", + "The boot option is UEFI.", + "The boot option is BIOS." + ], + "type": "string" + }, + "committedStorageMb": { + "description": "The total size of the storage allocated to the VM in MB.", + "format": "int64", + "type": "string" + }, + "computerName": { + "description": "The VM's ComputerName.", + "type": "string" + }, + "cpuCount": { + "description": "The number of cpus the VM has.", + "format": "int32", + "type": "integer" + }, + "diskCount": { + "description": "The number of disks the VM has, including OS disk.", + "format": "int32", + "type": "integer" + }, + "disks": { + "description": "Description of the data disks.", + "items": { + "$ref": "Disk" + }, + "type": "array" + }, + "memoryMb": { + "description": "The memory size of the VM in MB.", + "format": "int32", + "type": "integer" + }, + "osDescription": { + "$ref": "OSDescription", + "description": "Description of the OS." + }, + "osDisk": { + "$ref": "OSDisk", + "description": "Description of the OS disk." + }, + "powerState": { + "description": "The power state of the VM at the moment list was taken.", + "enum": [ + "POWER_STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "STOPPING", + "STOPPED", + "DEALLOCATING", + "DEALLOCATED", + "UNKNOWN" + ], + "enumDescriptions": [ + "Power state is not specified.", + "The VM is starting.", + "The VM is running.", + "The VM is stopping.", + "The VM is stopped.", + "The VM is deallocating.", + "The VM is deallocated.", + "The VM's power state is unknown." + ], + "type": "string" + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "The tags of the VM.", + "type": "object" + }, + "vmId": { + "description": "The VM full path in Azure.", + "type": "string" + }, + "vmSize": { + "description": "VM size as configured in Azure. Determines the VM's hardware spec.", + "type": "string" + } + }, + "type": "object" + }, + "AzureVmsDetails": { + "description": "AzureVmsDetails describes VMs in Azure.", + "id": "AzureVmsDetails", + "properties": { + "details": { + "description": "The details of the Azure VMs.", + "items": { + "$ref": "AzureVmDetails" + }, + "type": "array" + } + }, + "type": "object" + }, "CancelCloneJobRequest": { "description": "Request message for 'CancelCloneJob' request.", "id": "CancelCloneJobRequest", @@ -2396,6 +2608,25 @@ "properties": {}, "type": "object" }, + "ClientSecretCredentials": { + "description": "Message describing Azure Credentials using tenant ID, client ID and secret.", + "id": "ClientSecretCredentials", + "properties": { + "clientId": { + "description": "Azure client ID.", + "type": "string" + }, + "clientSecret": { + "description": "Input only. Azure client secret.", + "type": "string" + }, + "tenantId": { + "description": "Azure tenant ID.", + "type": "string" + } + }, + "type": "object" + }, "CloneJob": { "description": "CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.", "id": "CloneJob", @@ -3099,6 +3330,27 @@ }, "type": "object" }, + "Disk": { + "description": "A message describing a data disk.", + "id": "Disk", + "properties": { + "lun": { + "description": "The disk's Logical Unit Number (LUN).", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "The disk name.", + "type": "string" + }, + "sizeGb": { + "description": "The disk size in GB.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -3113,6 +3365,10 @@ "$ref": "AwsVmsDetails", "description": "The description of the VMs in a Source of type AWS." }, + "azureVms": { + "$ref": "AzureVmsDetails", + "description": "The description of the VMs in a Source of type Azure." + }, "nextPageToken": { "description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "readOnly": true, @@ -3556,6 +3812,11 @@ "description": "Output only. Details of the VM from an AWS source.", "readOnly": true }, + "azureSourceVmDetails": { + "$ref": "AzureSourceVmDetails", + "description": "Output only. Details of the VM from an Azure source.", + "readOnly": true + }, "computeEngineDisksTargetDefaults": { "$ref": "ComputeEngineDisksTargetDefaults", "description": "Details of the target Persistent Disks in Compute Engine." @@ -3688,6 +3949,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "vmwareSourceVmDetails": { + "$ref": "VmwareSourceVmDetails", + "description": "Output only. Details of the VM from a Vmware source.", + "readOnly": true } }, "type": "object" @@ -3814,6 +4080,49 @@ }, "type": "object" }, + "OSDescription": { + "description": "A message describing the VM's OS. Including OS, Publisher, Offer and Plan if applicable.", + "id": "OSDescription", + "properties": { + "offer": { + "description": "OS offer.", + "type": "string" + }, + "plan": { + "description": "OS plan.", + "type": "string" + }, + "publisher": { + "description": "OS publisher.", + "type": "string" + }, + "type": { + "description": "OS type.", + "type": "string" + } + }, + "type": "object" + }, + "OSDisk": { + "description": "A message describing the OS disk.", + "id": "OSDisk", + "properties": { + "name": { + "description": "The disk's full name.", + "type": "string" + }, + "sizeGb": { + "description": "The disk's size in GB.", + "format": "int32", + "type": "integer" + }, + "type": { + "description": "The disk's type.", + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -4158,6 +4467,10 @@ "$ref": "AwsSourceDetails", "description": "AWS type source details." }, + "azure": { + "$ref": "AzureSourceDetails", + "description": "Azure type source details." + }, "createTime": { "description": "Output only. The create time timestamp.", "format": "google-datetime", @@ -4409,6 +4722,37 @@ }, "type": "object" }, + "VmCapabilities": { + "description": "Migrating VM source information about the VM capabilities needed for some Compute Engine features.", + "id": "VmCapabilities", + "properties": { + "lastOsCapabilitiesUpdateTime": { + "description": "Output only. The last time OS capabilities list was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "osCapabilities": { + "description": "Output only. Unordered list. List of certain VM OS capabilities needed for some Compute Engine features.", + "items": { + "enum": [ + "OS_CAPABILITY_UNSPECIFIED", + "OS_CAPABILITY_NVME_STORAGE_ACCESS", + "OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" + ], + "enumDescriptions": [ + "This is for API compatibility only and is not in use.", + "NVMe driver installed and the VM can use NVMe PD or local SSD.", + "gVNIC virtual NIC driver supported." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "VmUtilizationInfo": { "description": "Utilization information of a single VM.", "id": "VmUtilizationInfo", @@ -4475,6 +4819,27 @@ }, "type": "object" }, + "VmwareDiskDetails": { + "description": "The details of a Vmware VM disk.", + "id": "VmwareDiskDetails", + "properties": { + "diskNumber": { + "description": "The ordinal number of the disk.", + "format": "int32", + "type": "integer" + }, + "label": { + "description": "The disk label.", + "type": "string" + }, + "sizeGb": { + "description": "Size in GB.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "VmwareSourceDetails": { "description": "VmwareSourceDetails message describes a specific source details for the vmware source type.", "id": "VmwareSourceDetails", @@ -4502,6 +4867,44 @@ }, "type": "object" }, + "VmwareSourceVmDetails": { + "description": "Represent the source Vmware VM details.", + "id": "VmwareSourceVmDetails", + "properties": { + "committedStorageBytes": { + "description": "The total size of the disks being migrated in bytes.", + "format": "int64", + "type": "string" + }, + "disks": { + "description": "The disks attached to the source VM.", + "items": { + "$ref": "VmwareDiskDetails" + }, + "type": "array" + }, + "firmware": { + "description": "The firmware type of the source VM.", + "enum": [ + "FIRMWARE_UNSPECIFIED", + "EFI", + "BIOS" + ], + "enumDescriptions": [ + "The firmware is unknown.", + "The firmware is EFI.", + "The firmware is BIOS." + ], + "type": "string" + }, + "vmCapabilitiesInfo": { + "$ref": "VmCapabilities", + "description": "Output only. Information about VM capabilities needed for some Compute Engine features.", + "readOnly": true + } + }, + "type": "object" + }, "VmwareVmDetails": { "description": "VmwareVmDetails describes a VM in vCenter.", "id": "VmwareVmDetails", diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 73629683b2a..024b0d67a5b 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/migrate/virtual-machines // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // vmmigrationService, err := vmmigration.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // vmmigrationService, err := vmmigration.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // vmmigrationService, err := vmmigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vmmigration // import "google.golang.org/api/vmmigration/v1" import ( @@ -614,16 +627,9 @@ type AwsSourceVmDetails struct { // "BIOS" - The firmware is BIOS. Firmware string `json:"firmware,omitempty"` - // VmCapabilities: Output only. Unordered list. List of VM certain - // capabilities needed for some Compute Engine features. - // - // Possible values: - // "VM_CAPABILITY_UNSPECIFIED" - Unknown capability. - // "VM_CAPABILITY_NVME_STORAGE_ACCESS" - NVMe driver install and the - // VM can use NVMe PD or local SSD. - // "VM_CAPABILITY_GVNIC_NETWORK_INTERFACE" - gVNIC virtual NIC driver - // supported. - VmCapabilities []string `json:"vmCapabilities,omitempty"` + // VmCapabilitiesInfo: Output only. Information about VM capabilities + // needed for some Compute Engine features. + VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"` // ForceSendFields is a list of field names (e.g. // "CommittedStorageBytes") to unconditionally include in API requests. @@ -787,6 +793,260 @@ func (s *AwsVmsDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AzureDiskDetails: The details of an Azure VM disk. +type AzureDiskDetails struct { + // DiskId: Azure disk ID. + DiskId string `json:"diskId,omitempty"` + + // DiskNumber: The ordinal number of the disk. + DiskNumber int64 `json:"diskNumber,omitempty"` + + // SizeGb: Size in GB. + SizeGb int64 `json:"sizeGb,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DiskId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureDiskDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureDiskDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureSourceDetails: AzureSourceDetails message describes a specific +// source details for the Azure source type. +type AzureSourceDetails struct { + // AzureLocation: Immutable. The Azure location (region) that the source + // VMs will be migrated from. + AzureLocation string `json:"azureLocation,omitempty"` + + // ClientSecretCreds: Azure Credentials using tenant ID, client ID and + // secret. + ClientSecretCreds *ClientSecretCredentials `json:"clientSecretCreds,omitempty"` + + // Error: Output only. Provides details on the state of the Source in + // case of an error. + Error *Status `json:"error,omitempty"` + + // MigrationResourcesUserTags: User specified tags to add to every M2VM + // generated resource in Azure. These tags will be set in addition to + // the default tags that are set as part of the migration process. The + // tags must not begin with the reserved prefix `m4ce` or `m2vm`. + MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"` + + // ResourceGroupId: Output only. The ID of the Azure resource group that + // contains all resources related to the migration process of this + // source. + ResourceGroupId string `json:"resourceGroupId,omitempty"` + + // State: Output only. State of the source as determined by the health + // check. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unknown. This is used for API + // compatibility only and is not used by the system. + // "PENDING" - The state was not sampled by the health checks yet. + // "FAILED" - The source is available but might not be usable yet due + // to invalid credentials or another reason. The error message will + // contain further details. + // "ACTIVE" - The source exists and its credentials were verified. + State string `json:"state,omitempty"` + + // SubscriptionId: Immutable. Azure subscription ID. + SubscriptionId string `json:"subscriptionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AzureLocation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AzureLocation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureSourceDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureSourceDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureSourceVmDetails: Represent the source Azure VM details. +type AzureSourceVmDetails struct { + // CommittedStorageBytes: The total size of the disks being migrated in + // bytes. + CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` + + // Disks: The disks attached to the source VM. + Disks []*AzureDiskDetails `json:"disks,omitempty"` + + // Firmware: The firmware type of the source VM. + // + // Possible values: + // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. + // "EFI" - The firmware is EFI. + // "BIOS" - The firmware is BIOS. + Firmware string `json:"firmware,omitempty"` + + // VmCapabilitiesInfo: Output only. Information about VM capabilities + // needed for some Compute Engine features. + VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CommittedStorageBytes") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommittedStorageBytes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AzureSourceVmDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureSourceVmDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureVmDetails: AwsVmDetails describes a VM in AWS. +type AzureVmDetails struct { + // BootOption: The VM Boot Option. + // + // Possible values: + // "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown. + // "EFI" - The boot option is UEFI. + // "BIOS" - The boot option is BIOS. + BootOption string `json:"bootOption,omitempty"` + + // CommittedStorageMb: The total size of the storage allocated to the VM + // in MB. + CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"` + + // ComputerName: The VM's ComputerName. + ComputerName string `json:"computerName,omitempty"` + + // CpuCount: The number of cpus the VM has. + CpuCount int64 `json:"cpuCount,omitempty"` + + // DiskCount: The number of disks the VM has, including OS disk. + DiskCount int64 `json:"diskCount,omitempty"` + + // Disks: Description of the data disks. + Disks []*Disk `json:"disks,omitempty"` + + // MemoryMb: The memory size of the VM in MB. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // OsDescription: Description of the OS. + OsDescription *OSDescription `json:"osDescription,omitempty"` + + // OsDisk: Description of the OS disk. + OsDisk *OSDisk `json:"osDisk,omitempty"` + + // PowerState: The power state of the VM at the moment list was taken. + // + // Possible values: + // "POWER_STATE_UNSPECIFIED" - Power state is not specified. + // "STARTING" - The VM is starting. + // "RUNNING" - The VM is running. + // "STOPPING" - The VM is stopping. + // "STOPPED" - The VM is stopped. + // "DEALLOCATING" - The VM is deallocating. + // "DEALLOCATED" - The VM is deallocated. + // "UNKNOWN" - The VM's power state is unknown. + PowerState string `json:"powerState,omitempty"` + + // Tags: The tags of the VM. + Tags map[string]string `json:"tags,omitempty"` + + // VmId: The VM full path in Azure. + VmId string `json:"vmId,omitempty"` + + // VmSize: VM size as configured in Azure. Determines the VM's hardware + // spec. + VmSize string `json:"vmSize,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BootOption") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BootOption") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureVmDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureVmDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureVmsDetails: AzureVmsDetails describes VMs in Azure. +type AzureVmsDetails struct { + // Details: The details of the Azure VMs. + Details []*AzureVmDetails `json:"details,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Details") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Details") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureVmsDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureVmsDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelCloneJobRequest: Request message for 'CancelCloneJob' request. type CancelCloneJobRequest struct { } @@ -801,6 +1061,41 @@ type CancelCutoverJobRequest struct { type CancelOperationRequest struct { } +// ClientSecretCredentials: Message describing Azure Credentials using +// tenant ID, client ID and secret. +type ClientSecretCredentials struct { + // ClientId: Azure client ID. + ClientId string `json:"clientId,omitempty"` + + // ClientSecret: Input only. Azure client secret. + ClientSecret string `json:"clientSecret,omitempty"` + + // TenantId: Azure tenant ID. + TenantId string `json:"tenantId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientSecretCredentials) MarshalJSON() ([]byte, error) { + type NoMethod ClientSecretCredentials + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CloneJob: CloneJob describes the process of creating a clone of a // MigratingVM to the requested target based on the latest successful // uploaded snapshots. While the migration cycles of a MigratingVm take @@ -1580,6 +1875,40 @@ func (s *DatacenterConnector) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Disk: A message describing a data disk. +type Disk struct { + // Lun: The disk's Logical Unit Number (LUN). + Lun int64 `json:"lun,omitempty"` + + // Name: The disk name. + Name string `json:"name,omitempty"` + + // SizeGb: The disk size in GB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Lun") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Lun") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Disk) MarshalJSON() ([]byte, error) { + type NoMethod Disk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1596,6 +1925,9 @@ type FetchInventoryResponse struct { // AwsVms: The description of the VMs in a Source of type AWS. AwsVms *AwsVmsDetails `json:"awsVms,omitempty"` + // AzureVms: The description of the VMs in a Source of type Azure. + AzureVms *AzureVmsDetails `json:"azureVms,omitempty"` + // NextPageToken: Output only. A token, which can be sent as // `page_token` to retrieve the next page. If this field is omitted, // there are no subsequent pages. @@ -2272,6 +2604,10 @@ type MigratingVm struct { // source. AwsSourceVmDetails *AwsSourceVmDetails `json:"awsSourceVmDetails,omitempty"` + // AzureSourceVmDetails: Output only. Details of the VM from an Azure + // source. + AzureSourceVmDetails *AzureSourceVmDetails `json:"azureSourceVmDetails,omitempty"` + // ComputeEngineDisksTargetDefaults: Details of the target Persistent // Disks in Compute Engine. ComputeEngineDisksTargetDefaults *ComputeEngineDisksTargetDefaults `json:"computeEngineDisksTargetDefaults,omitempty"` @@ -2383,6 +2719,10 @@ type MigratingVm struct { // updated. UpdateTime string `json:"updateTime,omitempty"` + // VmwareSourceVmDetails: Output only. Details of the VM from a Vmware + // source. + VmwareSourceVmDetails *VmwareSourceVmDetails `json:"vmwareSourceVmDetails,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2561,6 +2901,78 @@ func (s *NetworkInterface) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OSDescription: A message describing the VM's OS. Including OS, +// Publisher, Offer and Plan if applicable. +type OSDescription struct { + // Offer: OS offer. + Offer string `json:"offer,omitempty"` + + // Plan: OS plan. + Plan string `json:"plan,omitempty"` + + // Publisher: OS publisher. + Publisher string `json:"publisher,omitempty"` + + // Type: OS type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Offer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OSDescription) MarshalJSON() ([]byte, error) { + type NoMethod OSDescription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OSDisk: A message describing the OS disk. +type OSDisk struct { + // Name: The disk's full name. + Name string `json:"name,omitempty"` + + // SizeGb: The disk's size in GB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // Type: The disk's type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OSDisk) MarshalJSON() ([]byte, error) { + type NoMethod OSDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -3033,6 +3445,9 @@ type Source struct { // Aws: AWS type source details. Aws *AwsSourceDetails `json:"aws,omitempty"` + // Azure: Azure type source details. + Azure *AzureSourceDetails `json:"azure,omitempty"` + // CreateTime: Output only. The create time timestamp. CreateTime string `json:"createTime,omitempty"` @@ -3378,6 +3793,50 @@ func (s *UtilizationReport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmCapabilities: Migrating VM source information about the VM +// capabilities needed for some Compute Engine features. +type VmCapabilities struct { + // LastOsCapabilitiesUpdateTime: Output only. The last time OS + // capabilities list was updated. + LastOsCapabilitiesUpdateTime string `json:"lastOsCapabilitiesUpdateTime,omitempty"` + + // OsCapabilities: Output only. Unordered list. List of certain VM OS + // capabilities needed for some Compute Engine features. + // + // Possible values: + // "OS_CAPABILITY_UNSPECIFIED" - This is for API compatibility only + // and is not in use. + // "OS_CAPABILITY_NVME_STORAGE_ACCESS" - NVMe driver installed and the + // VM can use NVMe PD or local SSD. + // "OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" - gVNIC virtual NIC driver + // supported. + OsCapabilities []string `json:"osCapabilities,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LastOsCapabilitiesUpdateTime") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "LastOsCapabilitiesUpdateTime") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod VmCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmUtilizationInfo: Utilization information of a single VM. type VmUtilizationInfo struct { // Utilization: Utilization metrics for this VM. @@ -3465,6 +3924,40 @@ func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareDiskDetails: The details of a Vmware VM disk. +type VmwareDiskDetails struct { + // DiskNumber: The ordinal number of the disk. + DiskNumber int64 `json:"diskNumber,omitempty"` + + // Label: The disk label. + Label string `json:"label,omitempty"` + + // SizeGb: Size in GB. + SizeGb int64 `json:"sizeGb,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DiskNumber") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskNumber") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmwareDiskDetails) MarshalJSON() ([]byte, error) { + type NoMethod VmwareDiskDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareSourceDetails: VmwareSourceDetails message describes a specific // source details for the vmware source type. type VmwareSourceDetails struct { @@ -3508,6 +4001,52 @@ func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareSourceVmDetails: Represent the source Vmware VM details. +type VmwareSourceVmDetails struct { + // CommittedStorageBytes: The total size of the disks being migrated in + // bytes. + CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` + + // Disks: The disks attached to the source VM. + Disks []*VmwareDiskDetails `json:"disks,omitempty"` + + // Firmware: The firmware type of the source VM. + // + // Possible values: + // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. + // "EFI" - The firmware is EFI. + // "BIOS" - The firmware is BIOS. + Firmware string `json:"firmware,omitempty"` + + // VmCapabilitiesInfo: Output only. Information about VM capabilities + // needed for some Compute Engine features. + VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CommittedStorageBytes") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommittedStorageBytes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VmwareSourceVmDetails) MarshalJSON() ([]byte, error) { + type NoMethod VmwareSourceVmDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareVmDetails: VmwareVmDetails describes a VM in vCenter. type VmwareVmDetails struct { // BootOption: Output only. The VM Boot Option. diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index b27684fc551..285fb9b87b0 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -1972,7 +1972,7 @@ } } }, - "revision": "20230803", + "revision": "20230831", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2205,23 +2205,10 @@ ], "type": "string" }, - "vmCapabilities": { - "description": "Output only. Unordered list. List of VM certain capabilities needed for some Compute Engine features.", - "items": { - "enum": [ - "VM_CAPABILITY_UNSPECIFIED", - "VM_CAPABILITY_NVME_STORAGE_ACCESS", - "VM_CAPABILITY_GVNIC_NETWORK_INTERFACE" - ], - "enumDescriptions": [ - "Unknown capability.", - "NVMe driver install and the VM can use NVMe PD or local SSD.", - "gVNIC virtual NIC driver supported." - ], - "type": "string" - }, - "readOnly": true, - "type": "array" + "vmCapabilitiesInfo": { + "$ref": "VmCapabilities", + "description": "Output only. Information about VM capabilities needed for some Compute Engine features.", + "readOnly": true } }, "type": "object" @@ -2378,6 +2365,231 @@ }, "type": "object" }, + "AzureDiskDetails": { + "description": "The details of an Azure VM disk.", + "id": "AzureDiskDetails", + "properties": { + "diskId": { + "description": "Azure disk ID.", + "type": "string" + }, + "diskNumber": { + "description": "The ordinal number of the disk.", + "format": "int32", + "type": "integer" + }, + "sizeGb": { + "description": "Size in GB.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "AzureSourceDetails": { + "description": "AzureSourceDetails message describes a specific source details for the Azure source type.", + "id": "AzureSourceDetails", + "properties": { + "azureLocation": { + "description": "Immutable. The Azure location (region) that the source VMs will be migrated from.", + "type": "string" + }, + "clientSecretCreds": { + "$ref": "ClientSecretCredentials", + "description": "Azure Credentials using tenant ID, client ID and secret." + }, + "error": { + "$ref": "Status", + "description": "Output only. Provides details on the state of the Source in case of an error.", + "readOnly": true + }, + "migrationResourcesUserTags": { + "additionalProperties": { + "type": "string" + }, + "description": "User specified tags to add to every M2VM generated resource in Azure. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m4ce` or `m2vm`.", + "type": "object" + }, + "resourceGroupId": { + "description": "Output only. The ID of the Azure resource group that contains all resources related to the migration process of this source.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the source as determined by the health check.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "FAILED", + "ACTIVE" + ], + "enumDescriptions": [ + "The state is unknown. This is used for API compatibility only and is not used by the system.", + "The state was not sampled by the health checks yet.", + "The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details.", + "The source exists and its credentials were verified." + ], + "readOnly": true, + "type": "string" + }, + "subscriptionId": { + "description": "Immutable. Azure subscription ID.", + "type": "string" + } + }, + "type": "object" + }, + "AzureSourceVmDetails": { + "description": "Represent the source Azure VM details.", + "id": "AzureSourceVmDetails", + "properties": { + "committedStorageBytes": { + "description": "The total size of the disks being migrated in bytes.", + "format": "int64", + "type": "string" + }, + "disks": { + "description": "The disks attached to the source VM.", + "items": { + "$ref": "AzureDiskDetails" + }, + "type": "array" + }, + "firmware": { + "description": "The firmware type of the source VM.", + "enum": [ + "FIRMWARE_UNSPECIFIED", + "EFI", + "BIOS" + ], + "enumDescriptions": [ + "The firmware is unknown.", + "The firmware is EFI.", + "The firmware is BIOS." + ], + "type": "string" + }, + "vmCapabilitiesInfo": { + "$ref": "VmCapabilities", + "description": "Output only. Information about VM capabilities needed for some Compute Engine features.", + "readOnly": true + } + }, + "type": "object" + }, + "AzureVmDetails": { + "description": "AwsVmDetails describes a VM in AWS.", + "id": "AzureVmDetails", + "properties": { + "bootOption": { + "description": "The VM Boot Option.", + "enum": [ + "BOOT_OPTION_UNSPECIFIED", + "EFI", + "BIOS" + ], + "enumDescriptions": [ + "The boot option is unknown.", + "The boot option is UEFI.", + "The boot option is BIOS." + ], + "type": "string" + }, + "committedStorageMb": { + "description": "The total size of the storage allocated to the VM in MB.", + "format": "int64", + "type": "string" + }, + "computerName": { + "description": "The VM's ComputerName.", + "type": "string" + }, + "cpuCount": { + "description": "The number of cpus the VM has.", + "format": "int32", + "type": "integer" + }, + "diskCount": { + "description": "The number of disks the VM has, including OS disk.", + "format": "int32", + "type": "integer" + }, + "disks": { + "description": "Description of the data disks.", + "items": { + "$ref": "Disk" + }, + "type": "array" + }, + "memoryMb": { + "description": "The memory size of the VM in MB.", + "format": "int32", + "type": "integer" + }, + "osDescription": { + "$ref": "OSDescription", + "description": "Description of the OS." + }, + "osDisk": { + "$ref": "OSDisk", + "description": "Description of the OS disk." + }, + "powerState": { + "description": "The power state of the VM at the moment list was taken.", + "enum": [ + "POWER_STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "STOPPING", + "STOPPED", + "DEALLOCATING", + "DEALLOCATED", + "UNKNOWN" + ], + "enumDescriptions": [ + "Power state is not specified.", + "The VM is starting.", + "The VM is running.", + "The VM is stopping.", + "The VM is stopped.", + "The VM is deallocating.", + "The VM is deallocated.", + "The VM's power state is unknown." + ], + "type": "string" + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "The tags of the VM.", + "type": "object" + }, + "vmId": { + "description": "The VM full path in Azure.", + "type": "string" + }, + "vmSize": { + "description": "VM size as configured in Azure. Determines the VM's hardware spec.", + "type": "string" + } + }, + "type": "object" + }, + "AzureVmsDetails": { + "description": "AzureVmsDetails describes VMs in Azure.", + "id": "AzureVmsDetails", + "properties": { + "details": { + "description": "The details of the Azure VMs.", + "items": { + "$ref": "AzureVmDetails" + }, + "type": "array" + } + }, + "type": "object" + }, "CancelCloneJobRequest": { "description": "Request message for 'CancelCloneJob' request.", "id": "CancelCloneJobRequest", @@ -2396,6 +2608,25 @@ "properties": {}, "type": "object" }, + "ClientSecretCredentials": { + "description": "Message describing Azure Credentials using tenant ID, client ID and secret.", + "id": "ClientSecretCredentials", + "properties": { + "clientId": { + "description": "Azure client ID.", + "type": "string" + }, + "clientSecret": { + "description": "Input only. Azure client secret.", + "type": "string" + }, + "tenantId": { + "description": "Azure tenant ID.", + "type": "string" + } + }, + "type": "object" + }, "CloneJob": { "description": "CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.", "id": "CloneJob", @@ -3134,6 +3365,27 @@ }, "type": "object" }, + "Disk": { + "description": "A message describing a data disk.", + "id": "Disk", + "properties": { + "lun": { + "description": "The disk's Logical Unit Number (LUN).", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "The disk name.", + "type": "string" + }, + "sizeGb": { + "description": "The disk size in GB.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -3148,6 +3400,10 @@ "$ref": "AwsVmsDetails", "description": "The description of the VMs in a Source of type AWS." }, + "azureVms": { + "$ref": "AzureVmsDetails", + "description": "The description of the VMs in a Source of type Azure." + }, "nextPageToken": { "description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "readOnly": true, @@ -3591,6 +3847,11 @@ "description": "Output only. Details of the VM from an AWS source.", "readOnly": true }, + "azureSourceVmDetails": { + "$ref": "AzureSourceVmDetails", + "description": "Output only. Details of the VM from an Azure source.", + "readOnly": true + }, "computeEngineDisksTargetDefaults": { "$ref": "ComputeEngineDisksTargetDefaults", "description": "Details of the target Persistent Disks in Compute Engine." @@ -3733,6 +3994,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "vmwareSourceVmDetails": { + "$ref": "VmwareSourceVmDetails", + "description": "Output only. Details of the VM from a Vmware source.", + "readOnly": true } }, "type": "object" @@ -3859,6 +4125,49 @@ }, "type": "object" }, + "OSDescription": { + "description": "A message describing the VM's OS. Including OS, Publisher, Offer and Plan if applicable.", + "id": "OSDescription", + "properties": { + "offer": { + "description": "OS offer.", + "type": "string" + }, + "plan": { + "description": "OS plan.", + "type": "string" + }, + "publisher": { + "description": "OS publisher.", + "type": "string" + }, + "type": { + "description": "OS type.", + "type": "string" + } + }, + "type": "object" + }, + "OSDisk": { + "description": "A message describing the OS disk.", + "id": "OSDisk", + "properties": { + "name": { + "description": "The disk's full name.", + "type": "string" + }, + "sizeGb": { + "description": "The disk's size in GB.", + "format": "int32", + "type": "integer" + }, + "type": { + "description": "The disk's type.", + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -4209,6 +4518,10 @@ "$ref": "AwsSourceDetails", "description": "AWS type source details." }, + "azure": { + "$ref": "AzureSourceDetails", + "description": "Azure type source details." + }, "createTime": { "description": "Output only. The create time timestamp.", "format": "google-datetime", @@ -4613,6 +4926,37 @@ }, "type": "object" }, + "VmCapabilities": { + "description": "Migrating VM source information about the VM capabilities needed for some Compute Engine features.", + "id": "VmCapabilities", + "properties": { + "lastOsCapabilitiesUpdateTime": { + "description": "Output only. The last time OS capabilities list was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "osCapabilities": { + "description": "Output only. Unordered list. List of certain VM OS capabilities needed for some Compute Engine features.", + "items": { + "enum": [ + "OS_CAPABILITY_UNSPECIFIED", + "OS_CAPABILITY_NVME_STORAGE_ACCESS", + "OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" + ], + "enumDescriptions": [ + "This is for API compatibility only and is not in use.", + "NVMe driver installed and the VM can use NVMe PD or local SSD.", + "gVNIC virtual NIC driver supported." + ], + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "VmUtilizationInfo": { "description": "Utilization information of a single VM.", "id": "VmUtilizationInfo", @@ -4727,6 +5071,27 @@ }, "type": "object" }, + "VmwareDiskDetails": { + "description": "The details of a Vmware VM disk.", + "id": "VmwareDiskDetails", + "properties": { + "diskNumber": { + "description": "The ordinal number of the disk.", + "format": "int32", + "type": "integer" + }, + "label": { + "description": "The disk label.", + "type": "string" + }, + "sizeGb": { + "description": "Size in GB.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "VmwareSourceDetails": { "description": "VmwareSourceDetails message describes a specific source details for the vmware source type.", "id": "VmwareSourceDetails", @@ -4754,6 +5119,44 @@ }, "type": "object" }, + "VmwareSourceVmDetails": { + "description": "Represent the source Vmware VM details.", + "id": "VmwareSourceVmDetails", + "properties": { + "committedStorageBytes": { + "description": "The total size of the disks being migrated in bytes.", + "format": "int64", + "type": "string" + }, + "disks": { + "description": "The disks attached to the source VM.", + "items": { + "$ref": "VmwareDiskDetails" + }, + "type": "array" + }, + "firmware": { + "description": "The firmware type of the source VM.", + "enum": [ + "FIRMWARE_UNSPECIFIED", + "EFI", + "BIOS" + ], + "enumDescriptions": [ + "The firmware is unknown.", + "The firmware is EFI.", + "The firmware is BIOS." + ], + "type": "string" + }, + "vmCapabilitiesInfo": { + "$ref": "VmCapabilities", + "description": "Output only. Information about VM capabilities needed for some Compute Engine features.", + "readOnly": true + } + }, + "type": "object" + }, "VmwareVmDetails": { "description": "VmwareVmDetails describes a VM in vCenter.", "id": "VmwareVmDetails", diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 529b191fdd8..4100e8c2f23 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/migrate/virtual-machines // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // vmmigrationService, err := vmmigration.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // vmmigrationService, err := vmmigration.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // vmmigrationService, err := vmmigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vmmigration // import "google.golang.org/api/vmmigration/v1alpha1" import ( @@ -614,16 +627,9 @@ type AwsSourceVmDetails struct { // "BIOS" - The firmware is BIOS. Firmware string `json:"firmware,omitempty"` - // VmCapabilities: Output only. Unordered list. List of VM certain - // capabilities needed for some Compute Engine features. - // - // Possible values: - // "VM_CAPABILITY_UNSPECIFIED" - Unknown capability. - // "VM_CAPABILITY_NVME_STORAGE_ACCESS" - NVMe driver install and the - // VM can use NVMe PD or local SSD. - // "VM_CAPABILITY_GVNIC_NETWORK_INTERFACE" - gVNIC virtual NIC driver - // supported. - VmCapabilities []string `json:"vmCapabilities,omitempty"` + // VmCapabilitiesInfo: Output only. Information about VM capabilities + // needed for some Compute Engine features. + VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"` // ForceSendFields is a list of field names (e.g. // "CommittedStorageBytes") to unconditionally include in API requests. @@ -787,6 +793,260 @@ func (s *AwsVmsDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AzureDiskDetails: The details of an Azure VM disk. +type AzureDiskDetails struct { + // DiskId: Azure disk ID. + DiskId string `json:"diskId,omitempty"` + + // DiskNumber: The ordinal number of the disk. + DiskNumber int64 `json:"diskNumber,omitempty"` + + // SizeGb: Size in GB. + SizeGb int64 `json:"sizeGb,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DiskId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureDiskDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureDiskDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureSourceDetails: AzureSourceDetails message describes a specific +// source details for the Azure source type. +type AzureSourceDetails struct { + // AzureLocation: Immutable. The Azure location (region) that the source + // VMs will be migrated from. + AzureLocation string `json:"azureLocation,omitempty"` + + // ClientSecretCreds: Azure Credentials using tenant ID, client ID and + // secret. + ClientSecretCreds *ClientSecretCredentials `json:"clientSecretCreds,omitempty"` + + // Error: Output only. Provides details on the state of the Source in + // case of an error. + Error *Status `json:"error,omitempty"` + + // MigrationResourcesUserTags: User specified tags to add to every M2VM + // generated resource in Azure. These tags will be set in addition to + // the default tags that are set as part of the migration process. The + // tags must not begin with the reserved prefix `m4ce` or `m2vm`. + MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"` + + // ResourceGroupId: Output only. The ID of the Azure resource group that + // contains all resources related to the migration process of this + // source. + ResourceGroupId string `json:"resourceGroupId,omitempty"` + + // State: Output only. State of the source as determined by the health + // check. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unknown. This is used for API + // compatibility only and is not used by the system. + // "PENDING" - The state was not sampled by the health checks yet. + // "FAILED" - The source is available but might not be usable yet due + // to invalid credentials or another reason. The error message will + // contain further details. + // "ACTIVE" - The source exists and its credentials were verified. + State string `json:"state,omitempty"` + + // SubscriptionId: Immutable. Azure subscription ID. + SubscriptionId string `json:"subscriptionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AzureLocation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AzureLocation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureSourceDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureSourceDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureSourceVmDetails: Represent the source Azure VM details. +type AzureSourceVmDetails struct { + // CommittedStorageBytes: The total size of the disks being migrated in + // bytes. + CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` + + // Disks: The disks attached to the source VM. + Disks []*AzureDiskDetails `json:"disks,omitempty"` + + // Firmware: The firmware type of the source VM. + // + // Possible values: + // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. + // "EFI" - The firmware is EFI. + // "BIOS" - The firmware is BIOS. + Firmware string `json:"firmware,omitempty"` + + // VmCapabilitiesInfo: Output only. Information about VM capabilities + // needed for some Compute Engine features. + VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CommittedStorageBytes") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommittedStorageBytes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AzureSourceVmDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureSourceVmDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureVmDetails: AwsVmDetails describes a VM in AWS. +type AzureVmDetails struct { + // BootOption: The VM Boot Option. + // + // Possible values: + // "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown. + // "EFI" - The boot option is UEFI. + // "BIOS" - The boot option is BIOS. + BootOption string `json:"bootOption,omitempty"` + + // CommittedStorageMb: The total size of the storage allocated to the VM + // in MB. + CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"` + + // ComputerName: The VM's ComputerName. + ComputerName string `json:"computerName,omitempty"` + + // CpuCount: The number of cpus the VM has. + CpuCount int64 `json:"cpuCount,omitempty"` + + // DiskCount: The number of disks the VM has, including OS disk. + DiskCount int64 `json:"diskCount,omitempty"` + + // Disks: Description of the data disks. + Disks []*Disk `json:"disks,omitempty"` + + // MemoryMb: The memory size of the VM in MB. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // OsDescription: Description of the OS. + OsDescription *OSDescription `json:"osDescription,omitempty"` + + // OsDisk: Description of the OS disk. + OsDisk *OSDisk `json:"osDisk,omitempty"` + + // PowerState: The power state of the VM at the moment list was taken. + // + // Possible values: + // "POWER_STATE_UNSPECIFIED" - Power state is not specified. + // "STARTING" - The VM is starting. + // "RUNNING" - The VM is running. + // "STOPPING" - The VM is stopping. + // "STOPPED" - The VM is stopped. + // "DEALLOCATING" - The VM is deallocating. + // "DEALLOCATED" - The VM is deallocated. + // "UNKNOWN" - The VM's power state is unknown. + PowerState string `json:"powerState,omitempty"` + + // Tags: The tags of the VM. + Tags map[string]string `json:"tags,omitempty"` + + // VmId: The VM full path in Azure. + VmId string `json:"vmId,omitempty"` + + // VmSize: VM size as configured in Azure. Determines the VM's hardware + // spec. + VmSize string `json:"vmSize,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BootOption") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BootOption") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureVmDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureVmDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AzureVmsDetails: AzureVmsDetails describes VMs in Azure. +type AzureVmsDetails struct { + // Details: The details of the Azure VMs. + Details []*AzureVmDetails `json:"details,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Details") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Details") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AzureVmsDetails) MarshalJSON() ([]byte, error) { + type NoMethod AzureVmsDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelCloneJobRequest: Request message for 'CancelCloneJob' request. type CancelCloneJobRequest struct { } @@ -801,6 +1061,41 @@ type CancelCutoverJobRequest struct { type CancelOperationRequest struct { } +// ClientSecretCredentials: Message describing Azure Credentials using +// tenant ID, client ID and secret. +type ClientSecretCredentials struct { + // ClientId: Azure client ID. + ClientId string `json:"clientId,omitempty"` + + // ClientSecret: Input only. Azure client secret. + ClientSecret string `json:"clientSecret,omitempty"` + + // TenantId: Azure tenant ID. + TenantId string `json:"tenantId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClientSecretCredentials) MarshalJSON() ([]byte, error) { + type NoMethod ClientSecretCredentials + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CloneJob: CloneJob describes the process of creating a clone of a // MigratingVM to the requested target based on the latest successful // uploaded snapshots. While the migration cycles of a MigratingVm take @@ -1605,6 +1900,40 @@ func (s *DatacenterConnector) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Disk: A message describing a data disk. +type Disk struct { + // Lun: The disk's Logical Unit Number (LUN). + Lun int64 `json:"lun,omitempty"` + + // Name: The disk name. + Name string `json:"name,omitempty"` + + // SizeGb: The disk size in GB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Lun") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Lun") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Disk) MarshalJSON() ([]byte, error) { + type NoMethod Disk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -1621,6 +1950,9 @@ type FetchInventoryResponse struct { // AwsVms: The description of the VMs in a Source of type AWS. AwsVms *AwsVmsDetails `json:"awsVms,omitempty"` + // AzureVms: The description of the VMs in a Source of type Azure. + AzureVms *AzureVmsDetails `json:"azureVms,omitempty"` + // NextPageToken: Output only. A token, which can be sent as // `page_token` to retrieve the next page. If this field is omitted, // there are no subsequent pages. @@ -2297,6 +2629,10 @@ type MigratingVm struct { // source. AwsSourceVmDetails *AwsSourceVmDetails `json:"awsSourceVmDetails,omitempty"` + // AzureSourceVmDetails: Output only. Details of the VM from an Azure + // source. + AzureSourceVmDetails *AzureSourceVmDetails `json:"azureSourceVmDetails,omitempty"` + // ComputeEngineDisksTargetDefaults: Details of the target Persistent // Disks in Compute Engine. ComputeEngineDisksTargetDefaults *ComputeEngineDisksTargetDefaults `json:"computeEngineDisksTargetDefaults,omitempty"` @@ -2417,6 +2753,10 @@ type MigratingVm struct { // updated. UpdateTime string `json:"updateTime,omitempty"` + // VmwareSourceVmDetails: Output only. Details of the VM from a Vmware + // source. + VmwareSourceVmDetails *VmwareSourceVmDetails `json:"vmwareSourceVmDetails,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2595,6 +2935,78 @@ func (s *NetworkInterface) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OSDescription: A message describing the VM's OS. Including OS, +// Publisher, Offer and Plan if applicable. +type OSDescription struct { + // Offer: OS offer. + Offer string `json:"offer,omitempty"` + + // Plan: OS plan. + Plan string `json:"plan,omitempty"` + + // Publisher: OS publisher. + Publisher string `json:"publisher,omitempty"` + + // Type: OS type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Offer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OSDescription) MarshalJSON() ([]byte, error) { + type NoMethod OSDescription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OSDisk: A message describing the OS disk. +type OSDisk struct { + // Name: The disk's full name. + Name string `json:"name,omitempty"` + + // SizeGb: The disk's size in GB. + SizeGb int64 `json:"sizeGb,omitempty"` + + // Type: The disk's type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OSDisk) MarshalJSON() ([]byte, error) { + type NoMethod OSDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -3070,6 +3482,9 @@ type Source struct { // Aws: AWS type source details. Aws *AwsSourceDetails `json:"aws,omitempty"` + // Azure: Azure type source details. + Azure *AzureSourceDetails `json:"azure,omitempty"` + // CreateTime: Output only. The create time timestamp. CreateTime string `json:"createTime,omitempty"` @@ -3536,6 +3951,50 @@ func (s *UtilizationReport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmCapabilities: Migrating VM source information about the VM +// capabilities needed for some Compute Engine features. +type VmCapabilities struct { + // LastOsCapabilitiesUpdateTime: Output only. The last time OS + // capabilities list was updated. + LastOsCapabilitiesUpdateTime string `json:"lastOsCapabilitiesUpdateTime,omitempty"` + + // OsCapabilities: Output only. Unordered list. List of certain VM OS + // capabilities needed for some Compute Engine features. + // + // Possible values: + // "OS_CAPABILITY_UNSPECIFIED" - This is for API compatibility only + // and is not in use. + // "OS_CAPABILITY_NVME_STORAGE_ACCESS" - NVMe driver installed and the + // VM can use NVMe PD or local SSD. + // "OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" - gVNIC virtual NIC driver + // supported. + OsCapabilities []string `json:"osCapabilities,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "LastOsCapabilitiesUpdateTime") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "LastOsCapabilitiesUpdateTime") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmCapabilities) MarshalJSON() ([]byte, error) { + type NoMethod VmCapabilities + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmUtilizationInfo: Utilization information of a single VM. type VmUtilizationInfo struct { // Utilization: Utilization metrics for this VM. @@ -3648,6 +4107,40 @@ func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareDiskDetails: The details of a Vmware VM disk. +type VmwareDiskDetails struct { + // DiskNumber: The ordinal number of the disk. + DiskNumber int64 `json:"diskNumber,omitempty"` + + // Label: The disk label. + Label string `json:"label,omitempty"` + + // SizeGb: Size in GB. + SizeGb int64 `json:"sizeGb,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "DiskNumber") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskNumber") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *VmwareDiskDetails) MarshalJSON() ([]byte, error) { + type NoMethod VmwareDiskDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareSourceDetails: VmwareSourceDetails message describes a specific // source details for the vmware source type. type VmwareSourceDetails struct { @@ -3691,6 +4184,52 @@ func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// VmwareSourceVmDetails: Represent the source Vmware VM details. +type VmwareSourceVmDetails struct { + // CommittedStorageBytes: The total size of the disks being migrated in + // bytes. + CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"` + + // Disks: The disks attached to the source VM. + Disks []*VmwareDiskDetails `json:"disks,omitempty"` + + // Firmware: The firmware type of the source VM. + // + // Possible values: + // "FIRMWARE_UNSPECIFIED" - The firmware is unknown. + // "EFI" - The firmware is EFI. + // "BIOS" - The firmware is BIOS. + Firmware string `json:"firmware,omitempty"` + + // VmCapabilitiesInfo: Output only. Information about VM capabilities + // needed for some Compute Engine features. + VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CommittedStorageBytes") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CommittedStorageBytes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *VmwareSourceVmDetails) MarshalJSON() ([]byte, error) { + type NoMethod VmwareSourceVmDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // VmwareVmDetails: VmwareVmDetails describes a VM in vCenter. type VmwareVmDetails struct { // BootOption: Output only. The VM Boot Option. diff --git a/vpcaccess/v1/vpcaccess-api.json b/vpcaccess/v1/vpcaccess-api.json index 63275b8d6de..a4139584865 100644 --- a/vpcaccess/v1/vpcaccess-api.json +++ b/vpcaccess/v1/vpcaccess-api.json @@ -169,7 +169,7 @@ "type": "string" }, "parent": { - "description": "Required. The project id and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", + "description": "Required. The project ID and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -384,7 +384,7 @@ } } }, - "revision": "20230810", + "revision": "20230831", "rootUrl": "https://vpcaccess.googleapis.com/", "schemas": { "Connector": { diff --git a/vpcaccess/v1/vpcaccess-gen.go b/vpcaccess/v1/vpcaccess-gen.go index 178c8b42158..ef5292598c0 100644 --- a/vpcaccess/v1/vpcaccess-gen.go +++ b/vpcaccess/v1/vpcaccess-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/vpc/docs/configure-serverless-vpc-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // vpcaccessService, err := vpcaccess.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // vpcaccessService, err := vpcaccess.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // vpcaccessService, err := vpcaccess.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vpcaccess // import "google.golang.org/api/vpcaccess/v1" import ( @@ -906,7 +919,7 @@ type ProjectsLocationsConnectorsCreateCall struct { // Create: Creates a Serverless VPC Access connector, returns an // operation. // -// - parent: The project id and location in which the configuration +// - parent: The project ID and location in which the configuration // should be created, specified in the format // `projects/*/locations/*`. func (r *ProjectsLocationsConnectorsService) Create(parent string, connector *Connector) *ProjectsLocationsConnectorsCreateCall { @@ -1028,7 +1041,7 @@ func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "parent": { - // "description": "Required. The project id and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", + // "description": "Required. The project ID and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, diff --git a/vpcaccess/v1beta1/vpcaccess-api.json b/vpcaccess/v1beta1/vpcaccess-api.json index bc42ed6e976..6ebfa88ee9e 100644 --- a/vpcaccess/v1beta1/vpcaccess-api.json +++ b/vpcaccess/v1beta1/vpcaccess-api.json @@ -169,7 +169,7 @@ "type": "string" }, "parent": { - "description": "Required. The project id and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", + "description": "Required. The project ID and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -384,7 +384,7 @@ } } }, - "revision": "20230810", + "revision": "20230831", "rootUrl": "https://vpcaccess.googleapis.com/", "schemas": { "Connector": { @@ -413,7 +413,7 @@ "type": "integer" }, "maxThroughput": { - "description": "Maximum throughput of the connector in Mbps. Default is 300, max is 1000. If both maxThroughput and maxInstances are set, the value for maxInstances is utilzed.", + "description": "Maximum throughput of the connector in Mbps. Default is 300, max is 1000. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput.", "format": "int32", "type": "integer" }, @@ -423,7 +423,7 @@ "type": "integer" }, "minThroughput": { - "description": "Minimum throughput of the connector in Mbps. Default and min is 200. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput.", + "description": "Minimum throughput of the connector in Mbps. Default and min is 200. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput.", "format": "int32", "type": "integer" }, diff --git a/vpcaccess/v1beta1/vpcaccess-gen.go b/vpcaccess/v1beta1/vpcaccess-gen.go index ba186b1199d..d1bdf9dbcf0 100644 --- a/vpcaccess/v1beta1/vpcaccess-gen.go +++ b/vpcaccess/v1beta1/vpcaccess-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/vpc/docs/configure-serverless-vpc-access // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // vpcaccessService, err := vpcaccess.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // vpcaccessService, err := vpcaccess.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // vpcaccessService, err := vpcaccess.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package vpcaccess // import "google.golang.org/api/vpcaccess/v1beta1" import ( @@ -201,8 +214,8 @@ type Connector struct { MaxInstances int64 `json:"maxInstances,omitempty"` // MaxThroughput: Maximum throughput of the connector in Mbps. Default - // is 300, max is 1000. If both maxThroughput and maxInstances are set, - // the value for maxInstances is utilzed. + // is 300, max is 1000. If both max-throughput and max-instances are + // provided, max-instances takes precedence over max-throughput. MaxThroughput int64 `json:"maxThroughput,omitempty"` // MinInstances: Minimum value of instances in autoscaling group @@ -210,8 +223,8 @@ type Connector struct { MinInstances int64 `json:"minInstances,omitempty"` // MinThroughput: Minimum throughput of the connector in Mbps. Default - // and min is 200. If both max-throughput and max-instances are - // provided, max-instances takes precedence over max-throughput. + // and min is 200. If both min-throughput and min-instances are + // provided, min-instances takes precedence over min-throughput. MinThroughput int64 `json:"minThroughput,omitempty"` // Name: The resource name in the format @@ -906,7 +919,7 @@ type ProjectsLocationsConnectorsCreateCall struct { // Create: Creates a Serverless VPC Access connector, returns an // operation. // -// - parent: The project id and location in which the configuration +// - parent: The project ID and location in which the configuration // should be created, specified in the format // `projects/*/locations/*`. func (r *ProjectsLocationsConnectorsService) Create(parent string, connector *Connector) *ProjectsLocationsConnectorsCreateCall { @@ -1028,7 +1041,7 @@ func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "parent": { - // "description": "Required. The project id and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", + // "description": "Required. The project ID and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, diff --git a/webfonts/v1/webfonts-gen.go b/webfonts/v1/webfonts-gen.go index 21be279a9f2..75f31396eec 100644 --- a/webfonts/v1/webfonts-gen.go +++ b/webfonts/v1/webfonts-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/fonts/docs/developer_api // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // webfontsService, err := webfonts.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // webfontsService, err := webfonts.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // webfontsService, err := webfonts.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package webfonts // import "google.golang.org/api/webfonts/v1" import ( diff --git a/webrisk/v1/webrisk-gen.go b/webrisk/v1/webrisk-gen.go index 928e1801f3c..78e199256d2 100644 --- a/webrisk/v1/webrisk-gen.go +++ b/webrisk/v1/webrisk-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/web-risk/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // webriskService, err := webrisk.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // webriskService, err := webrisk.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // webriskService, err := webrisk.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package webrisk // import "google.golang.org/api/webrisk/v1" import ( diff --git a/websecurityscanner/v1/websecurityscanner-gen.go b/websecurityscanner/v1/websecurityscanner-gen.go index 354adff58db..fe3eaa4e421 100644 --- a/websecurityscanner/v1/websecurityscanner-gen.go +++ b/websecurityscanner/v1/websecurityscanner-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // websecurityscannerService, err := websecurityscanner.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // websecurityscannerService, err := websecurityscanner.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // websecurityscannerService, err := websecurityscanner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package websecurityscanner // import "google.golang.org/api/websecurityscanner/v1" import ( diff --git a/websecurityscanner/v1alpha/websecurityscanner-gen.go b/websecurityscanner/v1alpha/websecurityscanner-gen.go index 3589a36cef3..6c150c8a1ad 100644 --- a/websecurityscanner/v1alpha/websecurityscanner-gen.go +++ b/websecurityscanner/v1alpha/websecurityscanner-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // websecurityscannerService, err := websecurityscanner.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // websecurityscannerService, err := websecurityscanner.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // websecurityscannerService, err := websecurityscanner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package websecurityscanner // import "google.golang.org/api/websecurityscanner/v1alpha" import ( diff --git a/websecurityscanner/v1beta/websecurityscanner-gen.go b/websecurityscanner/v1beta/websecurityscanner-gen.go index 04d33a391d6..a85b1851026 100644 --- a/websecurityscanner/v1beta/websecurityscanner-gen.go +++ b/websecurityscanner/v1beta/websecurityscanner-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // websecurityscannerService, err := websecurityscanner.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // websecurityscannerService, err := websecurityscanner.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // websecurityscannerService, err := websecurityscanner.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package websecurityscanner // import "google.golang.org/api/websecurityscanner/v1beta" import ( diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index f313856a0bd..3616d258165 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/workflows // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // workflowexecutionsService, err := workflowexecutions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // workflowexecutionsService, err := workflowexecutions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // workflowexecutionsService, err := workflowexecutions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package workflowexecutions // import "google.golang.org/api/workflowexecutions/v1" import ( diff --git a/workflowexecutions/v1beta/workflowexecutions-gen.go b/workflowexecutions/v1beta/workflowexecutions-gen.go index 9dec9cc2273..a61a3df6327 100644 --- a/workflowexecutions/v1beta/workflowexecutions-gen.go +++ b/workflowexecutions/v1beta/workflowexecutions-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/workflows // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // workflowexecutionsService, err := workflowexecutions.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // workflowexecutionsService, err := workflowexecutions.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // workflowexecutionsService, err := workflowexecutions.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package workflowexecutions // import "google.golang.org/api/workflowexecutions/v1beta" import ( diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 7afc50d9843..7ad0927c68f 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/workflows // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // workflowsService, err := workflows.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // workflowsService, err := workflows.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // workflowsService, err := workflows.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package workflows // import "google.golang.org/api/workflows/v1" import ( diff --git a/workflows/v1beta/workflows-gen.go b/workflows/v1beta/workflows-gen.go index 9441342f19c..704d144b7f5 100644 --- a/workflows/v1beta/workflows-gen.go +++ b/workflows/v1beta/workflows-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/workflows // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // workflowsService, err := workflows.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // workflowsService, err := workflows.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // workflowsService, err := workflows.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package workflows // import "google.golang.org/api/workflows/v1beta" import ( diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 4a2906aa7ae..8529afea9f0 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/workload-manager/docs // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // workloadmanagerService, err := workloadmanager.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // workloadmanagerService, err := workloadmanager.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // workloadmanagerService, err := workloadmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package workloadmanager // import "google.golang.org/api/workloadmanager/v1" import ( diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json new file mode 100644 index 00000000000..f92dbc51b41 --- /dev/null +++ b/workstations/v1/workstations-api.json @@ -0,0 +1,2284 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://workstations.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Workstations", + "description": "Allows administrators to create managed developer environments in the cloud. ", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/workstations", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "workstations:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://workstations.mtls.googleapis.com/", + "name": "workstations", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "workstations.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "workstations.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "workstations.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "workstationClusters": { + "methods": { + "create": { + "description": "Creates a new workstation cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + }, + "workstationClusterId": { + "description": "Required. ID to use for the workstation cluster.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/workstationClusters", + "request": { + "$ref": "WorkstationCluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified workstation cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.workstationClusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", + "location": "query", + "type": "string" + }, + "force": { + "description": "Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the workstation cluster to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the requested workstation cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the requested resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "WorkstationCluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns all workstation clusters in the specified location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workstationClusters", + "response": { + "$ref": "ListWorkstationClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing workstation cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + "httpMethod": "PATCH", + "id": "workstations.projects.locations.workstationClusters.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Full name of this workstation cluster.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask that specifies which fields in the workstation cluster should be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "WorkstationCluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "workstationConfigs": { + "methods": { + "create": { + "description": "Creates a new workstation configuration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + }, + "workstationConfigId": { + "description": "Required. ID to use for the workstation configuration.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/workstationConfigs", + "request": { + "$ref": "WorkstationConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified workstation configuration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", + "location": "query", + "type": "string" + }, + "force": { + "description": "Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. Name of the workstation configuration to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the requested workstation configuration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the requested resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "WorkstationConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:getIamPolicy", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns all workstation configurations in the specified cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workstationConfigs", + "response": { + "$ref": "ListWorkstationConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listUsable": { + "description": "Returns all workstation configurations in the specified cluster on which the caller has the \"workstations.workstation.create\" permission.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs:listUsable", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workstationConfigs:listUsable", + "response": { + "$ref": "ListUsableWorkstationConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing workstation configuration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + "httpMethod": "PATCH", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Full name of this workstation configuration.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask specifying which fields in the workstation configuration should be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "WorkstationConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:setIamPolicy", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:testIamPermissions", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "workstations": { + "methods": { + "create": { + "description": "Creates a new workstation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + }, + "workstationId": { + "description": "Required. ID to use for the workstation.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/workstations", + "request": { + "$ref": "Workstation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified workstation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + "httpMethod": "DELETE", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the workstation to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateAccessToken": { + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", + "parameterOrder": [ + "workstation" + ], + "parameters": { + "workstation": { + "description": "Required. Name of the workstation for which the access token should be generated.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+workstation}:generateAccessToken", + "request": { + "$ref": "GenerateAccessTokenRequest" + }, + "response": { + "$ref": "GenerateAccessTokenResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the requested workstation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the requested resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Workstation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:getIamPolicy", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Returns all Workstations using the specified workstation configuration.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workstations", + "response": { + "$ref": "ListWorkstationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listUsable": { + "description": "Returns all workstations using the specified workstation configuration on which the caller has the \"workstations.workstations.use\" permission.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations:listUsable", + "httpMethod": "GET", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. next_page_token value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/workstations:listUsable", + "response": { + "$ref": "ListUsableWorkstationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing workstation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + "httpMethod": "PATCH", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "allowMissing": { + "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Full name of this workstation.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask specifying which fields in the workstation configuration should be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Workstation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:setIamPolicy", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "start": { + "description": "Starts running a workstation so that users can connect to it.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:start", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the workstation to start.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:start", + "request": { + "$ref": "StartWorkstationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "stop": { + "description": "Stops running a workstation, reducing costs.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:stop", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the workstation to stop.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:stop", + "request": { + "$ref": "StopWorkstationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + } + } + }, + "revision": "20230802", + "rootUrl": "https://workstations.googleapis.com/", + "schemas": { + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Container": { + "description": "A Docker container.", + "id": "Container", + "properties": { + "args": { + "description": "Optional. Arguments passed to the entrypoint.", + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "description": "Optional. If set, overrides the default ENTRYPOINT specified by the image.", + "items": { + "type": "string" + }, + "type": "array" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Environment variables passed to the container's entrypoint.", + "type": "object" + }, + "image": { + "description": "Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration and must have permission to pull the specified image. Otherwise, the image must be publicly accessible.", + "type": "string" + }, + "runAsUser": { + "description": "Optional. If set, overrides the USER specified in the image with the given uid.", + "format": "int32", + "type": "integer" + }, + "workingDir": { + "description": "Optional. If set, overrides the default DIR specified by the image.", + "type": "string" + } + }, + "type": "object" + }, + "CustomerEncryptionKey": { + "description": "A customer-managed encryption key (CMEK) for the Compute Engine resources of the associated workstation configuration. Specify the name of your Cloud KMS encryption key and the default service account. We recommend that you use a separate service account and follow [Cloud KMS best practices](https://cloud.google.com/kms/docs/separation-of-duties).", + "id": "CustomerEncryptionKey", + "properties": { + "kmsKey": { + "description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `\"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"`. The key must be in the same region as the workstation configuration.", + "type": "string" + }, + "kmsKeyServiceAccount": { + "description": "Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see [Separation of duties](https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).", + "type": "string" + } + }, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "GceConfidentialInstanceConfig": { + "description": "A set of Compute Engine Confidential VM instance options.", + "id": "GceConfidentialInstanceConfig", + "properties": { + "enableConfidentialCompute": { + "description": "Optional. Whether the instance has confidential compute enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "GceInstance": { + "description": "A runtime using a Compute Engine instance.", + "id": "GceInstance", + "properties": { + "bootDiskSizeGb": { + "description": "Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", + "format": "int32", + "type": "integer" + }, + "confidentialInstanceConfig": { + "$ref": "GceConfidentialInstanceConfig", + "description": "Optional. A set of Compute Engine Confidential VM instance options." + }, + "disablePublicIpAddresses": { + "description": "Optional. When set to true, disables public IP addresses for VMs. If you disable public IP addresses, you must set up Private Google Access or Cloud NAT on your network. If you use Private Google Access and you use `private.googleapis.com` or `restricted.googleapis.com` for Container Registry and Artifact Registry, make sure that you set up DNS records for domains `*.gcr.io` and `*.pkg.dev`. Defaults to false (VMs have public IP addresses).", + "type": "boolean" + }, + "enableNestedVirtualization": { + "description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created under this workstation configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on workstation configurations with accelerators. * **Operating System**: Because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.", + "type": "boolean" + }, + "machineType": { + "description": "Optional. The type of machine to use for VM instances—for example, `\"e2-standard-4\"`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types).", + "type": "string" + }, + "poolSize": { + "description": "Optional. The number of VMs that the system should keep idle so that new workstations can be started quickly for new users. Defaults to `0` in the API.", + "format": "int32", + "type": "integer" + }, + "pooledInstances": { + "description": "Output only. Number of instances currently available in the pool for faster workstation startup.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "serviceAccount": { + "description": "Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logginglogEntries.create` permission on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have permissions to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.", + "type": "string" + }, + "shieldedInstanceConfig": { + "$ref": "GceShieldedInstanceConfig", + "description": "Optional. A set of Compute Engine Shielded instance options." + }, + "tags": { + "description": "Optional. Network tags to add to the Compute Engine VMs backing the workstations. This option applies [network tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs created with this configuration. These network tags enable the creation of [firewall rules](https://cloud.google.com/workstations/docs/configure-firewall-rules).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GceRegionalPersistentDisk": { + "description": "A PersistentDirectory backed by a Compute Engine regional persistent disk. The persistent_directories field is repeated, but it may contain only one entry. It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that mounts to the workstation VM at `/home` when the session starts and detaches when the session ends. If this field is empty, workstations created with this configuration do not have a persistent home directory.", + "id": "GceRegionalPersistentDisk", + "properties": { + "diskType": { + "description": "Optional. The [type of the persistent disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `\"pd-standard\"`.", + "type": "string" + }, + "fsType": { + "description": "Optional. Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if source_snapshot is set. Defaults to `\"ext4\"`.", + "type": "string" + }, + "reclaimPolicy": { + "description": "Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.", + "enum": [ + "RECLAIM_POLICY_UNSPECIFIED", + "DELETE", + "RETAIN" + ], + "enumDescriptions": [ + "Do not use.", + "Delete the persistent disk when deleting the workstation.", + "Keep the persistent disk when deleting the workstation. An administrator must manually delete the disk." + ], + "type": "string" + }, + "sizeGb": { + "description": "Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`. If less than `200` GB, the disk_type must be `\"pd-balanced\"` or `\"pd-ssd\"`.", + "format": "int32", + "type": "integer" + }, + "sourceSnapshot": { + "description": "Optional. Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty.", + "type": "string" + } + }, + "type": "object" + }, + "GceShieldedInstanceConfig": { + "description": "A set of Compute Engine Shielded instance options.", + "id": "GceShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Optional. Whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableSecureBoot": { + "description": "Optional. Whether the instance has Secure Boot enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Whether the instance has the vTPM enabled.", + "type": "boolean" + } + }, + "type": "object" + }, + "GenerateAccessTokenRequest": { + "description": "Request message for GenerateAccessToken.", + "id": "GenerateAccessTokenRequest", + "properties": { + "expireTime": { + "description": "Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token's expiration time will be set to a default value of 1 hour in the future.", + "format": "google-datetime", + "type": "string" + }, + "ttl": { + "description": "Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token's lifetime will be set to a default value of 1 hour.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GenerateAccessTokenResponse": { + "description": "Response message for GenerateAccessToken.", + "id": "GenerateAccessTokenResponse", + "properties": { + "accessToken": { + "description": "The generated bearer access token. To use this token, include it in an Authorization header of an HTTP request sent to the associated workstation's hostname—for example, `Authorization: Bearer `.", + "type": "string" + }, + "expireTime": { + "description": "Time at which the generated token will expire.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "Host": { + "description": "Runtime host for a workstation.", + "id": "Host", + "properties": { + "gceInstance": { + "$ref": "GceInstance", + "description": "Specifies a Compute Engine instance as the host." + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsableWorkstationConfigsResponse": { + "description": "Response message for ListUsableWorkstationConfigs.", + "id": "ListUsableWorkstationConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstationConfigs": { + "description": "The requested configs.", + "items": { + "$ref": "WorkstationConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListUsableWorkstationsResponse": { + "description": "Response message for ListUsableWorkstations.", + "id": "ListUsableWorkstationsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstations": { + "description": "The requested workstations.", + "items": { + "$ref": "Workstation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkstationClustersResponse": { + "description": "Response message for ListWorkstationClusters.", + "id": "ListWorkstationClustersResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstationClusters": { + "description": "The requested workstation clusters.", + "items": { + "$ref": "WorkstationCluster" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkstationConfigsResponse": { + "description": "Response message for ListWorkstationConfigs.", + "id": "ListWorkstationConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstationConfigs": { + "description": "The requested configs.", + "items": { + "$ref": "WorkstationConfig" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListWorkstationsResponse": { + "description": "Response message for ListWorkstations.", + "id": "ListWorkstationsResponse", + "properties": { + "nextPageToken": { + "description": "Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Optional. Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workstations": { + "description": "The requested workstations.", + "items": { + "$ref": "Workstation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Metadata for long-running operations.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Time that the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. Time that the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PersistentDirectory": { + "description": "A directory to persist across workstation sessions.", + "id": "PersistentDirectory", + "properties": { + "gcePd": { + "$ref": "GceRegionalPersistentDisk", + "description": "A PersistentDirectory backed by a Compute Engine persistent disk." + }, + "mountPath": { + "description": "Optional. Location of this directory in the running workstation.", + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PrivateClusterConfig": { + "description": "Configuration options for private workstation clusters.", + "id": "PrivateClusterConfig", + "properties": { + "allowedProjects": { + "description": "Optional. Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.", + "items": { + "type": "string" + }, + "type": "array" + }, + "clusterHostname": { + "description": "Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the workstation cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.", + "readOnly": true, + "type": "string" + }, + "enablePrivateEndpoint": { + "description": "Immutable. Whether Workstations endpoint is private.", + "type": "boolean" + }, + "serviceAttachmentUri": { + "description": "Output only. Service attachment URI for the workstation cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the workstation cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ReadinessCheck": { + "description": "A readiness check to be performed on a workstation.", + "id": "ReadinessCheck", + "properties": { + "path": { + "description": "Optional. Path to which the request should be sent.", + "type": "string" + }, + "port": { + "description": "Optional. Port to which the request should be sent.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "StartWorkstationRequest": { + "description": "Request message for StartWorkstation.", + "id": "StartWorkstationRequest", + "properties": { + "etag": { + "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "type": "boolean" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StopWorkstationRequest": { + "description": "Request message for StopWorkstation.", + "id": "StopWorkstationRequest", + "properties": { + "etag": { + "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + "type": "boolean" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Workstation": { + "description": "A single instance of a developer workstation with its own persistent storage.", + "id": "Workstation", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Client-specified annotations.", + "type": "object" + }, + "createTime": { + "description": "Output only. Time when this workstation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "deleteTime": { + "description": "Output only. Time when this workstation was soft-deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. Human-readable name for this workstation.", + "type": "string" + }, + "etag": { + "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "host": { + "description": "Output only. Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format `{port}-{host}`.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation and that are also propagated to the underlying Compute Engine resources.", + "type": "object" + }, + "name": { + "description": "Full name of this workstation.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Indicates whether this workstation is currently being updated to match its intended state.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. Current state of the workstation.", + "enum": [ + "STATE_UNSPECIFIED", + "STATE_STARTING", + "STATE_RUNNING", + "STATE_STOPPING", + "STATE_STOPPED" + ], + "enumDescriptions": [ + "Do not use.", + "The workstation is not yet ready to accept requests from users but will be soon.", + "The workstation is ready to accept requests from users.", + "The workstation is being stopped.", + "The workstation is stopped and will not be able to receive requests until it is started." + ], + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for this workstation.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when this workstation was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkstationCluster": { + "description": "A workstation cluster resource in the Cloud Workstations API. Defines a group of workstations in a particular region and the VPC network they're attached to.", + "id": "WorkstationCluster", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Client-specified annotations.", + "type": "object" + }, + "conditions": { + "description": "Output only. Status conditions describing the workstation cluster's current state.", + "items": { + "$ref": "Status" + }, + "readOnly": true, + "type": "array" + }, + "controlPlaneIp": { + "description": "Output only. The private IP address of the control plane for this workstation cluster. Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Time when this workstation cluster was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "degraded": { + "description": "Output only. Whether this workstation cluster is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in conditions.", + "readOnly": true, + "type": "boolean" + }, + "deleteTime": { + "description": "Output only. Time when this workstation cluster was soft-deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. Human-readable name for this workstation cluster.", + "type": "string" + }, + "etag": { + "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation cluster and that are also propagated to the underlying Compute Engine resources.", + "type": "object" + }, + "name": { + "description": "Full name of this workstation cluster.", + "type": "string" + }, + "network": { + "description": "Immutable. Name of the Compute Engine network in which instances associated with this workstation cluster will be created.", + "type": "string" + }, + "privateClusterConfig": { + "$ref": "PrivateClusterConfig", + "description": "Optional. Configuration for private workstation cluster." + }, + "reconciling": { + "description": "Output only. Indicates whether this workstation cluster is currently being updated to match its intended state.", + "readOnly": true, + "type": "boolean" + }, + "subnetwork": { + "description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.", + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for this workstation cluster.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when this workstation cluster was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "WorkstationConfig": { + "description": "A workstation configuration resource in the Cloud Workstations API. Workstation configurations act as templates for workstations. The workstation configuration defines details such as the workstation virtual machine (VM) instance type, persistent storage, container image defining environment, which IDE or Code Editor to use, and more. Administrators and platform teams can also use [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to teams or to individual developers.", + "id": "WorkstationConfig", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Client-specified annotations.", + "type": "object" + }, + "conditions": { + "description": "Output only. Status conditions describing the current resource state.", + "items": { + "$ref": "Status" + }, + "readOnly": true, + "type": "array" + }, + "container": { + "$ref": "Container", + "description": "Optional. Container that runs upon startup for each workstation using this workstation configuration." + }, + "createTime": { + "description": "Output only. Time when this workstation configuration was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "degraded": { + "description": "Output only. Whether this resource is degraded, in which case it may require user action to restore full functionality. See also the conditions field.", + "readOnly": true, + "type": "boolean" + }, + "deleteTime": { + "description": "Output only. Time when this workstation configuration was soft-deleted.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. Human-readable name for this workstation configuration.", + "type": "string" + }, + "encryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "Immutable. Encrypts resources of this workstation configuration using a customer-managed encryption key (CMEK). If specified, the boot disk of the Compute Engine instance and the persistent disk are encrypted using this encryption key. If this field is not set, the disks are encrypted using a generated key. Customer-managed encryption keys do not protect disk metadata. If the customer-managed encryption key is rotated, when the workstation instance is stopped, the system attempts to recreate the persistent disk with the new version of the key. Be sure to keep older versions of the key until the persistent disk is recreated. Otherwise, data on the persistent disk might be lost. If the encryption key is revoked, the workstation session automatically stops within 7 hours. Immutable after the workstation configuration is created." + }, + "etag": { + "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", + "type": "string" + }, + "host": { + "$ref": "Host", + "description": "Optional. Runtime host for the workstation." + }, + "idleTimeout": { + "description": "Optional. Number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) terminated by `s` for seconds—for example, `\"7200s\"` (2 hours). The default is `\"1200s\"` (20 minutes).", + "format": "google-duration", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources.", + "type": "object" + }, + "name": { + "description": "Full name of this workstation configuration.", + "type": "string" + }, + "persistentDirectories": { + "description": "Optional. Directories to persist across workstation sessions.", + "items": { + "$ref": "PersistentDirectory" + }, + "type": "array" + }, + "readinessChecks": { + "description": "Optional. Readiness checks to perform when starting a workstation using this workstation configuration. Mark a workstation as running only after all specified readiness checks return 200 status codes.", + "items": { + "$ref": "ReadinessCheck" + }, + "type": "array" + }, + "reconciling": { + "description": "Output only. Indicates whether this workstation configuration is currently being updated to match its intended state.", + "readOnly": true, + "type": "boolean" + }, + "runningTimeout": { + "description": "Optional. Number of seconds that a workstation can run until it is automatically shut down. We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart. The idle_timeout and running_timeout fields are independent of each other. Note that the running_timeout field shuts down VMs after the specified time, regardless of whether or not the VMs are idle. Provide duration terminated by `s` for seconds—for example, `\"54000s\"` (15 hours). Defaults to `\"43200s\"` (12 hours). A value of `\"0s\"` indicates that workstations using this configuration should never time out. If encryption_key is set, it must be greater than `\"0s\"` and less than `\"86400s\"` (24 hours). Warning: A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration have no maximum running time. This is strongly discouraged because you incur costs and will not pick up security updates.", + "format": "google-duration", + "type": "string" + }, + "uid": { + "description": "Output only. A system-assigned unique identifier for this workstation configuration.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time when this workstation configuration was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Workstations API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go new file mode 100644 index 00000000000..d9decbcae71 --- /dev/null +++ b/workstations/v1/workstations-gen.go @@ -0,0 +1,7462 @@ +// Copyright 2023 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package workstations provides access to the Cloud Workstations API. +// +// For product documentation, see: https://cloud.google.com/workstations +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/workstations/v1" +// ... +// ctx := context.Background() +// workstationsService, err := workstations.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// workstationsService, err := workstations.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// workstationsService, err := workstations.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package workstations // import "google.golang.org/api/workstations/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "workstations:v1" +const apiName = "workstations" +const apiVersion = "v1" +const basePath = "https://workstations.googleapis.com/" +const mtlsBasePath = "https://workstations.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.WorkstationClusters = NewProjectsLocationsWorkstationClustersService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Operations *ProjectsLocationsOperationsService + + WorkstationClusters *ProjectsLocationsWorkstationClustersService +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsWorkstationClustersService(s *Service) *ProjectsLocationsWorkstationClustersService { + rs := &ProjectsLocationsWorkstationClustersService{s: s} + rs.WorkstationConfigs = NewProjectsLocationsWorkstationClustersWorkstationConfigsService(s) + return rs +} + +type ProjectsLocationsWorkstationClustersService struct { + s *Service + + WorkstationConfigs *ProjectsLocationsWorkstationClustersWorkstationConfigsService +} + +func NewProjectsLocationsWorkstationClustersWorkstationConfigsService(s *Service) *ProjectsLocationsWorkstationClustersWorkstationConfigsService { + rs := &ProjectsLocationsWorkstationClustersWorkstationConfigsService{s: s} + rs.Workstations = NewProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService(s) + return rs +} + +type ProjectsLocationsWorkstationClustersWorkstationConfigsService struct { + s *Service + + Workstations *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService +} + +func NewProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService(s *Service) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService { + rs := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService{s: s} + return rs +} + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Container: A Docker container. +type Container struct { + // Args: Optional. Arguments passed to the entrypoint. + Args []string `json:"args,omitempty"` + + // Command: Optional. If set, overrides the default ENTRYPOINT specified + // by the image. + Command []string `json:"command,omitempty"` + + // Env: Optional. Environment variables passed to the container's + // entrypoint. + Env map[string]string `json:"env,omitempty"` + + // Image: Optional. A Docker container image that defines a custom + // environment. Cloud Workstations provides a number of preconfigured + // images + // (https://cloud.google.com/workstations/docs/preconfigured-base-images), + // but you can create your own custom container images + // (https://cloud.google.com/workstations/docs/custom-container-images). + // If using a private image, the `host.gceInstance.serviceAccount` field + // must be specified in the workstation configuration and must have + // permission to pull the specified image. Otherwise, the image must be + // publicly accessible. + Image string `json:"image,omitempty"` + + // RunAsUser: Optional. If set, overrides the USER specified in the + // image with the given uid. + RunAsUser int64 `json:"runAsUser,omitempty"` + + // WorkingDir: Optional. If set, overrides the default DIR specified by + // the image. + WorkingDir string `json:"workingDir,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Args") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Args") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Container) MarshalJSON() ([]byte, error) { + type NoMethod Container + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomerEncryptionKey: A customer-managed encryption key (CMEK) for +// the Compute Engine resources of the associated workstation +// configuration. Specify the name of your Cloud KMS encryption key and +// the default service account. We recommend that you use a separate +// service account and follow Cloud KMS best practices +// (https://cloud.google.com/kms/docs/separation-of-duties). +type CustomerEncryptionKey struct { + // KmsKey: Immutable. The name of the Google Cloud KMS encryption key. + // For example, + // "projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KE + // Y_NAME". The key must be in the same region as the workstation + // configuration. + KmsKey string `json:"kmsKey,omitempty"` + + // KmsKeyServiceAccount: Immutable. The service account to use with the + // specified KMS key. We recommend that you use a separate service + // account and follow KMS best practices. For more information, see + // Separation of duties + // (https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud + // kms keys add-iam-policy-binding` `--member` + // (https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). + KmsKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "KmsKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KmsKey") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) { + type NoMethod CustomerEncryptionKey + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceConfidentialInstanceConfig: A set of Compute Engine Confidential +// VM instance options. +type GceConfidentialInstanceConfig struct { + // EnableConfidentialCompute: Optional. Whether the instance has + // confidential compute enabled. + EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableConfidentialCompute") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableConfidentialCompute") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GceConfidentialInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GceConfidentialInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceInstance: A runtime using a Compute Engine instance. +type GceInstance struct { + // BootDiskSizeGb: Optional. The size of the boot disk for the VM in + // gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to + // `50` GB. + BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` + + // ConfidentialInstanceConfig: Optional. A set of Compute Engine + // Confidential VM instance options. + ConfidentialInstanceConfig *GceConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"` + + // DisablePublicIpAddresses: Optional. When set to true, disables public + // IP addresses for VMs. If you disable public IP addresses, you must + // set up Private Google Access or Cloud NAT on your network. If you use + // Private Google Access and you use `private.googleapis.com` or + // `restricted.googleapis.com` for Container Registry and Artifact + // Registry, make sure that you set up DNS records for domains + // `*.gcr.io` and `*.pkg.dev`. Defaults to false (VMs have public IP + // addresses). + DisablePublicIpAddresses bool `json:"disablePublicIpAddresses,omitempty"` + + // EnableNestedVirtualization: Optional. Whether to enable nested + // virtualization on Cloud Workstations VMs created under this + // workstation configuration. Nested virtualization lets you run virtual + // machine (VM) instances inside your workstation. Before enabling + // nested virtualization, consider the following important + // considerations. Cloud Workstations instances are subject to the same + // restrictions as Compute Engine instances + // (https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): + // * **Organization policy**: projects, folders, or organizations may be + // restricted from creating nested VMs if the **Disable VM nested + // virtualization** constraint is enforced in the organization policy. + // For more information, see the Compute Engine section, Checking + // whether nested virtualization is allowed + // (https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). + // * **Performance**: nested VMs might experience a 10% or greater + // decrease in performance for workloads that are CPU-bound and possibly + // greater than a 10% decrease for workloads that are input/output + // bound. * **Machine Type**: nested virtualization can only be enabled + // on workstation configurations that specify a machine_type in the N1 + // or N2 machine series. * **GPUs**: nested virtualization may not be + // enabled on workstation configurations with accelerators. * + // **Operating System**: Because Container-Optimized OS + // (https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) + // does not support nested virtualization, when nested virtualization is + // enabled, the underlying Compute Engine VM instances boot from an + // Ubuntu LTS + // (https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) + // image. + EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` + + // MachineType: Optional. The type of machine to use for VM + // instances—for example, "e2-standard-4". For more information + // about machine types that Cloud Workstations supports, see the list of + // available machine types + // (https://cloud.google.com/workstations/docs/available-machine-types). + MachineType string `json:"machineType,omitempty"` + + // PoolSize: Optional. The number of VMs that the system should keep + // idle so that new workstations can be started quickly for new users. + // Defaults to `0` in the API. + PoolSize int64 `json:"poolSize,omitempty"` + + // PooledInstances: Output only. Number of instances currently available + // in the pool for faster workstation startup. + PooledInstances int64 `json:"pooledInstances,omitempty"` + + // ServiceAccount: Optional. The email address of the service account + // for Cloud Workstations VMs created with this configuration. When + // specified, be sure that the service account has + // `logginglogEntries.create` permission on the project so it can write + // logs out to Cloud Logging. If using a custom container image, the + // service account must have permissions to pull the specified image. If + // you as the administrator want to be able to `ssh` into the underlying + // VM, you need to set this value to a service account for which you + // have the `iam.serviceAccounts.actAs` permission. Conversely, if you + // don't want anyone to be able to `ssh` into the underlying VM, use a + // service account where no one has that permission. If not set, VMs run + // with a service account provided by the Cloud Workstations service, + // and the image must be publicly accessible. + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ShieldedInstanceConfig: Optional. A set of Compute Engine Shielded + // instance options. + ShieldedInstanceConfig *GceShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + + // Tags: Optional. Network tags to add to the Compute Engine VMs backing + // the workstations. This option applies network tags + // (https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs + // created with this configuration. These network tags enable the + // creation of firewall rules + // (https://cloud.google.com/workstations/docs/configure-firewall-rules). + Tags []string `json:"tags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BootDiskSizeGb") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GceInstance) MarshalJSON() ([]byte, error) { + type NoMethod GceInstance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceRegionalPersistentDisk: A PersistentDirectory backed by a Compute +// Engine regional persistent disk. The persistent_directories field is +// repeated, but it may contain only one entry. It creates a persistent +// disk (https://cloud.google.com/compute/docs/disks/persistent-disks) +// that mounts to the workstation VM at `/home` when the session starts +// and detaches when the session ends. If this field is empty, +// workstations created with this configuration do not have a persistent +// home directory. +type GceRegionalPersistentDisk struct { + // DiskType: Optional. The type of the persistent disk + // (https://cloud.google.com/compute/docs/disks#disk-types) for the home + // directory. Defaults to "pd-standard". + DiskType string `json:"diskType,omitempty"` + + // FsType: Optional. Type of file system that the disk should be + // formatted with. The workstation image must support this file system + // type. Must be empty if source_snapshot is set. Defaults to "ext4". + FsType string `json:"fsType,omitempty"` + + // ReclaimPolicy: Optional. Whether the persistent disk should be + // deleted when the workstation is deleted. Valid values are `DELETE` + // and `RETAIN`. Defaults to `DELETE`. + // + // Possible values: + // "RECLAIM_POLICY_UNSPECIFIED" - Do not use. + // "DELETE" - Delete the persistent disk when deleting the + // workstation. + // "RETAIN" - Keep the persistent disk when deleting the workstation. + // An administrator must manually delete the disk. + ReclaimPolicy string `json:"reclaimPolicy,omitempty"` + + // SizeGb: Optional. The GB capacity of a persistent home directory for + // each workstation created with this configuration. Must be empty if + // source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, + // `500`, or `1000`. Defaults to `200`. If less than `200` GB, the + // disk_type must be "pd-balanced" or "pd-ssd". + SizeGb int64 `json:"sizeGb,omitempty"` + + // SourceSnapshot: Optional. Name of the snapshot to use as the source + // for the disk. If set, size_gb and fs_type must be empty. + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GceRegionalPersistentDisk) MarshalJSON() ([]byte, error) { + type NoMethod GceRegionalPersistentDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GceShieldedInstanceConfig: A set of Compute Engine Shielded instance +// options. +type GceShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Optional. Whether the instance has + // integrity monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + + // EnableSecureBoot: Optional. Whether the instance has Secure Boot + // enabled. + EnableSecureBoot bool `json:"enableSecureBoot,omitempty"` + + // EnableVtpm: Optional. Whether the instance has the vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableIntegrityMonitoring") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GceShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GceShieldedInstanceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateAccessTokenRequest: Request message for GenerateAccessToken. +type GenerateAccessTokenRequest struct { + // ExpireTime: Desired expiration time of the access token. This value + // must be at most 24 hours in the future. If a value is not specified, + // the token's expiration time will be set to a default value of 1 hour + // in the future. + ExpireTime string `json:"expireTime,omitempty"` + + // Ttl: Desired lifetime duration of the access token. This value must + // be at most 24 hours. If a value is not specified, the token's + // lifetime will be set to a default value of 1 hour. + Ttl string `json:"ttl,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpireTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpireTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateAccessTokenRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateAccessTokenRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateAccessTokenResponse: Response message for +// GenerateAccessToken. +type GenerateAccessTokenResponse struct { + // AccessToken: The generated bearer access token. To use this token, + // include it in an Authorization header of an HTTP request sent to the + // associated workstation's hostname—for example, `Authorization: + // Bearer `. + AccessToken string `json:"accessToken,omitempty"` + + // ExpireTime: Time at which the generated token will expire. + ExpireTime string `json:"expireTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AccessToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateAccessTokenResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateAccessTokenResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Host: Runtime host for a workstation. +type Host struct { + // GceInstance: Specifies a Compute Engine instance as the host. + GceInstance *GceInstance `json:"gceInstance,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GceInstance") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GceInstance") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Host) MarshalJSON() ([]byte, error) { + type NoMethod Host + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsableWorkstationConfigsResponse: Response message for +// ListUsableWorkstationConfigs. +type ListUsableWorkstationConfigsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkstationConfigs: The requested configs. + WorkstationConfigs []*WorkstationConfig `json:"workstationConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListUsableWorkstationConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsableWorkstationConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListUsableWorkstationsResponse: Response message for +// ListUsableWorkstations. +type ListUsableWorkstationsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // Workstations: The requested workstations. + Workstations []*Workstation `json:"workstations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListUsableWorkstationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListUsableWorkstationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkstationClustersResponse: Response message for +// ListWorkstationClusters. +type ListWorkstationClustersResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkstationClusters: The requested workstation clusters. + WorkstationClusters []*WorkstationCluster `json:"workstationClusters,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkstationClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkstationClustersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkstationConfigsResponse: Response message for +// ListWorkstationConfigs. +type ListWorkstationConfigsResponse struct { + // NextPageToken: Token to retrieve the next page of results, or empty + // if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // WorkstationConfigs: The requested configs. + WorkstationConfigs []*WorkstationConfig `json:"workstationConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkstationConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkstationConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListWorkstationsResponse: Response message for ListWorkstations. +type ListWorkstationsResponse struct { + // NextPageToken: Optional. Token to retrieve the next page of results, + // or empty if there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Optional. Unreachable resources. + Unreachable []string `json:"unreachable,omitempty"` + + // Workstations: The requested workstations. + Workstations []*Workstation `json:"workstations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkstationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkstationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Metadata for long-running operations. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. Time that the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. Time that the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PersistentDirectory: A directory to persist across workstation +// sessions. +type PersistentDirectory struct { + // GcePd: A PersistentDirectory backed by a Compute Engine persistent + // disk. + GcePd *GceRegionalPersistentDisk `json:"gcePd,omitempty"` + + // MountPath: Optional. Location of this directory in the running + // workstation. + MountPath string `json:"mountPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcePd") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcePd") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PersistentDirectory) MarshalJSON() ([]byte, error) { + type NoMethod PersistentDirectory + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** ``` { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PrivateClusterConfig: Configuration options for private workstation +// clusters. +type PrivateClusterConfig struct { + // AllowedProjects: Optional. Additional projects that are allowed to + // attach to the workstation cluster's service attachment. By default, + // the workstation cluster's project and the VPC host project (if + // different) are allowed. + AllowedProjects []string `json:"allowedProjects,omitempty"` + + // ClusterHostname: Output only. Hostname for the workstation cluster. + // This field will be populated only when private endpoint is enabled. + // To access workstations in the workstation cluster, create a new DNS + // zone mapping this domain name to an internal IP address and a + // forwarding rule mapping that address to the service attachment. + ClusterHostname string `json:"clusterHostname,omitempty"` + + // EnablePrivateEndpoint: Immutable. Whether Workstations endpoint is + // private. + EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty"` + + // ServiceAttachmentUri: Output only. Service attachment URI for the + // workstation cluster. The service attachemnt is created when private + // endpoint is enabled. To access workstations in the workstation + // cluster, configure access to the managed service using Private + // Service Connect + // (https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedProjects") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedProjects") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *PrivateClusterConfig) MarshalJSON() ([]byte, error) { + type NoMethod PrivateClusterConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReadinessCheck: A readiness check to be performed on a workstation. +type ReadinessCheck struct { + // Path: Optional. Path to which the request should be sent. + Path string `json:"path,omitempty"` + + // Port: Optional. Port to which the request should be sent. + Port int64 `json:"port,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Path") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Path") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { + type NoMethod ReadinessCheck + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StartWorkstationRequest: Request message for StartWorkstation. +type StartWorkstationRequest struct { + // Etag: Optional. If set, the request will be rejected if the latest + // version of the workstation on the server does not have this ETag. + Etag string `json:"etag,omitempty"` + + // ValidateOnly: Optional. If set, validate the request and preview the + // review, but do not actually apply it. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StartWorkstationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StartWorkstationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StopWorkstationRequest: Request message for StopWorkstation. +type StopWorkstationRequest struct { + // Etag: Optional. If set, the request will be rejected if the latest + // version of the workstation on the server does not have this ETag. + Etag string `json:"etag,omitempty"` + + // ValidateOnly: Optional. If set, validate the request and preview the + // review, but do not actually apply it. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StopWorkstationRequest) MarshalJSON() ([]byte, error) { + type NoMethod StopWorkstationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Workstation: A single instance of a developer workstation with its +// own persistent storage. +type Workstation struct { + // Annotations: Optional. Client-specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + + // CreateTime: Output only. Time when this workstation was created. + CreateTime string `json:"createTime,omitempty"` + + // DeleteTime: Output only. Time when this workstation was soft-deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Optional. Human-readable name for this workstation. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Optional. Checksum computed by the server. May be sent on + // update and delete requests to make sure that the client has an + // up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Host: Output only. Host to which clients can send HTTPS traffic that + // will be received by the workstation. Authorized traffic will be + // received to the workstation as HTTP on port 80. To send traffic to a + // different port, clients may prefix the host with the destination port + // in the format `{port}-{host}`. + Host string `json:"host,omitempty"` + + // Labels: Optional. Labels + // (https://cloud.google.com/workstations/docs/label-resources) that are + // applied to the workstation and that are also propagated to the + // underlying Compute Engine resources. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Full name of this workstation. + Name string `json:"name,omitempty"` + + // Reconciling: Output only. Indicates whether this workstation is + // currently being updated to match its intended state. + Reconciling bool `json:"reconciling,omitempty"` + + // State: Output only. Current state of the workstation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Do not use. + // "STATE_STARTING" - The workstation is not yet ready to accept + // requests from users but will be soon. + // "STATE_RUNNING" - The workstation is ready to accept requests from + // users. + // "STATE_STOPPING" - The workstation is being stopped. + // "STATE_STOPPED" - The workstation is stopped and will not be able + // to receive requests until it is started. + State string `json:"state,omitempty"` + + // Uid: Output only. A system-assigned unique identifier for this + // workstation. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time when this workstation was most recently + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Workstation) MarshalJSON() ([]byte, error) { + type NoMethod Workstation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkstationCluster: A workstation cluster resource in the Cloud +// Workstations API. Defines a group of workstations in a particular +// region and the VPC network they're attached to. +type WorkstationCluster struct { + // Annotations: Optional. Client-specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + + // Conditions: Output only. Status conditions describing the workstation + // cluster's current state. + Conditions []*Status `json:"conditions,omitempty"` + + // ControlPlaneIp: Output only. The private IP address of the control + // plane for this workstation cluster. Workstation VMs need access to + // this IP address to work with the service, so make sure that your + // firewall rules allow egress from the workstation VMs to this address. + ControlPlaneIp string `json:"controlPlaneIp,omitempty"` + + // CreateTime: Output only. Time when this workstation cluster was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Degraded: Output only. Whether this workstation cluster is in + // degraded mode, in which case it may require user action to restore + // full functionality. Details can be found in conditions. + Degraded bool `json:"degraded,omitempty"` + + // DeleteTime: Output only. Time when this workstation cluster was + // soft-deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Optional. Human-readable name for this workstation + // cluster. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Optional. Checksum computed by the server. May be sent on + // update and delete requests to make sure that the client has an + // up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Labels: Optional. Labels + // (https://cloud.google.com/workstations/docs/label-resources) that are + // applied to the workstation cluster and that are also propagated to + // the underlying Compute Engine resources. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Full name of this workstation cluster. + Name string `json:"name,omitempty"` + + // Network: Immutable. Name of the Compute Engine network in which + // instances associated with this workstation cluster will be created. + Network string `json:"network,omitempty"` + + // PrivateClusterConfig: Optional. Configuration for private workstation + // cluster. + PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` + + // Reconciling: Output only. Indicates whether this workstation cluster + // is currently being updated to match its intended state. + Reconciling bool `json:"reconciling,omitempty"` + + // Subnetwork: Immutable. Name of the Compute Engine subnetwork in which + // instances associated with this workstation cluster will be created. + // Must be part of the subnetwork specified for this workstation + // cluster. + Subnetwork string `json:"subnetwork,omitempty"` + + // Uid: Output only. A system-assigned unique identifier for this + // workstation cluster. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time when this workstation cluster was most + // recently updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkstationCluster) MarshalJSON() ([]byte, error) { + type NoMethod WorkstationCluster + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkstationConfig: A workstation configuration resource in the Cloud +// Workstations API. Workstation configurations act as templates for +// workstations. The workstation configuration defines details such as +// the workstation virtual machine (VM) instance type, persistent +// storage, container image defining environment, which IDE or Code +// Editor to use, and more. Administrators and platform teams can also +// use Identity and Access Management (IAM) +// (https://cloud.google.com/iam/docs/overview) rules to grant access to +// teams or to individual developers. +type WorkstationConfig struct { + // Annotations: Optional. Client-specified annotations. + Annotations map[string]string `json:"annotations,omitempty"` + + // Conditions: Output only. Status conditions describing the current + // resource state. + Conditions []*Status `json:"conditions,omitempty"` + + // Container: Optional. Container that runs upon startup for each + // workstation using this workstation configuration. + Container *Container `json:"container,omitempty"` + + // CreateTime: Output only. Time when this workstation configuration was + // created. + CreateTime string `json:"createTime,omitempty"` + + // Degraded: Output only. Whether this resource is degraded, in which + // case it may require user action to restore full functionality. See + // also the conditions field. + Degraded bool `json:"degraded,omitempty"` + + // DeleteTime: Output only. Time when this workstation configuration was + // soft-deleted. + DeleteTime string `json:"deleteTime,omitempty"` + + // DisplayName: Optional. Human-readable name for this workstation + // configuration. + DisplayName string `json:"displayName,omitempty"` + + // EncryptionKey: Immutable. Encrypts resources of this workstation + // configuration using a customer-managed encryption key (CMEK). If + // specified, the boot disk of the Compute Engine instance and the + // persistent disk are encrypted using this encryption key. If this + // field is not set, the disks are encrypted using a generated key. + // Customer-managed encryption keys do not protect disk metadata. If the + // customer-managed encryption key is rotated, when the workstation + // instance is stopped, the system attempts to recreate the persistent + // disk with the new version of the key. Be sure to keep older versions + // of the key until the persistent disk is recreated. Otherwise, data on + // the persistent disk might be lost. If the encryption key is revoked, + // the workstation session automatically stops within 7 hours. Immutable + // after the workstation configuration is created. + EncryptionKey *CustomerEncryptionKey `json:"encryptionKey,omitempty"` + + // Etag: Optional. Checksum computed by the server. May be sent on + // update and delete requests to make sure that the client has an + // up-to-date value before proceeding. + Etag string `json:"etag,omitempty"` + + // Host: Optional. Runtime host for the workstation. + Host *Host `json:"host,omitempty"` + + // IdleTimeout: Optional. Number of seconds to wait before automatically + // stopping a workstation after it last received user traffic. A value + // of "0s" indicates that Cloud Workstations VMs created with this + // configuration should never time out due to idleness. Provide duration + // (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) + // terminated by `s` for seconds—for example, "7200s" (2 hours). The + // default is "1200s" (20 minutes). + IdleTimeout string `json:"idleTimeout,omitempty"` + + // Labels: Optional. Labels + // (https://cloud.google.com/workstations/docs/label-resources) that are + // applied to the workstation configuration and that are also propagated + // to the underlying Compute Engine resources. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Full name of this workstation configuration. + Name string `json:"name,omitempty"` + + // PersistentDirectories: Optional. Directories to persist across + // workstation sessions. + PersistentDirectories []*PersistentDirectory `json:"persistentDirectories,omitempty"` + + // ReadinessChecks: Optional. Readiness checks to perform when starting + // a workstation using this workstation configuration. Mark a + // workstation as running only after all specified readiness checks + // return 200 status codes. + ReadinessChecks []*ReadinessCheck `json:"readinessChecks,omitempty"` + + // Reconciling: Output only. Indicates whether this workstation + // configuration is currently being updated to match its intended state. + Reconciling bool `json:"reconciling,omitempty"` + + // RunningTimeout: Optional. Number of seconds that a workstation can + // run until it is automatically shut down. We recommend that + // workstations be shut down daily to reduce costs and so that security + // updates can be applied upon restart. The idle_timeout and + // running_timeout fields are independent of each other. Note that the + // running_timeout field shuts down VMs after the specified time, + // regardless of whether or not the VMs are idle. Provide duration + // terminated by `s` for seconds—for example, "54000s" (15 hours). + // Defaults to "43200s" (12 hours). A value of "0s" indicates that + // workstations using this configuration should never time out. If + // encryption_key is set, it must be greater than "0s" and less than + // "86400s" (24 hours). Warning: A value of "0s" indicates that + // Cloud Workstations VMs created with this configuration have no + // maximum running time. This is strongly discouraged because you incur + // costs and will not pick up security updates. + RunningTimeout string `json:"runningTimeout,omitempty"` + + // Uid: Output only. A system-assigned unique identifier for this + // workstation configuration. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. Time when this workstation configuration was + // most recently updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkstationConfig) MarshalJSON() ([]byte, error) { + type NoMethod WorkstationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "workstations.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.cancel" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.create": + +type ProjectsLocationsWorkstationClustersCreateCall struct { + s *Service + parent string + workstationcluster *WorkstationCluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new workstation cluster. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersService) Create(parent string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersCreateCall { + c := &ProjectsLocationsWorkstationClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workstationcluster = workstationcluster + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// WorkstationClusterId sets the optional parameter +// "workstationClusterId": Required. ID to use for the workstation +// cluster. +func (c *ProjectsLocationsWorkstationClustersCreateCall) WorkstationClusterId(workstationClusterId string) *ProjectsLocationsWorkstationClustersCreateCall { + c.urlParams_.Set("workstationClusterId", workstationClusterId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationcluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationClusters") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new workstation cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // }, + // "workstationClusterId": { + // "description": "Required. ID to use for the workstation cluster.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstationClusters", + // "request": { + // "$ref": "WorkstationCluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.delete": + +type ProjectsLocationsWorkstationClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified workstation cluster. +// +// - name: Name of the workstation cluster to delete. +func (r *ProjectsLocationsWorkstationClustersService) Delete(name string) *ProjectsLocationsWorkstationClustersDeleteCall { + c := &ProjectsLocationsWorkstationClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If set, the request will be +// rejected if the latest version of the workstation cluster on the +// server does not have this ETag. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": If set, any workstation +// configurations and workstations in the workstation cluster are also +// deleted. Otherwise, the request only works if the workstation cluster +// has no configurations or workstations. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Force(force bool) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not apply it. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified workstation cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.workstationClusters.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the workstation cluster to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.get": + +type ProjectsLocationsWorkstationClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested workstation cluster. +// +// - name: Name of the requested resource. +func (r *ProjectsLocationsWorkstationClustersService) Get(name string) *ProjectsLocationsWorkstationClustersGetCall { + c := &ProjectsLocationsWorkstationClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.get" call. +// Exactly one of *WorkstationCluster or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *WorkstationCluster.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersGetCall) Do(opts ...googleapi.CallOption) (*WorkstationCluster, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &WorkstationCluster{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested workstation cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the requested resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "WorkstationCluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.list": + +type ProjectsLocationsWorkstationClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all workstation clusters in the specified location. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersService) List(parent string) *ProjectsLocationsWorkstationClustersListCall { + c := &ProjectsLocationsWorkstationClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationClusters") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.list" call. +// Exactly one of *ListWorkstationClustersResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListWorkstationClustersResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationClustersResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListWorkstationClustersResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all workstation clusters in the specified location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstationClusters", + // "response": { + // "$ref": "ListWorkstationClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersListCall) Pages(ctx context.Context, f func(*ListWorkstationClustersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.patch": + +type ProjectsLocationsWorkstationClustersPatchCall struct { + s *Service + name string + workstationcluster *WorkstationCluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing workstation cluster. +// +// - name: Full name of this workstation cluster. +func (r *ProjectsLocationsWorkstationClustersService) Patch(name string, workstationcluster *WorkstationCluster) *ProjectsLocationsWorkstationClustersPatchCall { + c := &ProjectsLocationsWorkstationClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workstationcluster = workstationcluster + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set, and +// the workstation cluster is not found, a new workstation cluster will +// be created. In this situation, update_mask is ignored. +func (c *ProjectsLocationsWorkstationClustersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// that specifies which fields in the workstation cluster should be +// updated. +func (c *ProjectsLocationsWorkstationClustersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationcluster) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing workstation cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", + // "httpMethod": "PATCH", + // "id": "workstations.projects.locations.workstationClusters.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Full name of this workstation cluster.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask that specifies which fields in the workstation cluster should be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "WorkstationCluster" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.create": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall struct { + s *Service + parent string + workstationconfig *WorkstationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new workstation configuration. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Create(parent string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workstationconfig = workstationconfig + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// WorkstationConfigId sets the optional parameter +// "workstationConfigId": Required. ID to use for the workstation +// configuration. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) WorkstationConfigId(workstationConfigId string) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.urlParams_.Set("workstationConfigId", workstationConfigId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new workstation configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // }, + // "workstationConfigId": { + // "description": "Required. ID to use for the workstation configuration.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstationConfigs", + // "request": { + // "$ref": "WorkstationConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.delete": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified workstation configuration. +// +// - name: Name of the workstation configuration to delete. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Delete(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If set, the request is +// rejected if the latest version of the workstation configuration on +// the server does not have this ETag. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Force sets the optional parameter "force": If set, any workstations +// in the workstation configuration are also deleted. Otherwise, the +// request works only if the workstation configuration has no +// workstations. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Force(force bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified workstation configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", + // "location": "query", + // "type": "string" + // }, + // "force": { + // "description": "Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of the workstation configuration to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.get": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested workstation configuration. +// +// - name: Name of the requested resource. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Get(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.get" call. +// Exactly one of *WorkstationConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *WorkstationConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetCall) Do(opts ...googleapi.CallOption) (*WorkstationConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &WorkstationConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested workstation configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the requested resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "WorkstationConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) GetIamPolicy(resource string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.list": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all workstation configurations in the specified +// cluster. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) List(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.list" call. +// Exactly one of *ListWorkstationConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListWorkstationConfigsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListWorkstationConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all workstation configurations in the specified cluster.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstationConfigs", + // "response": { + // "$ref": "ListWorkstationConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListCall) Pages(ctx context.Context, f func(*ListWorkstationConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Returns all workstation configurations in the specified +// cluster on which the caller has the "workstations.workstation.create" +// permission. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) ListUsable(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstationConfigs:listUsable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable" call. +// Exactly one of *ListUsableWorkstationConfigsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListUsableWorkstationConfigsResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Do(opts ...googleapi.CallOption) (*ListUsableWorkstationConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListUsableWorkstationConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all workstation configurations in the specified cluster on which the caller has the \"workstations.workstation.create\" permission.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs:listUsable", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstationConfigs:listUsable", + // "response": { + // "$ref": "ListUsableWorkstationConfigsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsListUsableCall) Pages(ctx context.Context, f func(*ListUsableWorkstationConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.patch": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall struct { + s *Service + name string + workstationconfig *WorkstationConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing workstation configuration. +// +// - name: Full name of this workstation configuration. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) Patch(name string, workstationconfig *WorkstationConfig) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workstationconfig = workstationconfig + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set and +// the workstation configuration is not found, a new workstation +// configuration will be created. In this situation, update_mask is +// ignored. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// specifying which fields in the workstation configuration should be +// updated. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstationconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing workstation configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", + // "httpMethod": "PATCH", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Full name of this workstation configuration.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask specifying which fields in the workstation configuration should be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "WorkstationConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall struct { + s *Service + parent string + workstation *Workstation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new workstation. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Create(parent string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.workstation = workstation + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// WorkstationId sets the optional parameter "workstationId": Required. +// ID to use for the workstation. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) WorkstationId(workstationId string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.urlParams_.Set("workstationId", workstationId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new workstation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // }, + // "workstationId": { + // "description": "Required. ID to use for the workstation.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstations", + // "request": { + // "$ref": "Workstation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified workstation. +// +// - name: Name of the workstation to delete. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Delete(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If set, the request will be +// rejected if the latest version of the workstation on the server does +// not have this ETag. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Etag(etag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified workstation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + // "httpMethod": "DELETE", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. Name of the workstation to delete.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall struct { + s *Service + workstation string + generateaccesstokenrequest *GenerateAccessTokenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateAccessToken: Returns a short-lived credential that can be +// used to send authenticated and authorized traffic to a workstation. +// +// - workstation: Name of the workstation for which the access token +// should be generated. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) GenerateAccessToken(workstation string, generateaccesstokenrequest *GenerateAccessTokenRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.workstation = workstation + c.generateaccesstokenrequest = generateaccesstokenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateaccesstokenrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+workstation}:generateAccessToken") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "workstation": c.workstation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken" call. +// Exactly one of *GenerateAccessTokenResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateAccessTokenResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateAccessTokenCall) Do(opts ...googleapi.CallOption) (*GenerateAccessTokenResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GenerateAccessTokenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", + // "parameterOrder": [ + // "workstation" + // ], + // "parameters": { + // "workstation": { + // "description": "Required. Name of the workstation for which the access token should be generated.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+workstation}:generateAccessToken", + // "request": { + // "$ref": "GenerateAccessTokenRequest" + // }, + // "response": { + // "$ref": "GenerateAccessTokenResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the requested workstation. +// +// - name: Name of the requested resource. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Get(name string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get" call. +// Exactly one of *Workstation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Workstation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetCall) Do(opts ...googleapi.CallOption) (*Workstation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Workstation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the requested workstation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the requested resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Workstation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) GetIamPolicy(resource string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns all Workstations using the specified workstation +// configuration. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) List(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list" call. +// Exactly one of *ListWorkstationsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListWorkstationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Do(opts ...googleapi.CallOption) (*ListWorkstationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListWorkstationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all Workstations using the specified workstation configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstations", + // "response": { + // "$ref": "ListWorkstationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListCall) Pages(ctx context.Context, f func(*ListWorkstationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListUsable: Returns all workstations using the specified workstation +// configuration on which the caller has the +// "workstations.workstations.use" permission. +// +// - parent: Parent resource name. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) ListUsable(parent string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) PageSize(pageSize int64) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": next_page_token +// value returned from a previous List request, if any. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) PageToken(pageToken string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workstations:listUsable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable" call. +// Exactly one of *ListUsableWorkstationsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListUsableWorkstationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Do(opts ...googleapi.CallOption) (*ListUsableWorkstationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListUsableWorkstationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns all workstations using the specified workstation configuration on which the caller has the \"workstations.workstations.use\" permission.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations:listUsable", + // "httpMethod": "GET", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of items to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. next_page_token value returned from a previous List request, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/workstations:listUsable", + // "response": { + // "$ref": "ListUsableWorkstationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsListUsableCall) Pages(ctx context.Context, f func(*ListUsableWorkstationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall struct { + s *Service + name string + workstation *Workstation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing workstation. +// +// - name: Full name of this workstation. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Patch(name string, workstation *Workstation) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.workstation = workstation + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set and +// the workstation configuration is not found, a new workstation +// configuration is created. In this situation, update_mask is ignored. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// specifying which fields in the workstation configuration should be +// updated. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validate the request and preview the review, but do not actually +// apply it. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.workstation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an existing workstation.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", + // "httpMethod": "PATCH", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Full name of this workstation.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask specifying which fields in the workstation configuration should be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Workstation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall struct { + s *Service + name string + startworkstationrequest *StartWorkstationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Start: Starts running a workstation so that users can connect to it. +// +// - name: Name of the workstation to start. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Start(name string, startworkstationrequest *StartWorkstationRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.startworkstationrequest = startworkstationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.startworkstationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts running a workstation so that users can connect to it.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:start", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the workstation to start.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:start", + // "request": { + // "$ref": "StartWorkstationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall struct { + s *Service + name string + stopworkstationrequest *StopWorkstationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Stop: Stops running a workstation, reducing costs. +// +// - name: Name of the workstation to stop. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) Stop(name string, stopworkstationrequest *StopWorkstationRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.stopworkstationrequest = stopworkstationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopworkstationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Stops running a workstation, reducing costs.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:stop", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the workstation to stop.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:stop", + // "request": { + // "$ref": "StopWorkstationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions": + +type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall { + c := &ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 72b07c0ff59..e0ee23b9b33 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://cloud.google.com/workstations // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,24 +28,26 @@ // ctx := context.Background() // workstationsService, err := workstations.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // workstationsService, err := workstations.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // workstationsService, err := workstations.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package workstations // import "google.golang.org/api/workstations/v1beta" import ( diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 6f34503dfa7..f34f6bda2ec 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -2793,6 +2793,20 @@ "location": "query", "type": "string" }, + "videoPaidProductPlacement": { + "enum": [ + "videoPaidProductPlacementUnspecified", + "any", + "true" + ], + "enumDescriptions": [ + "", + "Return all videos, paid product placement or not.", + "Restrict results to only videos with paid product placement." + ], + "location": "query", + "type": "string" + }, "videoSyndicated": { "description": "Filter on syndicated videos.", "enum": [ @@ -3833,7 +3847,7 @@ } } }, - "revision": "20230816", + "revision": "20230906", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -7446,10 +7460,10 @@ "description": "If set, automatic cuepoint insertion is paused until this timestamp (\"No Ad Zone\"). The value is specified in ISO 8601 format.", "type": "string" }, - "repeatInterval": { - "description": "Interval frequency that api uses to insert cuepoints automatically.", - "format": "google-duration", - "type": "string" + "repeatIntervalSecs": { + "description": "Interval frequency in seconds that api uses to insert cuepoints automatically.", + "format": "int32", + "type": "integer" }, "scheduleStrategy": { "description": "The strategy to use when scheduling cuepoints.", diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 13ec2de0f76..4366ecaa41a 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/youtube/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // youtubeService, err := youtube.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // youtubeService, err := youtube.NewService(ctx, option.WithScopes(youtube.YoutubepartnerChannelAuditScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // youtubeService, err := youtube.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // youtubeService, err := youtube.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package youtube // import "google.golang.org/api/youtube/v3" import ( @@ -4154,9 +4168,9 @@ type CuepointSchedule struct { // format. PauseAdsUntil string `json:"pauseAdsUntil,omitempty"` - // RepeatInterval: Interval frequency that api uses to insert cuepoints - // automatically. - RepeatInterval string `json:"repeatInterval,omitempty"` + // RepeatIntervalSecs: Interval frequency in seconds that api uses to + // insert cuepoints automatically. + RepeatIntervalSecs int64 `json:"repeatIntervalSecs,omitempty"` // ScheduleStrategy: The strategy to use when scheduling cuepoints. // @@ -20881,6 +20895,21 @@ func (c *SearchListCall) VideoLicense(videoLicense string) *SearchListCall { return c } +// VideoPaidProductPlacement sets the optional parameter +// "videoPaidProductPlacement": +// +// Possible values: +// +// "videoPaidProductPlacementUnspecified" +// "any" - Return all videos, paid product placement or not. +// "true" - Restrict results to only videos with paid product +// +// placement. +func (c *SearchListCall) VideoPaidProductPlacement(videoPaidProductPlacement string) *SearchListCall { + c.urlParams_.Set("videoPaidProductPlacement", videoPaidProductPlacement) + return c +} + // VideoSyndicated sets the optional parameter "videoSyndicated": Filter // on syndicated videos. // @@ -21286,6 +21315,20 @@ func (c *SearchListCall) Do(opts ...googleapi.CallOption) (*SearchListResponse, // "location": "query", // "type": "string" // }, + // "videoPaidProductPlacement": { + // "enum": [ + // "videoPaidProductPlacementUnspecified", + // "any", + // "true" + // ], + // "enumDescriptions": [ + // "", + // "Return all videos, paid product placement or not.", + // "Restrict results to only videos with paid product placement." + // ], + // "location": "query", + // "type": "string" + // }, // "videoSyndicated": { // "description": "Filter on syndicated videos.", // "enum": [ diff --git a/youtubeanalytics/v2/youtubeanalytics-gen.go b/youtubeanalytics/v2/youtubeanalytics-gen.go index 565024e1457..b645142cd71 100644 --- a/youtubeanalytics/v2/youtubeanalytics-gen.go +++ b/youtubeanalytics/v2/youtubeanalytics-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/youtube/analytics // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // youtubeanalyticsService, err := youtubeanalytics.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // youtubeanalyticsService, err := youtubeanalytics.NewService(ctx, option.WithScopes(youtubeanalytics.YtAnalyticsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // youtubeanalyticsService, err := youtubeanalytics.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // youtubeanalyticsService, err := youtubeanalytics.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package youtubeanalytics // import "google.golang.org/api/youtubeanalytics/v2" import ( diff --git a/youtubereporting/v1/youtubereporting-gen.go b/youtubereporting/v1/youtubereporting-gen.go index 445022dc836..739d95c01da 100644 --- a/youtubereporting/v1/youtubereporting-gen.go +++ b/youtubereporting/v1/youtubereporting-gen.go @@ -8,6 +8,17 @@ // // For product documentation, see: https://developers.google.com/youtube/reporting/v1/reports/ // +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// // # Creating a client // // Usage example: @@ -17,28 +28,31 @@ // ctx := context.Background() // youtubereportingService, err := youtubereporting.NewService(ctx) // -// In this example, Google Application Default Credentials are used for authentication. -// -// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. // // # Other authentication options // -// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: // // youtubereportingService, err := youtubereporting.NewService(ctx, option.WithScopes(youtubereporting.YtAnalyticsReadonlyScope)) // -// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: // // youtubereportingService, err := youtubereporting.NewService(ctx, option.WithAPIKey("AIza...")) // -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: // // config := &oauth2.Config{...} // // ... // token, err := config.Exchange(ctx, ...) // youtubereportingService, err := youtubereporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) // -// See https://godoc.org/google.golang.org/api/option/ for details on options. +// See [google.golang.org/api/option.ClientOption] for details on options. package youtubereporting // import "google.golang.org/api/youtubereporting/v1" import (