diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index cebc85a349e..c2feac876e6 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1290,7 +1290,7 @@ } } }, - "revision": "20240716", + "revision": "20240811", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1705,7 +1705,7 @@ "id": "EgressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through [EgressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", + "description": "A list of identities that are allowed access through [EgressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. For third-party identity, only single identities are supported and other identity types are not supported. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", "items": { "type": "string" }, @@ -1904,7 +1904,7 @@ "id": "IngressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through [IngressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", + "description": "A list of identities that are allowed access through [IngressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. For third-party identity, only single identities are supported and other identity types are not supported. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", "items": { "type": "string" }, diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index c656bcdada7..8485702a802 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -889,9 +889,11 @@ func (s DevicePolicy) MarshalJSON() ([]byte, error) { type EgressFrom struct { // Identities: A list of identities that are allowed access through // [EgressPolicy]. Identities can be an individual user, service account, - // Google group, or third-party identity. The `v1` identities that have the - // prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in - // https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported. + // Google group, or third-party identity. For third-party identity, only single + // identities are supported and other identity types are not supported. The + // `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and + // `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 + // are supported. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed access to // outside the perimeter. If left unspecified, then members of `identities` @@ -1229,9 +1231,11 @@ func (s GetPolicyOptions) MarshalJSON() ([]byte, error) { type IngressFrom struct { // Identities: A list of identities that are allowed access through // [IngressPolicy]. Identities can be an individual user, service account, - // Google group, or third-party identity. The `v1` identities that have the - // prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in - // https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported. + // Google group, or third-party identity. For third-party identity, only single + // identities are supported and other identity types are not supported. The + // `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and + // `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 + // are supported. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed access from // outside the perimeter. If left unspecified, then members of `identities` diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 84125b463e4..5aedd98ba62 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -4731,7 +4731,7 @@ } } }, - "revision": "20240806", + "revision": "20240814", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -8249,6 +8249,10 @@ "description": "Revocation context of the purchases.subscriptionsv2.revoke API.", "id": "RevocationContext", "properties": { + "fullRefund": { + "$ref": "RevocationContextFullRefund", + "description": "Optional. Used when users should be refunded the full amount of the latest order of the subscription." + }, "proratedRefund": { "$ref": "RevocationContextProratedRefund", "description": "Optional. Used when users should be refunded a prorated amount they paid for their subscription based on the amount of time remaining in a subscription." @@ -8256,6 +8260,12 @@ }, "type": "object" }, + "RevocationContextFullRefund": { + "description": "Used to determine if the refund type in the RevocationContext is a full refund.", + "id": "RevocationContextFullRefund", + "properties": {}, + "type": "object" + }, "RevocationContextProratedRefund": { "description": "Used to determine if the refund type in the RevocationContext is a prorated refund.", "id": "RevocationContextProratedRefund", diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 4fce2fefc03..1cd7d46787f 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -5351,19 +5351,22 @@ func (s ReviewsReplyResponse) MarshalJSON() ([]byte, error) { // RevocationContext: Revocation context of the // purchases.subscriptionsv2.revoke API. type RevocationContext struct { + // FullRefund: Optional. Used when users should be refunded the full amount of + // the latest order of the subscription. + FullRefund *RevocationContextFullRefund `json:"fullRefund,omitempty"` // ProratedRefund: Optional. Used when users should be refunded a prorated // amount they paid for their subscription based on the amount of time // remaining in a subscription. ProratedRefund *RevocationContextProratedRefund `json:"proratedRefund,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProratedRefund") to + // ForceSendFields is a list of field names (e.g. "FullRefund") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProratedRefund") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "FullRefund") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -5373,6 +5376,11 @@ func (s RevocationContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RevocationContextFullRefund: Used to determine if the refund type in the +// RevocationContext is a full refund. +type RevocationContextFullRefund struct { +} + // RevocationContextProratedRefund: Used to determine if the refund type in the // RevocationContext is a prorated refund. type RevocationContextProratedRefund struct { diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index fc1f9421ed2..5a36e98b61f 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -1598,7 +1598,7 @@ } } }, - "revision": "20240731", + "revision": "20240808", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -2433,17 +2433,6 @@ "format": "int32", "type": "integer" }, - "backupVault": { - "deprecated": true, - "description": "Optional. TODO b/341576760: Remove deprecated BV and Datasource field form BP and BPA once UI removed all dependencies on them Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}", - "type": "string" - }, - "backupVaultServiceAccount": { - "deprecated": true, - "description": "Output only. TODO b/341576760: Remove deprecated BV and Datasource field form BP and BPA once UI removed all dependencies on them Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.", - "readOnly": true, - "type": "string" - }, "ruleId": { "description": "Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is unique per `BackupPlan`.The `rule_id` must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.", "type": "string" @@ -4392,12 +4381,6 @@ "description": "Message for rules config info.", "id": "RuleConfigInfo", "properties": { - "dataSource": { - "deprecated": true, - "description": "Output only. TODO b/341576760: Remove deprecated BV and Datasource field form BP and BPA once UI removed all dependencies on them Output Only. Resource name of data source which will be used as storage location for backups taken by specified rule. Format : projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", - "readOnly": true, - "type": "string" - }, "lastBackupError": { "$ref": "Status", "description": "Output only. Output Only. google.rpc.Status object to store the last backup error.", diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 98b367901fc..3a1d57c3c80 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -1078,18 +1078,6 @@ type BackupRule struct { // will be kept. It is defined in “days”. The value should be greater than // or equal to minimum enforced retention of the backup vault. BackupRetentionDays int64 `json:"backupRetentionDays,omitempty"` - // BackupVault: Optional. TODO b/341576760: Remove deprecated BV and Datasource - // field form BP and BPA once UI removed all dependencies on them Required. - // Resource name of backup vault which will be used as storage location for - // backups. Format: - // projects/{project}/locations/{location}/backupVaults/{backupvault} - BackupVault string `json:"backupVault,omitempty"` - // BackupVaultServiceAccount: Output only. TODO b/341576760: Remove deprecated - // BV and Datasource field form BP and BPA once UI removed all dependencies on - // them Output only. The Google Cloud Platform Service Account to be used by - // the BackupVault for taking backups. Specify the email address of the Backup - // Vault Service Account. - BackupVaultServiceAccount string `json:"backupVaultServiceAccount,omitempty"` // RuleId: Required. Immutable. The unique id of this `BackupRule`. The // `rule_id` is unique per `BackupPlan`.The `rule_id` must start with a // lowercase letter followed by up to 62 lowercase letters, numbers, or @@ -3440,13 +3428,6 @@ func (s RestoreBackupRequest) MarshalJSON() ([]byte, error) { // RuleConfigInfo: Message for rules config info. type RuleConfigInfo struct { - // DataSource: Output only. TODO b/341576760: Remove deprecated BV and - // Datasource field form BP and BPA once UI removed all dependencies on them - // Output Only. Resource name of data source which will be used as storage - // location for backups taken by specified rule. Format : - // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSource - // s/{datasource} - DataSource string `json:"dataSource,omitempty"` // LastBackupError: Output only. Output Only. google.rpc.Status object to store // the last backup error. LastBackupError *Status `json:"lastBackupError,omitempty"` @@ -3465,15 +3446,15 @@ type RuleConfigInfo struct { LastSuccessfulBackupConsistencyTime string `json:"lastSuccessfulBackupConsistencyTime,omitempty"` // RuleId: Output only. Output Only. Backup Rule id fetched from backup plan. RuleId string `json:"ruleId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSource") to + // ForceSendFields is a list of field names (e.g. "LastBackupError") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "LastBackupError") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 29939fb380c..ff5c4dfc69e 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -1264,7 +1264,10 @@ "path": "v1alpha/{+name}:cancel", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaCancelSubscriptionResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "create": { "description": "Creates a new BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", @@ -1289,7 +1292,10 @@ }, "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "get": { "description": "Gets details of a single Subscription.", @@ -1311,7 +1317,10 @@ "path": "v1alpha/{+name}", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "list": { "description": "Lists Subscriptions in a given organization and location.", @@ -1344,7 +1353,10 @@ "path": "v1alpha/{+parent}/subscriptions", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "patch": { "description": "Updates an existing BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", @@ -1380,7 +1392,10 @@ }, "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "restart": { "description": "Restarts an existing BeyondCorp Enterprise Subscription in a given organization, that is scheduled for cancellation. Location will always be global as BeyondCorp subscriptions are per organization. Returns the timestamp for when the cancellation will become effective", @@ -1407,7 +1422,10 @@ "path": "v1alpha/{+name}:restart", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaRestartSubscriptionResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -3462,6 +3480,232 @@ } } }, + "global": { + "resources": { + "securityGateways": { + "resources": { + "applications": { + "methods": { + "create": { + "description": "Creates a new Application in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/applications", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.applications.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "applicationId": { + "description": "Optional. User-settable Hub resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent SecurityGateway using the form: `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+$", + "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 request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/applications", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Application.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/applications/{applicationsId}", + "httpMethod": "PATCH", + "id": "beyondcorp.projects.locations.global.securityGateways.applications.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/applications/[^/]+$", + "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 timed 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": "Required. Mutable fields include: display_name.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "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": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/applications/{applicationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.applications.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/global/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hubs": { + "methods": { + "create": { + "description": "Creates a new Hub in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.hubs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "hubId": { + "description": "Optional. User-settable Hub resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent SecurityGateway using the form: `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+$", + "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 request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/hubs", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Hub.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs/{hubsId}", + "httpMethod": "PATCH", + "id": "beyondcorp.projects.locations.global.securityGateways.hubs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/hubs/[^/]+$", + "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 timed 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": "Required. Mutable fields include: display_name.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "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": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs/{hubsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.hubs.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/global/securityGateways/[^/]+/hubs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, "insights": { "methods": { "configuredInsight": { @@ -4176,52 +4420,274 @@ "https://www.googleapis.com/auth/cloud-platform" ] } - } - } - } - } - } - } - }, - "revision": "20240802", - "rootUrl": "https://beyondcorp.googleapis.com/", - "schemas": { - "AllocatedConnection": { - "description": "Allocated connection of the AppGateway.", - "id": "AllocatedConnection", - "properties": { - "ingressPort": { - "description": "Required. The ingress port of an allocated connection", - "format": "int32", - "type": "integer" - }, - "pscUri": { - "description": "Required. The PSC uri of an allocated connection", - "type": "string" - } - }, - "type": "object" - }, - "AppGateway": { - "description": "A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be authorised for a single AppGateway.", - "id": "AppGateway", - "properties": { - "allocatedConnections": { - "description": "Output only. A list of connections allocated for the Gateway", - "items": { - "$ref": "AllocatedConnection" - }, - "readOnly": true, - "type": "array" - }, - "createTime": { - "description": "Output only. Timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed 64 characters.", + }, + "resources": { + "applications": { + "methods": { + "delete": { + "description": "Deletes a single Application.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}", + "httpMethod": "DELETE", + "id": "beyondcorp.projects.locations.securityGateways.applications.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/applications/[^/]+$", + "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" + }, + "validateOnly": { + "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Application.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.applications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Application using the form: `projects/{project_id}/locations/global/securityGateway/{security_gateway_id}/applications/{application_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Applications in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.applications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter specifying constraints of a list operation. All fields in the Hub message are supported. For example, the following query will return the Hub with displayName \"test-application\" For more information, please refer to https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous ListHubsRequest, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to which the resources belong. `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/applications", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hubs": { + "methods": { + "delete": { + "description": "Deletes a single Hub.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs/{hubsId}", + "httpMethod": "DELETE", + "id": "beyondcorp.projects.locations.securityGateways.hubs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/hubs/[^/]+$", + "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" + }, + "validateOnly": { + "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Hub.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs/{hubsId}", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.hubs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Hub using the form: `projects/{project_id}/locations/global/securityGateway/{security_gateway_id}/hubs/{hub_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/hubs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Hubs in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.hubs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter specifying constraints of a list operation. All fields in the Hub message are supported. For example, the following query will return the Hub with displayName \"test-hub\" For more information, please refer to https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous ListHubsRequest, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to which the resources belong. `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/hubs", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20240807", + "rootUrl": "https://beyondcorp.googleapis.com/", + "schemas": { + "AllocatedConnection": { + "description": "Allocated connection of the AppGateway.", + "id": "AllocatedConnection", + "properties": { + "ingressPort": { + "description": "Required. The ingress port of an allocated connection", + "format": "int32", + "type": "integer" + }, + "pscUri": { + "description": "Required. The PSC uri of an allocated connection", + "type": "string" + } + }, + "type": "object" + }, + "AppGateway": { + "description": "A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be authorised for a single AppGateway.", + "id": "AppGateway", + "properties": { + "allocatedConnections": { + "description": "Output only. A list of connections allocated for the Gateway", + "items": { + "$ref": "AllocatedConnection" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed 64 characters.", "type": "string" }, "hostType": { @@ -6357,6 +6823,197 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication": { + "description": "A Beyondcorp Application resource information.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication", + "properties": { + "applicationMatchFilter": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter", + "description": "Required. Application filter conditions associated with an application." + }, + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary user-provided name for the Route resource. Cannot exceed 64 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. Name of the resource.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the resource was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter": { + "description": "Match Criteria for Application Filtering.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter", + "properties": { + "matchConditions": { + "description": "Required. Match conditions for AND logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if all the conditions are met. The conditions can be one of the following combination (FQDN), (FQDN \u0026 PORTS), (IP_ADDRESS), (IP_ADDRESS \u0026 PORTS) EXAMPLES: FQDN - (\"*.abc.com\"), (\"xyz.abc.com\") FQDN and PORTS - (\"abc.com\" and \"22\"), (\"abc.com\" and \"22,33)\" etc IP_ADDRESS - (\"10.20.30.40\"), (\"100.20.30.40\") IP_ADDRESS and PORTS - (\"10.20.30.40\" and \"4\"), (\"10.20.30.40\" and \"4,5\")", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition": { + "description": "Match condition for idenfying the application.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition", + "properties": { + "fqdn": { + "description": "Optional. FQDN of the application.", + "type": "string" + }, + "ipAddress": { + "description": "Optional. IP Address of the application.", + "type": "string" + }, + "ports": { + "description": "Optional. Ports of the application.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub": { + "description": "A Beyondcorp Hub resource information.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub", + "properties": { + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary user-provided name for the Hub. Cannot exceed 64 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. Name of the resource.", + "type": "string" + }, + "natGatewayConfig": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig", + "description": "Required. NAT gateway setup to ensure enough NAT IP addresses are available to handle the traffic needed to access the applications. Allows to explicitly enable or disable the NAT in the Hub along with the total IPs allocated to handle the capacity limits." + }, + "state": { + "description": "Output only. The operational state of the Hub.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "UPDATING", + "DELETING", + "RUNNING", + "DOWN", + "ERROR" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Hub is being created.", + "Hub is being updated.", + "Hub is being deleted.", + "Hub is running.", + "Hub is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", + "Hub encountered an error and is in an indeterministic state." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the resource was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig": { + "description": "Represents the NAT Gateway configuration.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig", + "properties": { + "enableNatGateway": { + "description": "Optional. Explicitly enable or disable the NAT Gateway. This is defaulted to false until NAT Gateway configuration is fully supported and any request with a disable option will be rejected.", + "type": "boolean" + }, + "natIps": { + "description": "Output only. List of NAT IPs that will be used for establishing connection to the endpoints.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse": { + "description": "Message for response to listing Applications.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse", + "properties": { + "applications": { + "description": "A list of BeyondCorp Application in the project.", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "A list of locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse": { + "description": "Message for response to listing Hubs.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse", + "properties": { + "hubs": { + "description": "A list of BeyondCorp Hub in the project.", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "A list of locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse": { "description": "Message for response to listing SecurityGateways.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse", diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 2e0e2bb95e1..7645358032e 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -285,6 +285,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ClientGateways = NewProjectsLocationsClientGatewaysService(s) rs.Connections = NewProjectsLocationsConnectionsService(s) rs.Connectors = NewProjectsLocationsConnectorsService(s) + rs.Global = NewProjectsLocationsGlobalService(s) rs.Insights = NewProjectsLocationsInsightsService(s) rs.NetConnections = NewProjectsLocationsNetConnectionsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -313,6 +314,8 @@ type ProjectsLocationsService struct { Connectors *ProjectsLocationsConnectorsService + Global *ProjectsLocationsGlobalService + Insights *ProjectsLocationsInsightsService NetConnections *ProjectsLocationsNetConnectionsService @@ -403,6 +406,51 @@ type ProjectsLocationsConnectorsService struct { s *Service } +func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { + rs := &ProjectsLocationsGlobalService{s: s} + rs.SecurityGateways = NewProjectsLocationsGlobalSecurityGatewaysService(s) + return rs +} + +type ProjectsLocationsGlobalService struct { + s *Service + + SecurityGateways *ProjectsLocationsGlobalSecurityGatewaysService +} + +func NewProjectsLocationsGlobalSecurityGatewaysService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysService { + rs := &ProjectsLocationsGlobalSecurityGatewaysService{s: s} + rs.Applications = NewProjectsLocationsGlobalSecurityGatewaysApplicationsService(s) + rs.Hubs = NewProjectsLocationsGlobalSecurityGatewaysHubsService(s) + return rs +} + +type ProjectsLocationsGlobalSecurityGatewaysService struct { + s *Service + + Applications *ProjectsLocationsGlobalSecurityGatewaysApplicationsService + + Hubs *ProjectsLocationsGlobalSecurityGatewaysHubsService +} + +func NewProjectsLocationsGlobalSecurityGatewaysApplicationsService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysApplicationsService { + rs := &ProjectsLocationsGlobalSecurityGatewaysApplicationsService{s: s} + return rs +} + +type ProjectsLocationsGlobalSecurityGatewaysApplicationsService struct { + s *Service +} + +func NewProjectsLocationsGlobalSecurityGatewaysHubsService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysHubsService { + rs := &ProjectsLocationsGlobalSecurityGatewaysHubsService{s: s} + return rs +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsService struct { + s *Service +} + func NewProjectsLocationsInsightsService(s *Service) *ProjectsLocationsInsightsService { rs := &ProjectsLocationsInsightsService{s: s} return rs @@ -432,11 +480,35 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSecurityGatewaysService(s *Service) *ProjectsLocationsSecurityGatewaysService { rs := &ProjectsLocationsSecurityGatewaysService{s: s} + rs.Applications = NewProjectsLocationsSecurityGatewaysApplicationsService(s) + rs.Hubs = NewProjectsLocationsSecurityGatewaysHubsService(s) return rs } type ProjectsLocationsSecurityGatewaysService struct { s *Service + + Applications *ProjectsLocationsSecurityGatewaysApplicationsService + + Hubs *ProjectsLocationsSecurityGatewaysHubsService +} + +func NewProjectsLocationsSecurityGatewaysApplicationsService(s *Service) *ProjectsLocationsSecurityGatewaysApplicationsService { + rs := &ProjectsLocationsSecurityGatewaysApplicationsService{s: s} + return rs +} + +type ProjectsLocationsSecurityGatewaysApplicationsService struct { + s *Service +} + +func NewProjectsLocationsSecurityGatewaysHubsService(s *Service) *ProjectsLocationsSecurityGatewaysHubsService { + rs := &ProjectsLocationsSecurityGatewaysHubsService{s: s} + return rs +} + +type ProjectsLocationsSecurityGatewaysHubsService struct { + s *Service } // AllocatedConnection: Allocated connection of the AppGateway. @@ -2812,6 +2884,239 @@ func (s GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication: A Beyondcorp +// Application resource information. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication struct { + // ApplicationMatchFilter: Required. Application filter conditions associated + // with an application. + ApplicationMatchFilter *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter `json:"applicationMatchFilter,omitempty"` + // CreateTime: Output only. Timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Optional. An arbitrary user-provided name for the Route + // resource. Cannot exceed 64 characters. + DisplayName string `json:"displayName,omitempty"` + // Name: Identifier. Name of the resource. + Name string `json:"name,omitempty"` + // UpdateTime: Output only. Timestamp when the resource was last modified. + 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. "ApplicationMatchFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApplicationMatchFilter") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter: Match +// Criteria for Application Filtering. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter struct { + // MatchConditions: Required. Match conditions for AND logic. An array of match + // conditions to allow for multiple matching criteria. The rule is considered a + // match if all the conditions are met. The conditions can be one of the + // following combination (FQDN), (FQDN & PORTS), (IP_ADDRESS), (IP_ADDRESS & + // PORTS) EXAMPLES: FQDN - ("*.abc.com"), ("xyz.abc.com") FQDN and PORTS - + // ("abc.com" and "22"), ("abc.com" and "22,33)" etc IP_ADDRESS - + // ("10.20.30.40"), ("100.20.30.40") IP_ADDRESS and PORTS - ("10.20.30.40" and + // "4"), ("10.20.30.40" and "4,5") + MatchConditions []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition `json:"matchConditions,omitempty"` + // ForceSendFields is a list of field names (e.g. "MatchConditions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MatchConditions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondit +// ion: Match condition for idenfying the application. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition struct { + // Fqdn: Optional. FQDN of the application. + Fqdn string `json:"fqdn,omitempty"` + // IpAddress: Optional. IP Address of the application. + IpAddress string `json:"ipAddress,omitempty"` + // Ports: Optional. Ports of the application. + Ports []int64 `json:"ports,omitempty"` + // ForceSendFields is a list of field names (e.g. "Fqdn") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Fqdn") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub: A Beyondcorp Hub resource +// information. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub struct { + // CreateTime: Output only. Timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Optional. An arbitrary user-provided name for the Hub. Cannot + // exceed 64 characters. + DisplayName string `json:"displayName,omitempty"` + // Name: Identifier. Name of the resource. + Name string `json:"name,omitempty"` + // NatGatewayConfig: Required. NAT gateway setup to ensure enough NAT IP + // addresses are available to handle the traffic needed to access the + // applications. Allows to explicitly enable or disable the NAT in the Hub + // along with the total IPs allocated to handle the capacity limits. + NatGatewayConfig *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig `json:"natGatewayConfig,omitempty"` + // State: Output only. The operational state of the Hub. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "CREATING" - Hub is being created. + // "UPDATING" - Hub is being updated. + // "DELETING" - Hub is being deleted. + // "RUNNING" - Hub is running. + // "DOWN" - Hub is down and may be restored in the future. This happens when + // CCFE sends ProjectState = OFF. + // "ERROR" - Hub encountered an error and is in an indeterministic state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. Timestamp when the resource was last modified. + 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. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig: Represents +// the NAT Gateway configuration. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig struct { + // EnableNatGateway: Optional. Explicitly enable or disable the NAT Gateway. + // This is defaulted to false until NAT Gateway configuration is fully + // supported and any request with a disable option will be rejected. + EnableNatGateway bool `json:"enableNatGateway,omitempty"` + // NatIps: Output only. List of NAT IPs that will be used for establishing + // connection to the endpoints. + NatIps []string `json:"natIps,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableNatGateway") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnableNatGateway") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse: +// Message for response to listing Applications. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse struct { + // Applications: A list of BeyondCorp Application in the project. + Applications []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication `json:"applications,omitempty"` + // NextPageToken: A 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: A list of 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. "Applications") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Applications") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse: Message for +// response to listing Hubs. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse struct { + // Hubs: A list of BeyondCorp Hub in the project. + Hubs []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub `json:"hubs,omitempty"` + // NextPageToken: A 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: A list of 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. "Hubs") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hubs") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse: // Message for response to listing SecurityGateways. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse struct { @@ -16044,183 +16349,97 @@ func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsInsightsConfiguredInsightCall struct { - s *Service - insight string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ConfiguredInsight: Gets the value for a selected particular insight based on -// the provided filters. Use the organization level path for fetching at org -// level and project level path for fetching the insight value specific to a -// particular project. +// Create: Creates a new Application in a given project and location. // -// - insight: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ -// id}` -// `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. -func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { - c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.insight = insight +// - parent: The resource name of the parent SecurityGateway using the form: +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c := &ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication = googlecloudbeyondcorpsecuritygatewaysv1alphaapplication return c } -// Aggregation sets the optional parameter "aggregation": Required. Aggregation -// type. Available aggregation could be fetched by calling insight list and get -// APIs in `BASIC` view. -// -// Possible values: -// -// "AGGREGATION_UNSPECIFIED" - Unspecified. -// "HOURLY" - Insight should be aggregated at hourly level. -// "DAILY" - Insight should be aggregated at daily level. -// "WEEKLY" - Insight should be aggregated at weekly level. -// "MONTHLY" - Insight should be aggregated at monthly level. -// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date -// -// range passed in as the start and end time in the request. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("aggregation", aggregation) +// ApplicationId sets the optional parameter "applicationId": User-settable Hub +// resource ID. * Must start with a letter. * Must contain between 4-63 +// characters from `/a-z-/`. * Must end with a number or letter. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c.urlParams_.Set("applicationId", applicationId) return c } -// CustomGroupingFieldFilter sets the optional parameter -// "customGrouping.fieldFilter": Filterable parameters to be added to the -// grouping clause. Available fields could be fetched by calling insight list -// and get APIs in `BASIC` view. `=` is the only comparison operator supported. -// `AND` is the only logical operator supported. Usage: -// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only -// `AND` conditions are allowed. NOTE: Use the `filter_alias` from -// `Insight.Metadata.Field` message for the filtering the corresponding fields -// in this filter field. (These expressions are based on the filter language -// described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) +// 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 request if it has already been +// completed. The server will guarantee that for at least 60 minutes since the +// first request. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } -// CustomGroupingGroupFields sets the optional parameter -// "customGrouping.groupFields": Required. Fields to be used for grouping. -// NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for -// declaring the fields to be grouped-by here. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) - return c -} - -// EndTime sets the optional parameter "endTime": Required. Ending time for the -// duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("endTime", endTime) - return c -} - -// FieldFilter sets the optional parameter "fieldFilter": Other -// filterable/configurable parameters as applicable to the selected insight. -// Available fields could be fetched by calling insight list and get APIs in -// `BASIC` view. `=` is the only comparison operator supported. `AND` is the -// only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 -// AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: -// Use the `filter_alias` from `Insight.Metadata.Field` message for the -// filtering the corresponding fields in this filter field. (These expressions -// are based on the filter language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("fieldFilter", fieldFilter) - return c -} - -// Group sets the optional parameter "group": Group id of the available -// groupings for the insight. Available groupings could be fetched by calling -// insight list and get APIs in `BASIC` view. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Group(group string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("group", group) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, server will pick an -// appropriate default. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Used to fetch the page -// represented by the token. Fetches the first page when not set. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// StartTime sets the optional parameter "startTime": Required. Starting time -// for the duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) StartTime(startTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("startTime", startTime) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.ifNoneMatch_ = entityTag +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfiguredInsightCall { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Header() http.Header { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsConfiguredInsightCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+insight}:configuredInsight") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications") 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{ - "insight": c.insight, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.configuredInsight" call. +// Do executes the "beyondcorp.projects.locations.global.securityGateways.applications.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse.Se -// rverResponse.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 *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse, error) { +// *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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16239,7 +16458,7 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16252,115 +16471,83 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca return ret, nil } -// 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 *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsInsightsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall struct { + s *Service + name string + googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the value for a selected particular insight with default -// configuration. The default aggregation level is 'DAILY' and no grouping will -// be applied or default grouping if applicable. The data will be returned for -// recent 7 days starting the day before. The insight data size will be limited -// to 50 rows. Use the organization level path for fetching at org level and -// project level path for fetching the insight value specific to a particular -// project. Setting the `view` to `BASIC` will only return the metadata for the -// insight. +// Patch: Updates the parameters of a single Application. // -// - name: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ -// id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. -func (r *ProjectsLocationsInsightsService) Get(name string) *ProjectsLocationsInsightsGetCall { - c := &ProjectsLocationsInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the resource. +func (r *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { + c := &ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication = googlecloudbeyondcorpsecuritygatewaysv1alphaapplication return c } -// View sets the optional parameter "view": Required. Metadata only or full -// data view. -// -// Possible values: -// -// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -// -// "BASIC" - Include basic metadata about the insight, but not the insight -// -// data. This is the default value (for both ListInsights and GetInsight). -// -// "FULL" - Include everything. -func (c *ProjectsLocationsInsightsGetCall) View(view string) *ProjectsLocationsInsightsGetCall { - c.urlParams_.Set("view", view) +// 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 timed 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mutable +// fields include: display_name. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { + 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 // details. -func (c *ProjectsLocationsInsightsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsGetCall { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsInsightsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsInsightsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsGetCall { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsInsightsGetCall) Header() http.Header { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication) + if err != nil { + return nil, err + } 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) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16371,13 +16558,13 @@ func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.get" call. +// Do executes the "beyondcorp.projects.locations.global.securityGateways.applications.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight.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 +// *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 *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight, error) { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16396,7 +16583,7 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16409,177 +16596,1578 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsInsightsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists for all the available insights that could be fetched from the -// system. Allows to filter using category. Setting the `view` to `BASIC` will -// let you iterate over the list of insight metadatas. +// 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. // -// - parent: The resource name of InsightMetadata using the form: -// `organizations/{organization_id}/locations/{location}` -// `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsInsightsService) List(parent string) *ProjectsLocationsInsightsListCall { - c := &ProjectsLocationsInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall { + c := &ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } -// Aggregation sets the optional parameter "aggregation": Aggregation type. The -// default is 'DAILY'. -// -// Possible values: -// -// "AGGREGATION_UNSPECIFIED" - Unspecified. -// "HOURLY" - Insight should be aggregated at hourly level. -// "DAILY" - Insight should be aggregated at daily level. -// "WEEKLY" - Insight should be aggregated at weekly level. -// "MONTHLY" - Insight should be aggregated at monthly level. -// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date -// -// range passed in as the start and end time in the request. -func (c *ProjectsLocationsInsightsListCall) Aggregation(aggregation string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("aggregation", aggregation) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// EndTime sets the optional parameter "endTime": Ending time for the duration +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.global.securityGateways.applications.testIamPermissions" call. +// 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) 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 +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Hub in a given project and location. +// +// - parent: The resource name of the parent SecurityGateway using the form: +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c := &ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsecuritygatewaysv1alphahub = googlecloudbeyondcorpsecuritygatewaysv1alphahub + return c +} + +// HubId sets the optional parameter "hubId": User-settable Hub resource ID. * +// Must start with a letter. * Must contain between 4-63 characters from +// `/a-z-/`. * Must end with a number or letter. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) HubId(hubId string) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c.urlParams_.Set("hubId", hubId) + 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 request if it has already been +// completed. The server will guarantee that for at least 60 minutes since the +// first request. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + 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 +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphahub) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hubs") + 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 "beyondcorp.projects.locations.global.securityGateways.hubs.create" call. +// 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 *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) 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 +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall struct { + s *Service + name string + googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Hub. +// +// - name: Identifier. Name of the resource. +func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c := &ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudbeyondcorpsecuritygatewaysv1alphahub = googlecloudbeyondcorpsecuritygatewaysv1alphahub + 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 timed 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mutable +// fields include: display_name. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + 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 +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphahub) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.global.securityGateways.hubs.patch" call. +// 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) 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 +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall 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 *ProjectsLocationsGlobalSecurityGatewaysHubsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { + c := &ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall{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 +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.global.securityGateways.hubs.testIamPermissions" call. +// 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 *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) 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 +} + +type ProjectsLocationsInsightsConfiguredInsightCall struct { + s *Service + insight string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ConfiguredInsight: Gets the value for a selected particular insight based on +// the provided filters. Use the organization level path for fetching at org +// level and project level path for fetching the insight value specific to a +// particular project. +// +// - insight: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ +// id}` +// `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. +func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { + c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.insight = insight + return c +} + +// Aggregation sets the optional parameter "aggregation": Required. Aggregation +// type. Available aggregation could be fetched by calling insight list and get +// APIs in `BASIC` view. +// +// Possible values: +// +// "AGGREGATION_UNSPECIFIED" - Unspecified. +// "HOURLY" - Insight should be aggregated at hourly level. +// "DAILY" - Insight should be aggregated at daily level. +// "WEEKLY" - Insight should be aggregated at weekly level. +// "MONTHLY" - Insight should be aggregated at monthly level. +// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date +// +// range passed in as the start and end time in the request. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("aggregation", aggregation) + return c +} + +// CustomGroupingFieldFilter sets the optional parameter +// "customGrouping.fieldFilter": Filterable parameters to be added to the +// grouping clause. Available fields could be fetched by calling insight list +// and get APIs in `BASIC` view. `=` is the only comparison operator supported. +// `AND` is the only logical operator supported. Usage: +// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only +// `AND` conditions are allowed. NOTE: Use the `filter_alias` from +// `Insight.Metadata.Field` message for the filtering the corresponding fields +// in this filter field. (These expressions are based on the filter language +// described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) + return c +} + +// CustomGroupingGroupFields sets the optional parameter +// "customGrouping.groupFields": Required. Fields to be used for grouping. +// NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for +// declaring the fields to be grouped-by here. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) + return c +} + +// EndTime sets the optional parameter "endTime": Required. Ending time for the +// duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("endTime", endTime) + return c +} + +// FieldFilter sets the optional parameter "fieldFilter": Other +// filterable/configurable parameters as applicable to the selected insight. +// Available fields could be fetched by calling insight list and get APIs in +// `BASIC` view. `=` is the only comparison operator supported. `AND` is the +// only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 +// AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: +// Use the `filter_alias` from `Insight.Metadata.Field` message for the +// filtering the corresponding fields in this filter field. (These expressions +// are based on the filter language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("fieldFilter", fieldFilter) + return c +} + +// Group sets the optional parameter "group": Group id of the available +// groupings for the insight. Available groupings could be fetched by calling +// insight list and get APIs in `BASIC` view. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Group(group string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("group", group) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Used to fetch the page +// represented by the token. Fetches the first page when not set. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// StartTime sets the optional parameter "startTime": Required. Starting time +// for the duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) StartTime(startTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfiguredInsightCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightsConfiguredInsightCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+insight}:configuredInsight") + 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{ + "insight": c.insight, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.insights.configuredInsight" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse.Se +// rverResponse.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 *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse, 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 := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse{ + 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 +} + +// 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 *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsInsightsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the value for a selected particular insight with default +// configuration. The default aggregation level is 'DAILY' and no grouping will +// be applied or default grouping if applicable. The data will be returned for +// recent 7 days starting the day before. The insight data size will be limited +// to 50 rows. Use the organization level path for fetching at org level and +// project level path for fetching the insight value specific to a particular +// project. Setting the `view` to `BASIC` will only return the metadata for the +// insight. +// +// - name: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ +// id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. +func (r *ProjectsLocationsInsightsService) Get(name string) *ProjectsLocationsInsightsGetCall { + c := &ProjectsLocationsInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Required. Metadata only or full +// data view. +// +// Possible values: +// +// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will +// +// default to the BASIC view. +// +// "BASIC" - Include basic metadata about the insight, but not the insight +// +// data. This is the default value (for both ListInsights and GetInsight). +// +// "FULL" - Include everything. +func (c *ProjectsLocationsInsightsGetCall) View(view string) *ProjectsLocationsInsightsGetCall { + c.urlParams_.Set("view", view) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInsightsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInsightsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInsightsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInsightsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "beyondcorp.projects.locations.insights.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight.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 *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight, 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 := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight{ + 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 +} + +type ProjectsLocationsInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists for all the available insights that could be fetched from the +// system. Allows to filter using category. Setting the `view` to `BASIC` will +// let you iterate over the list of insight metadatas. +// +// - parent: The resource name of InsightMetadata using the form: +// `organizations/{organization_id}/locations/{location}` +// `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsInsightsService) List(parent string) *ProjectsLocationsInsightsListCall { + c := &ProjectsLocationsInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Aggregation sets the optional parameter "aggregation": Aggregation type. The +// default is 'DAILY'. +// +// Possible values: +// +// "AGGREGATION_UNSPECIFIED" - Unspecified. +// "HOURLY" - Insight should be aggregated at hourly level. +// "DAILY" - Insight should be aggregated at daily level. +// "WEEKLY" - Insight should be aggregated at weekly level. +// "MONTHLY" - Insight should be aggregated at monthly level. +// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date +// +// range passed in as the start and end time in the request. +func (c *ProjectsLocationsInsightsListCall) Aggregation(aggregation string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("aggregation", aggregation) + return c +} + +// EndTime sets the optional parameter "endTime": Ending time for the duration // for which insights are to be pulled. The default is the current time. func (c *ProjectsLocationsInsightsListCall) EndTime(endTime string) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("endTime", endTime) return c } -// Filter sets the optional parameter "filter": Filter expression to restrict -// the insights returned. Supported filter fields: * `type` * `category` * -// `subCategory` Examples: * "category = application AND type = count" * -// "category = application AND subCategory = iap" * "type = status" Allowed -// values: * type: [count, latency, status, list] * category: [application, -// device, request, security] * subCategory: [iap, caa, webprotect] NOTE: Only -// equality based comparison is allowed. Only `AND` conjunction is allowed. -// NOTE: The 'AND' in the filter field needs to be in capital letters only. -// NOTE: Just filtering on `subCategory` is not allowed. It should be passed in -// with the parent `category` too. (These expressions are based on the filter -// language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsListCall) Filter(filter string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("filter", filter) +// Filter sets the optional parameter "filter": Filter expression to restrict +// the insights returned. Supported filter fields: * `type` * `category` * +// `subCategory` Examples: * "category = application AND type = count" * +// "category = application AND subCategory = iap" * "type = status" Allowed +// values: * type: [count, latency, status, list] * category: [application, +// device, request, security] * subCategory: [iap, caa, webprotect] NOTE: Only +// equality based comparison is allowed. Only `AND` conjunction is allowed. +// NOTE: The 'AND' in the filter field needs to be in capital letters only. +// NOTE: Just filtering on `subCategory` is not allowed. It should be passed in +// with the parent `category` too. (These expressions are based on the filter +// language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsListCall) Filter(filter string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results. This is currently ignored. +func (c *ProjectsLocationsInsightsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. NOTE: Default page size is 50. +func (c *ProjectsLocationsInsightsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInsightsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// StartTime sets the optional parameter "startTime": Starting time for the +// duration for which insights are to be pulled. The default is 7 days before +// the current time. +func (c *ProjectsLocationsInsightsListCall) StartTime(startTime string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// View sets the optional parameter "view": Required. List only metadata or +// full data. +// +// Possible values: +// +// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will +// +// default to the BASIC view. +// +// "BASIC" - Include basic metadata about the insight, but not the insight +// +// data. This is the default value (for both ListInsights and GetInsight). +// +// "FULL" - Include everything. +func (c *ProjectsLocationsInsightsListCall) View(view string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("view", view) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInsightsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/insights") + 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 "beyondcorp.projects.locations.insights.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse.ServerR +// esponse.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 *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse, 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 := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse{ + 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 +} + +// 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 *ProjectsLocationsInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsNetConnectionsGetIamPolicyCall 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 *ProjectsLocationsNetConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c := &ProjectsLocationsNetConnectionsGetIamPolicyCall{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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + 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 +// details. +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+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 "beyondcorp.projects.locations.netConnections.getIamPolicy" call. +// 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) 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 +} + +type ProjectsLocationsNetConnectionsSetIamPolicyCall 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 *ProjectsLocationsNetConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNetConnectionsSetIamPolicyCall { + c := &ProjectsLocationsNetConnectionsSetIamPolicyCall{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 +// details. +func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.netConnections.setIamPolicy" call. +// 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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) 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 +} + +type ProjectsLocationsNetConnectionsTestIamPermissionsCall 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 *ProjectsLocationsNetConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { + c := &ProjectsLocationsNetConnectionsTestIamPermissionsCall{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 +// details. +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Hint for how to order the -// results. This is currently ignored. -func (c *ProjectsLocationsInsightsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { + c.ctx_ = ctx return c } -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, server will pick an -// appropriate default. NOTE: Default page size is 50. -func (c *ProjectsLocationsInsightsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.netConnections.testIamPermissions" call. +// 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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) 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 +} + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + 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, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } -// PageToken sets the optional parameter "pageToken": A token identifying a -// page of results the server should return. -func (c *ProjectsLocationsInsightsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +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. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx return c } -// StartTime sets the optional parameter "startTime": Starting time for the -// duration for which insights are to be pulled. The default is 7 days before -// the current time. -func (c *ProjectsLocationsInsightsListCall) StartTime(startTime string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("startTime", startTime) - return c +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.operations.cancel" call. +// 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 +} + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Required. List only metadata or -// full data. -// -// Possible values: -// -// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -// -// "BASIC" - Include basic metadata about the insight, but not the insight -// -// data. This is the default value (for both ListInsights and GetInsight). +// 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`. // -// "FULL" - Include everything. -func (c *ProjectsLocationsInsightsListCall) View(view string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("view", view) +// - 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 // details. -func (c *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsInsightsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsInsightsListCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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}/insights") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", 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 "beyondcorp.projects.locations.insights.list" call. +// Do executes the "beyondcorp.projects.locations.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse.ServerR -// esponse.Header or (if a response was returned at all) in +// *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 *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse, error) { +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16598,7 +18186,7 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16611,69 +18199,30 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -// 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 *ProjectsLocationsInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsNetConnectionsGetIamPolicyCall struct { +type ProjectsLocationsOperationsGetCall struct { s *Service - resource string + name 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. +// 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. // -// - 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 *ProjectsLocationsNetConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { - c := &ProjectsLocationsNetConnectionsGetIamPolicyCall{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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNetConnectionsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - 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 // details. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16681,27 +18230,27 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +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. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16709,7 +18258,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) 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/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16717,18 +18266,18 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.operations.get" call. // 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16747,7 +18296,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16760,81 +18309,104 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsNetConnectionsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - 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 *ProjectsLocationsNetConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNetConnectionsSetIamPolicyCall { - c := &ProjectsLocationsNetConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - 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 // details. -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+resource}:setIamPolicy") + 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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.setIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.operations.list" call. // 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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16853,7 +18425,7 @@ func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16866,65 +18438,99 @@ func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsNetConnectionsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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. +type ProjectsLocationsSecurityGatewaysCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new SecurityGateway in a given project and location. // -// - 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 *ProjectsLocationsNetConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { - c := &ProjectsLocationsNetConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource project name of the SecurityGateway location using +// the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsSecurityGatewaysService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysCreateCall { + c := &ProjectsLocationsSecurityGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway = googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway + 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 request if it has already been +// completed. The server will guarantee that for at least 60 minutes since the +// first request. +func (c *ProjectsLocationsSecurityGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SecurityGatewayId sets the optional parameter "securityGatewayId": +// User-settable SecurityGateway resource ID. * Must start with a letter. * +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a number +// or letter. +func (c *ProjectsLocationsSecurityGatewaysCreateCall) SecurityGatewayId(securityGatewayId string) *ProjectsLocationsSecurityGatewaysCreateCall { + c.urlParams_.Set("securityGatewayId", securityGatewayId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16932,18 +18538,18 @@ func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) doRequest(alt st } 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 "beyondcorp.projects.locations.netConnections.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.create" call. // 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 +// *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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16962,7 +18568,7 @@ func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16975,68 +18581,80 @@ func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysDeleteCall struct { + s *Service + name string + 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`. +// Delete: Deletes a single SecurityGateway. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: BeyondCorp SecurityGateway name using the form: +// `projects/{project_id}/locations/{location_id}/securityGateways/{security_g +// ateway_id}`. +func (r *ProjectsLocationsSecurityGatewaysService) Delete(name string) *ProjectsLocationsSecurityGatewaysDeleteCall { + c := &ProjectsLocationsSecurityGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + 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 *ProjectsLocationsSecurityGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysDeleteCall { + 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 // details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } 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}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -17047,12 +18665,13 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.cancel" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.delete" call. // 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) { +// *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 *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17071,7 +18690,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17084,22 +18703,22 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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`. +// Get: Gets details of a single SecurityGateway. // -// - 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)} +// - name: The resource name of the PartnerTenant using the form: +// `projects/{project_id}/locations/{location_id}/securityGateway/{security_ga +// teway_id}`. +func (r *ProjectsLocationsSecurityGatewaysService) Get(name string) *ProjectsLocationsSecurityGatewaysGetCall { + c := &ProjectsLocationsSecurityGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17107,34 +18726,45 @@ func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsSecurityGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17145,12 +18775,13 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.delete" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.get" call. // 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 +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway.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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17169,7 +18800,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17182,30 +18813,48 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsSecurityGatewaysGetIamPolicyCall struct { s *Service - name string + resource 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. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - 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 +// - 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 *ProjectsLocationsSecurityGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysGetIamPolicyCall{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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17213,27 +18862,27 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // IfNoneMatch sets an 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. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17241,7 +18890,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon 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/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17249,18 +18898,18 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.get" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.getIamPolicy" call. // 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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17279,7 +18928,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17292,41 +18941,57 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsSecurityGatewaysListCall 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 SecurityGateways in a given project and location. // -// - 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 +// - parent: The parent location to which the resources belong. +// `projects/{project_id}/locations/{location_id}/`. +func (r *ProjectsLocationsSecurityGatewaysService) List(parent string) *ProjectsLocationsSecurityGatewaysListCall { + c := &ProjectsLocationsSecurityGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": A filter specifying constraints +// of a list operation. All fields in the SecurityGateway message are +// supported. For example, the following query will return the SecurityGateway +// with displayName "test-security-gateway" For more information, please refer +// to https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysListCall { 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 { +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) for +// more information. +func (c *ProjectsLocationsSecurityGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 50 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's next_page_token to +// determine if there are more instances left to be queried. +func (c *ProjectsLocationsSecurityGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysListCall { 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 { +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous ListSecurityGatewayRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17334,7 +18999,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsSecurityGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17342,27 +19007,27 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an 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. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsSecurityGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsSecurityGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17370,7 +19035,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo 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}/securityGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17378,18 +19043,18 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } 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 "beyondcorp.projects.locations.operations.list" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.list" call. // 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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse.Ser +// verResponse.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 *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17408,7 +19073,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17424,7 +19089,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // 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(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsSecurityGatewaysListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17442,78 +19107,187 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsSecurityGatewaysCreateCall struct { +type ProjectsLocationsSecurityGatewaysPatchCall struct { s *Service - parent string + name string googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new SecurityGateway in a given project and location. +// Patch: Updates the parameters of a single SecurityGateway. // -// - parent: The resource project name of the SecurityGateway location using -// the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsSecurityGatewaysService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysCreateCall { - c := &ProjectsLocationsSecurityGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Identifier. Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysPatchCall { + c := &ProjectsLocationsSecurityGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway = googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway 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 request if it has already been -// completed. The server will guarantee that for at least 60 minutes since the -// first request. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysCreateCall { - c.urlParams_.Set("requestId", requestId) - 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 timed 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 *ProjectsLocationsSecurityGatewaysPatchCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mutable +// fields include: display_name, gateway_regions. +func (c *ProjectsLocationsSecurityGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSecurityGatewaysPatchCall { + 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 +// details. +func (c *ProjectsLocationsSecurityGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSecurityGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSecurityGatewaysPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecurityGatewaysPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) + if err != nil { + return nil, err + } + 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 "beyondcorp.projects.locations.securityGateways.patch" call. +// 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 *ProjectsLocationsSecurityGatewaysPatchCall) 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 +} + +type ProjectsLocationsSecurityGatewaysSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SecurityGatewayId sets the optional parameter "securityGatewayId": -// User-settable SecurityGateway resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from `/a-z-/`. * Must end with a number -// or letter. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) SecurityGatewayId(securityGatewayId string) *ProjectsLocationsSecurityGatewaysCreateCall { - c.urlParams_.Set("securityGatewayId", securityGatewayId) +// 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 *ProjectsLocationsSecurityGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysCreateCall { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysCreateCall { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17521,18 +19295,18 @@ func (c *ProjectsLocationsSecurityGatewaysCreateCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.create" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.setIamPolicy" call. // 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 *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17551,7 +19325,7 @@ func (c *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17564,97 +19338,84 @@ func (c *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsSecurityGatewaysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single SecurityGateway. +// 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. // -// - name: BeyondCorp SecurityGateway name using the form: -// `projects/{project_id}/locations/{location_id}/securityGateways/{security_g -// ateway_id}`. -func (r *ProjectsLocationsSecurityGatewaysService) Delete(name string) *ProjectsLocationsSecurityGatewaysDeleteCall { - c := &ProjectsLocationsSecurityGatewaysDeleteCall{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 *ProjectsLocationsSecurityGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, validates -// request by executing a dry-run which would not alter the resource in any -// way. -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - 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 *ProjectsLocationsSecurityGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsSecurityGatewaysTestIamPermissionsCall{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 // details. -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } 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/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.delete" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.testIamPermissions" call. // 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 +// *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 *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17673,7 +19434,7 @@ func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17686,68 +19447,78 @@ func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsSecurityGatewaysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysApplicationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single SecurityGateway. +// Delete: Deletes a single Application. // -// - name: The resource name of the PartnerTenant using the form: -// `projects/{project_id}/locations/{location_id}/securityGateway/{security_ga -// teway_id}`. -func (r *ProjectsLocationsSecurityGatewaysService) Get(name string) *ProjectsLocationsSecurityGatewaysGetCall { - c := &ProjectsLocationsSecurityGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Delete(name string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsDeleteCall{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 *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + 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 // details. -func (c *ProjectsLocationsSecurityGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysGetCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -17758,13 +19529,13 @@ func (c *ProjectsLocationsSecurityGatewaysGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.get" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway.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 *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway, error) { +// *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 *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17783,7 +19554,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17796,48 +19567,30 @@ func (c *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsSecurityGatewaysGetIamPolicyCall struct { +type ProjectsLocationsSecurityGatewaysApplicationsGetCall struct { s *Service - resource string + name 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. +// Get: Gets details of a single Application. // -// - 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 *ProjectsLocationsSecurityGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { - c := &ProjectsLocationsSecurityGatewaysGetIamPolicyCall{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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The resource name of the Application using the form: +// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i +// d}/applications/{application_id}`. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Get(name string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsGetCall{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 // details. -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17845,27 +19598,27 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Fields(s ...googleap // IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17873,7 +19626,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) 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/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17881,18 +19634,18 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.get" call. // 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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication.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 *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17911,7 +19664,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17924,7 +19677,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsSecurityGatewaysListCall struct { +type ProjectsLocationsSecurityGatewaysApplicationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -17933,22 +19686,23 @@ type ProjectsLocationsSecurityGatewaysListCall struct { header_ http.Header } -// List: Lists SecurityGateways in a given project and location. +// List: Lists Applications in a given project and location. // // - parent: The parent location to which the resources belong. -// `projects/{project_id}/locations/{location_id}/`. -func (r *ProjectsLocationsSecurityGatewaysService) List(parent string) *ProjectsLocationsSecurityGatewaysListCall { - c := &ProjectsLocationsSecurityGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) List(parent string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A filter specifying constraints -// of a list operation. All fields in the SecurityGateway message are -// supported. For example, the following query will return the SecurityGateway -// with displayName "test-security-gateway" For more information, please refer -// to https://google.aip.dev/160. -func (c *ProjectsLocationsSecurityGatewaysListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysListCall { +// of a list operation. All fields in the Hub message are supported. For +// example, the following query will return the Hub with displayName +// "test-application" For more information, please refer to +// https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("filter", filter) return c } @@ -17957,7 +19711,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Filter(filter string) *Proje // results. See Sorting order // (https://cloud.google.com/apis/design/design_patterns#sorting_order) for // more information. -func (c *ProjectsLocationsSecurityGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -17967,14 +19721,14 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) OrderBy(orderBy string) *Pro // service. Regardless of the page_size value, the response may include a // partial list and a caller should only rely on response's next_page_token to // determine if there are more instances left to be queried. -func (c *ProjectsLocationsSecurityGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous ListSecurityGatewayRequest, if any. -func (c *ProjectsLocationsSecurityGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysListCall { +// returned from a previous ListHubsRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17982,7 +19736,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17990,27 +19744,27 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysListCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18018,7 +19772,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18031,13 +19785,13 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.list" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse.Ser -// verResponse.Header or (if a response was returned at all) in +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse.ServerR +// esponse.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 *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18056,7 +19810,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18072,7 +19826,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) 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 *ProjectsLocationsSecurityGatewaysListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse) error) error { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18090,22 +19844,20 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsSecurityGatewaysPatchCall struct { - s *Service - name string - googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysHubsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single SecurityGateway. +// Delete: Deletes a single Hub. // -// - name: Identifier. Name of the resource. -func (r *ProjectsLocationsSecurityGatewaysService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysPatchCall { - c := &ProjectsLocationsSecurityGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysHubsService) Delete(name string) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { + c := &ProjectsLocationsSecurityGatewaysHubsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway = googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway return c } @@ -18114,59 +19866,56 @@ func (r *ProjectsLocationsSecurityGatewaysService) Patch(name string, googleclou // 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 timed out. If you make the request again +// 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 *ProjectsLocationsSecurityGatewaysPatchCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysPatchCall { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mutable -// fields include: display_name, gateway_regions. -func (c *ProjectsLocationsSecurityGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSecurityGatewaysPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { + 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 // details. -func (c *ProjectsLocationsSecurityGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysPatchCall { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysPatchCall { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysPatchCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) - if err != nil { - return nil, err - } 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) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -18177,13 +19926,13 @@ func (c *ProjectsLocationsSecurityGatewaysPatchCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.patch" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.delete" call. // 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 *ProjectsLocationsSecurityGatewaysPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18215,81 +19964,85 @@ func (c *ProjectsLocationsSecurityGatewaysPatchCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsSecurityGatewaysSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysHubsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// Get: Gets details of a single Hub. // -// - 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 *ProjectsLocationsSecurityGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { - c := &ProjectsLocationsSecurityGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the Hub using the form: +// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i +// d}/hubs/{hub_id}`. +func (r *ProjectsLocationsSecurityGatewaysHubsService) Get(name string) *ProjectsLocationsSecurityGatewaysHubsGetCall { + c := &ProjectsLocationsSecurityGatewaysHubsGetCall{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 // details. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysHubsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+resource}:setIamPolicy") + 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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.setIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.get" call. // 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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub.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 *ProjectsLocationsSecurityGatewaysHubsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18308,7 +20061,7 @@ func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18321,84 +20074,120 @@ func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsSecurityGatewaysTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysHubsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists Hubs in a given project and location. // -// - 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 *ProjectsLocationsSecurityGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { - c := &ProjectsLocationsSecurityGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The parent location to which the resources belong. +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsSecurityGatewaysHubsService) List(parent string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c := &ProjectsLocationsSecurityGatewaysHubsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter specifying constraints +// of a list operation. All fields in the Hub message are supported. For +// example, the following query will return the Hub with displayName "test-hub" +// For more information, please refer to https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) for +// more information. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 50 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's next_page_token to +// determine if there are more instances left to be queried. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous ListHubsRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysHubsListCall { + 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 // details. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hubs") 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{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.list" call. // 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 *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse.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 *ProjectsLocationsSecurityGatewaysHubsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18417,7 +20206,7 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18429,3 +20218,24 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...goo } return ret, nil } + +// 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 *ProjectsLocationsSecurityGatewaysHubsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index b6a49ff9ee8..e605d36ea5c 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1935,7 +1935,7 @@ } } }, - "revision": "20240727", + "revision": "20240803", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3076,6 +3076,17 @@ }, "type": "object" }, + "DataPolicyOption": { + "description": "Data policy option proto, it currently supports name only, will support precedence later.", + "id": "DataPolicyOption", + "properties": { + "name": { + "description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.", + "type": "string" + } + }, + "type": "object" + }, "DataSplitResult": { "description": "Data split result. This contains references to the training and evaluation data tables that were used to train the model.", "id": "DataSplitResult", @@ -4574,35 +4585,6 @@ }, "type": "object" }, - "IdentityColumnInfo": { - "description": "Metadata for value generation for an identity column.", - "id": "IdentityColumnInfo", - "properties": { - "generatedMode": { - "description": "Optional. Dictates when system generated values are used to populate the field.", - "enum": [ - "GENERATED_MODE_UNSPECIFIED", - "GENERATED_ALWAYS", - "GENERATED_BY_DEFAULT" - ], - "enumDescriptions": [ - "Unspecified GeneratedMode will default to GENERATED_ALWAYS.", - "Field can only have system generated values. Users cannot manually insert values into the field.", - "Use system generated values only if the user does not explicitly provide a value." - ], - "type": "string" - }, - "increment": { - "description": "Optional. The minimum difference between two successive generated values. Should be INTEGER compatible. Can be negative or positive but not 0. The default value is 1 if the field is not specified.", - "type": "string" - }, - "start": { - "description": "Optional. The first generated value. Should be INTEGER compatible. The default value is 1 if the field is not specified.", - "type": "string" - } - }, - "type": "object" - }, "IndexUnusedReason": { "description": "Reason about why no search index was used in the search query (or sub-query).", "id": "IndexUnusedReason", @@ -8839,6 +8821,13 @@ "description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.", "type": "string" }, + "dataPolicies": { + "description": "Optional. Data policy options, will replace the data_policies.", + "items": { + "$ref": "DataPolicyOption" + }, + "type": "array" + }, "defaultValueExpression": { "description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field.", "type": "string" @@ -8858,10 +8847,6 @@ "description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required.", "type": "string" }, - "identityColumnInfo": { - "$ref": "IdentityColumnInfo", - "description": "Optional. Definition of how values are generated for the field. Setting this option means that the field is an identity column. Only valid for top-level schema INTEGER fields (not nested fields)." - }, "maxLength": { "description": "Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not specified, no maximum length constraint is imposed on this field. If type = \"STRING\", then max_length represents the maximum UTF-8 length of strings in this field. If type = \"BYTES\", then max_length represents the maximum number of bytes in this field. It is invalid to set this field if type ≠ \"STRING\" and ≠ \"BYTES\".", "format": "int64", diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index a62207a9c8f..d536d84b4a7 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -1900,6 +1900,30 @@ func (s DataMaskingStatistics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DataPolicyOption: Data policy option proto, it currently supports name only, +// will support precedence later. +type DataPolicyOption struct { + // Name: Data policy resource name in the form of + // projects/project_id/locations/location_id/dataPolicies/data_policy_id. + Name string `json:"name,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DataPolicyOption) MarshalJSON() ([]byte, error) { + type NoMethod DataPolicyOption + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DataSplitResult: Data split result. This contains references to the training // and evaluation data tables that were used to train the model. type DataSplitResult struct { @@ -3874,44 +3898,6 @@ func (s *HparamTuningTrial) UnmarshalJSON(data []byte) error { return nil } -// IdentityColumnInfo: Metadata for value generation for an identity column. -type IdentityColumnInfo struct { - // GeneratedMode: Optional. Dictates when system generated values are used to - // populate the field. - // - // Possible values: - // "GENERATED_MODE_UNSPECIFIED" - Unspecified GeneratedMode will default to - // GENERATED_ALWAYS. - // "GENERATED_ALWAYS" - Field can only have system generated values. Users - // cannot manually insert values into the field. - // "GENERATED_BY_DEFAULT" - Use system generated values only if the user does - // not explicitly provide a value. - GeneratedMode string `json:"generatedMode,omitempty"` - // Increment: Optional. The minimum difference between two successive generated - // values. Should be INTEGER compatible. Can be negative or positive but not 0. - // The default value is 1 if the field is not specified. - Increment string `json:"increment,omitempty"` - // Start: Optional. The first generated value. Should be INTEGER compatible. - // The default value is 1 if the field is not specified. - Start string `json:"start,omitempty"` - // ForceSendFields is a list of field names (e.g. "GeneratedMode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GeneratedMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IdentityColumnInfo) MarshalJSON() ([]byte, error) { - type NoMethod IdentityColumnInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // IndexUnusedReason: Reason about why no search index was used in the search // query (or sub-query). type IndexUnusedReason struct { @@ -8994,6 +8980,8 @@ type TableFieldSchema struct { // locale, case insensitive. * '': empty string. Default to case-sensitive // behavior. Collation string `json:"collation,omitempty"` + // DataPolicies: Optional. Data policy options, will replace the data_policies. + DataPolicies []*DataPolicyOption `json:"dataPolicies,omitempty"` // DefaultValueExpression: Optional. A SQL expression to specify the [default // value] (https://cloud.google.com/bigquery/docs/default-values) for this // field. @@ -9008,10 +8996,6 @@ type TableFieldSchema struct { // valid for top-level schema fields (not nested fields). If the type is // FOREIGN, this field is required. ForeignTypeDefinition string `json:"foreignTypeDefinition,omitempty"` - // IdentityColumnInfo: Optional. Definition of how values are generated for the - // field. Setting this option means that the field is an identity column. Only - // valid for top-level schema INTEGER fields (not nested fields). - IdentityColumnInfo *IdentityColumnInfo `json:"identityColumnInfo,omitempty"` // MaxLength: Optional. Maximum length of values of this field for STRINGS or // BYTES. If max_length is not specified, no maximum length constraint is // imposed on this field. If type = "STRING", then max_length represents the diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index e2107c9aa05..2b0bed11f4a 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -2194,7 +2194,7 @@ } } }, - "revision": "20240720", + "revision": "20240806", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2375,6 +2375,20 @@ "description": "A backup of a Cloud Bigtable table.", "id": "Backup", "properties": { + "backupType": { + "description": "Indicates the backup type of the backup.", + "enum": [ + "BACKUP_TYPE_UNSPECIFIED", + "STANDARD", + "HOT" + ], + "enumDescriptions": [ + "Not specified.", + "The default type for Cloud Bigtable managed backups. Supported for backups created in both HDD and SSD instances. Requires optimization when restored to a table in an SSD instance.", + "A backup type with faster restore to SSD performance. Only supported for backups created in SSD instances. A new SSD table restored from a hot backup reaches production performance more quickly than a standard backup." + ], + "type": "string" + }, "encryptionInfo": { "$ref": "EncryptionInfo", "description": "Output only. The encryption information for the backup.", @@ -2387,7 +2401,12 @@ "type": "string" }, "expireTime": { - "description": "Required. The expiration time of the backup. When creating a backup or updating its `expire_time`, the new value must: - Be at most 90 days in the future - Be at least 6 hours in the future Once the `expire_time` has passed, Cloud Bigtable will delete the backup.", + "description": "Required. The expiration time of the backup. When creating a backup or updating its `expire_time`, the value must be greater than the backup creation time by: - At least 6 hours - At most 90 days Once the `expire_time` has passed, Cloud Bigtable will delete the backup.", + "format": "google-datetime", + "type": "string" + }, + "hotToStandardTime": { + "description": "The time at which the hot backup will be converted to a standard backup. Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the hot backup to a standard backup. This value must be greater than the backup creation time by: - At least 24 hours This field only applies for hot backups. When creating or updating a standard backup, attempting to set this field will fail the request.", "format": "google-datetime", "type": "string" }, diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index ef60a791e61..b38db5571cd 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -591,16 +591,35 @@ func (s AutoscalingTargets) MarshalJSON() ([]byte, error) { // Backup: A backup of a Cloud Bigtable table. type Backup struct { + // BackupType: Indicates the backup type of the backup. + // + // Possible values: + // "BACKUP_TYPE_UNSPECIFIED" - Not specified. + // "STANDARD" - The default type for Cloud Bigtable managed backups. + // Supported for backups created in both HDD and SSD instances. Requires + // optimization when restored to a table in an SSD instance. + // "HOT" - A backup type with faster restore to SSD performance. Only + // supported for backups created in SSD instances. A new SSD table restored + // from a hot backup reaches production performance more quickly than a + // standard backup. + BackupType string `json:"backupType,omitempty"` // EncryptionInfo: Output only. The encryption information for the backup. EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` // EndTime: Output only. `end_time` is the time that the backup was finished. // The row data in the backup will be no newer than this timestamp. EndTime string `json:"endTime,omitempty"` // ExpireTime: Required. The expiration time of the backup. When creating a - // backup or updating its `expire_time`, the new value must: - Be at most 90 - // days in the future - Be at least 6 hours in the future Once the + // backup or updating its `expire_time`, the value must be greater than the + // backup creation time by: - At least 6 hours - At most 90 days Once the // `expire_time` has passed, Cloud Bigtable will delete the backup. ExpireTime string `json:"expireTime,omitempty"` + // HotToStandardTime: The time at which the hot backup will be converted to a + // standard backup. Once the `hot_to_standard_time` has passed, Cloud Bigtable + // will convert the hot backup to a standard backup. This value must be greater + // than the backup creation time by: - At least 24 hours This field only + // applies for hot backups. When creating or updating a standard backup, + // attempting to set this field will fail the request. + HotToStandardTime string `json:"hotToStandardTime,omitempty"` // Name: A globally unique identifier for the backup which cannot be changed. // Values are of the form // `projects/{project}/instances/{instance}/clusters/{cluster}/ @@ -634,15 +653,15 @@ type Backup struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EncryptionInfo") to + // ForceSendFields is a list of field names (e.g. "BackupType") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EncryptionInfo") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "BackupType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index bc82f14532a..384221014d1 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -2065,7 +2065,7 @@ } } }, - "revision": "20240728", + "revision": "20240809", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -4602,7 +4602,7 @@ "type": "string" }, "destinationTargetId": { - "description": "Optional. The ID of the stage in the pipeline to which this `Release` is deploying. If unspecified, default it to the next stage in the promotion flow. The value of this field could be one of the following: * The last segment of a target name. It only needs the ID to determine if the target is one of the stages in the promotion sequence defined in the pipeline. * \"@next\", the next target in the promotion sequence.", + "description": "Optional. The ID of the stage in the pipeline to which this `Release` is deploying. If unspecified, default it to the next stage in the promotion flow. The value of this field could be one of the following: * The last segment of a target name * \"@next\", the next target in the promotion sequence", "type": "string" }, "id": { @@ -5995,7 +5995,7 @@ "id": "TargetAttribute", "properties": { "id": { - "description": "ID of the `Target`. The value of this field could be one of the following: * The last segment of a target name. It only needs the ID to determine which target is being referred to * \"*\", all targets in a location.", + "description": "ID of the `Target`. The value of this field could be one of the following: * The last segment of a target name * \"*\", all targets in a location", "type": "string" }, "labels": { diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index e57bcfdac94..6b8d31a8f48 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -3360,9 +3360,8 @@ type PromoteReleaseRule struct { // DestinationTargetId: Optional. The ID of the stage in the pipeline to which // this `Release` is deploying. If unspecified, default it to the next stage in // the promotion flow. The value of this field could be one of the following: * - // The last segment of a target name. It only needs the ID to determine if the - // target is one of the stages in the promotion sequence defined in the - // pipeline. * "@next", the next target in the promotion sequence. + // The last segment of a target name * "@next", the next target in the + // promotion sequence DestinationTargetId string `json:"destinationTargetId,omitempty"` // Id: Required. ID of the rule. This id must be unique in the `Automation` // resource to which this rule belongs. The format is @@ -4777,9 +4776,8 @@ func (s TargetArtifact) MarshalJSON() ([]byte, error) { // TargetAttribute: Contains criteria for selecting Targets. type TargetAttribute struct { // Id: ID of the `Target`. The value of this field could be one of the - // following: * The last segment of a target name. It only needs the ID to - // determine which target is being referred to * "*", all targets in a - // location. + // following: * The last segment of a target name * "*", all targets in a + // location Id string `json:"id,omitempty"` // Labels: Target labels. Labels map[string]string `json:"labels,omitempty"` diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 1ea9c272493..61f4f1da2a4 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -454,10 +454,71 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "trainCustomModel": { + "description": "Trains a custom model.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:trainCustomModel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.trainCustomModel", + "parameterOrder": [ + "dataStore" + ], + "parameters": { + "dataStore": { + "description": "Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+dataStore}:trainCustomModel", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1TrainCustomModelRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -1189,6 +1250,35 @@ } } }, + "customModels": { + "methods": { + "list": { + "description": "Gets a list of all the custom models.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/customModels", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.customModels.list", + "parameterOrder": [ + "dataStore" + ], + "parameters": { + "dataStore": { + "description": "Required. The resource name of the parent Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to fetch the models from.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+dataStore}/customModels", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ListCustomModelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "models": { "resources": { "operations": { @@ -3690,6 +3780,39 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -5851,7 +5974,7 @@ } } }, - "revision": "20240801", + "revision": "20240813", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6021,7 +6144,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the AlloyDB source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -6045,7 +6168,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -6054,7 +6178,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -6946,6 +7071,63 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse": { + "description": "Response message for DocumentService.BatchGetDocumentsMetadata method.", + "id": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse", + "properties": { + "documentsMetadata": { + "description": "The metadata of the Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata": { + "description": "The metadata of a Document.", + "id": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata", + "properties": { + "lastRefreshedTime": { + "description": "The timestamp of the last time the Document was last indexed.", + "format": "google-datetime", + "type": "string" + }, + "matcherValue": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "description": "The value of the matcher that was used to match the Document." + }, + "status": { + "description": "The status of the document.", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_INDEXED", + "STATUS_NOT_IN_TARGET_SITE", + "STATUS_NOT_IN_INDEX" + ], + "enumDescriptions": [ + "Should never be set.", + "The Document is indexed.", + "The Document is not indexed because its URI is not in the TargetSite.", + "The Document is not indexed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue": { + "description": "The value of the matcher that was used to match the Document.", + "id": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "properties": { + "uri": { + "description": "If match by URI, the URI of the Document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest": { "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", "id": "GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest", @@ -6973,7 +7155,7 @@ "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." }, "projectId": { - "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7124,7 +7306,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Bigtable source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7214,6 +7396,11 @@ "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", "type": "boolean" }, + "score": { + "description": "Confidence score for the claim in the answer candidate, in the range of [0, 1].", + "format": "double", + "type": "number" + }, "startPos": { "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", "format": "int32", @@ -7363,7 +7550,7 @@ "type": "boolean" }, "projectId": { - "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Cloud SQL source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7524,7 +7711,7 @@ "id": "GoogleCloudDiscoveryengineV1Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -7916,6 +8103,67 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CustomTuningModel": { + "description": "Metadata that describes a custom tuned model.", + "id": "GoogleCloudDiscoveryengineV1CustomTuningModel", + "properties": { + "createTime": { + "deprecated": true, + "description": "Timestamp the Model was created at.", + "format": "google-datetime", + "type": "string" + }, + "displayName": { + "description": "The display name of the model.", + "type": "string" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelState": { + "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "TRAINING_PAUSED", + "TRAINING", + "TRAINING_COMPLETE", + "READY_FOR_SERVING", + "TRAINING_FAILED", + "NO_IMPROVEMENT" + ], + "enumDescriptions": [ + "Default value.", + "The model is in a paused training state.", + "The model is currently training.", + "The model has successfully completed training.", + "The model is ready for serving.", + "The model training failed.", + "The model training finished successfully but metrics did not improve." + ], + "type": "string" + }, + "modelVersion": { + "description": "The version of the model.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "type": "string" + }, + "trainingStartTime": { + "description": "Timestamp the model training was initiated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DataStore": { "description": "DataStore captures global settings and configs at the DataStore level.", "id": "GoogleCloudDiscoveryengineV1DataStore", @@ -7926,13 +8174,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -7999,6 +8249,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1Schema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -9110,6 +9364,20 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ListCustomModelsResponse": { + "description": "Response message for SearchTuningService.ListCustomModels method.", + "id": "GoogleCloudDiscoveryengineV1ListCustomModelsResponse", + "properties": { + "models": { + "description": "List of custom tuning models.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1CustomTuningModel" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1ListDataStoresResponse": { "description": "Response message for DataStoreService.ListDataStores method.", "id": "GoogleCloudDiscoveryengineV1ListDataStoresResponse", @@ -10495,7 +10763,8 @@ "POTENTIAL_POLICY_VIOLATION", "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", @@ -10505,7 +10774,8 @@ "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.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -10774,7 +11044,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Spanner source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10926,6 +11196,103 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelRequest": { + "description": "Request message for SearchTuningService.TrainCustomModel method.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelRequest", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "The desired location of errors incurred during the data ingestion and training." + }, + "gcsTrainingInput": { + "$ref": "GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput", + "description": "Cloud Storage training input." + }, + "modelId": { + "description": "If not provided, a UUID will be generated.", + "type": "string" + }, + "modelType": { + "description": "Model to be trained. Supported values are: * **search-tuning**: Fine tuning the search system based on data provided.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput": { + "description": "Cloud Storage training data input.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput", + "properties": { + "corpusDataPath": { + "description": "The Cloud Storage corpus data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id, title and text. Example: `{\"_id\": \"doc1\", title: \"relevant doc\", \"text\": \"relevant text\"}`", + "type": "string" + }, + "queryDataPath": { + "description": "The gcs query data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id and text. Example: {\"_id\": \"query1\", \"text\": \"example query\"}", + "type": "string" + }, + "testDataPath": { + "description": "Cloud Storage test data. Same format as train_data_path. If not provided, a random 80/20 train/test split will be performed on train_data_path.", + "type": "string" + }, + "trainDataPath": { + "description": "Cloud Storage training data path whose format should be `gs:///`. The file should be in tsv format. Each line should have the doc_id and query_id and score (number). For search-tuning model, it should have the query-id corpus-id score as tsv file header. The score should be a number in `[0, inf+)`. The larger the number is, the more relevant the pair is. Example: * `query-id\\tcorpus-id\\tscore` * `query1\\tdoc1\\t1`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the data.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", + "type": "string" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1TransactionInfo": { "description": "A transaction represents the entire purchase transaction.", "id": "GoogleCloudDiscoveryengineV1TransactionInfo", @@ -11110,6 +11477,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAclConfig": { "description": "Access Control Configuration.", "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", @@ -11139,7 +11537,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -11148,7 +11547,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -11690,7 +12090,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -11986,13 +12386,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -12068,6 +12470,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -14678,6 +15084,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata", @@ -14767,7 +15204,7 @@ "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -15048,13 +15485,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -15125,6 +15564,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1betaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -16274,6 +16717,24 @@ "description": "The Unicode country/region code (CLDR) of a location, such as \"US\" and \"419\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.", "type": "string" }, + "relevanceThreshold": { + "description": "The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.", + "enum": [ + "RELEVANCE_THRESHOLD_UNSPECIFIED", + "LOWEST", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Default value. In this case, server behavior defaults to Google defined threshold.", + "Lowest relevance threshold.", + "Low relevance threshold.", + "Medium relevance threshold.", + "High relevance threshold." + ], + "type": "string" + }, "safeSearch": { "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" @@ -17070,6 +17531,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 115e9f2e142..afa03477408 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -247,6 +247,7 @@ func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocat rs.CompletionSuggestions = NewProjectsLocationsCollectionsDataStoresCompletionSuggestionsService(s) rs.Controls = NewProjectsLocationsCollectionsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsDataStoresConversationsService(s) + rs.CustomModels = NewProjectsLocationsCollectionsDataStoresCustomModelsService(s) rs.Models = NewProjectsLocationsCollectionsDataStoresModelsService(s) rs.Operations = NewProjectsLocationsCollectionsDataStoresOperationsService(s) rs.Schemas = NewProjectsLocationsCollectionsDataStoresSchemasService(s) @@ -269,6 +270,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { Conversations *ProjectsLocationsCollectionsDataStoresConversationsService + CustomModels *ProjectsLocationsCollectionsDataStoresCustomModelsService + Models *ProjectsLocationsCollectionsDataStoresModelsService Operations *ProjectsLocationsCollectionsDataStoresOperationsService @@ -346,6 +349,15 @@ type ProjectsLocationsCollectionsDataStoresConversationsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresCustomModelsService(s *Service) *ProjectsLocationsCollectionsDataStoresCustomModelsService { + rs := &ProjectsLocationsCollectionsDataStoresCustomModelsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresCustomModelsService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresModelsService(s *Service) *ProjectsLocationsCollectionsDataStoresModelsService { rs := &ProjectsLocationsCollectionsDataStoresModelsService{s: s} rs.Operations = NewProjectsLocationsCollectionsDataStoresModelsOperationsService(s) @@ -1104,9 +1116,9 @@ type GoogleCloudDiscoveryengineV1AlloyDbSource struct { // LocationId: Required. The AlloyDB location to copy the data from with a // length limit of 256 characters. LocationId string `json:"locationId,omitempty"` - // ProjectId: The project ID that the AlloyDB source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the AlloyDB source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The AlloyDB table to copy the data from with a length // limit of 256 characters. @@ -1150,6 +1162,9 @@ type GoogleCloudDiscoveryengineV1Answer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -2387,6 +2402,90 @@ func (s GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse: Response +// message for DocumentService.BatchGetDocumentsMetadata method. +type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse struct { + // DocumentsMetadata: The metadata of the Documents. + DocumentsMetadata []*GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata `json:"documentsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentsMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentsMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata +// : The metadata of a Document. +type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata struct { + // LastRefreshedTime: The timestamp of the last time the Document was last + // indexed. + LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` + // MatcherValue: The value of the matcher that was used to match the Document. + MatcherValue *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` + // Status: The status of the document. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Should never be set. + // "STATUS_INDEXED" - The Document is indexed. + // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI + // is not in the TargetSite. + // "STATUS_NOT_IN_INDEX" - The Document is not indexed. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "LastRefreshedTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LastRefreshedTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata +// MatcherValue: The value of the matcher that was used to match the Document. +type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue struct { + // Uri: If match by URI, the URI of the Document. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest: Request message // for SiteSearchEngineService.BatchVerifyTargetSites method. type GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest struct { @@ -2414,8 +2513,8 @@ type GoogleCloudDiscoveryengineV1BigQuerySource struct { // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in // YYYY-MM-DD format. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery source - // is in with a length limit of 128 characters. If not specified, inherits the + // ProjectId: The project ID or the project number that contains the BigQuery + // source. Has a length limit of 128 characters. If not specified, inherits the // project ID from the parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The BigQuery table to copy the data from with a length @@ -2587,9 +2686,9 @@ type GoogleCloudDiscoveryengineV1BigtableSource struct { // InstanceId: Required. The instance ID of the Cloud Bigtable that needs to be // imported. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Bigtable source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Bigtable source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table ID of the Cloud Bigtable that needs to be // imported. @@ -2722,6 +2821,9 @@ type GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim struct { // done for the claim and therefore citation_indices, and anti_citation_indices // should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // Score: Confidence score for the claim in the answer candidate, in the range + // of [0, 1]. + Score float64 `json:"score,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. StartPos int64 `json:"startPos,omitempty"` @@ -2743,6 +2845,20 @@ func (s GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim + 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 +} + // GoogleCloudDiscoveryengineV1CheckGroundingSpec: Specification for the // grounding check. type GoogleCloudDiscoveryengineV1CheckGroundingSpec struct { @@ -2943,7 +3059,7 @@ type GoogleCloudDiscoveryengineV1CloudSqlSource struct { // additional cost. More info can be found here // (https://cloud.google.com/sql/pricing#serverless). Offload bool `json:"offload,omitempty"` - // ProjectId: The project ID that the Cloud SQL source is in with a length + // ProjectId: The project ID that contains the Cloud SQL source. Has a length // limit of 128 characters. If not specified, inherits the project ID from the // parent request. ProjectId string `json:"projectId,omitempty"` @@ -3192,7 +3308,7 @@ func (s GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, e // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1Control struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -3771,6 +3887,55 @@ func (s *GoogleCloudDiscoveryengineV1CustomAttribute) UnmarshalJSON(data []byte) return nil } +// GoogleCloudDiscoveryengineV1CustomTuningModel: Metadata that describes a +// custom tuned model. +type GoogleCloudDiscoveryengineV1CustomTuningModel struct { + // CreateTime: Timestamp the Model was created at. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: The display name of the model. + DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelState: The state that the model is in (e.g.`TRAINING` or + // `TRAINING_FAILED`). + // + // Possible values: + // "MODEL_STATE_UNSPECIFIED" - Default value. + // "TRAINING_PAUSED" - The model is in a paused training state. + // "TRAINING" - The model is currently training. + // "TRAINING_COMPLETE" - The model has successfully completed training. + // "READY_FOR_SERVING" - The model is ready for serving. + // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` + // Name: Required. The fully qualified resource name of the model. Format: + // `projects/{project_number}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be + // an alpha-numerical string with limit of 40 characters. + Name string `json:"name,omitempty"` + // TrainingStartTime: Timestamp the model training was initiated. + TrainingStartTime string `json:"trainingStartTime,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1CustomTuningModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CustomTuningModel + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1DataStore: DataStore captures global settings // and configs at the DataStore level. type GoogleCloudDiscoveryengineV1DataStore struct { @@ -3782,6 +3947,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -3835,6 +4002,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1WorkspaceConfig `json:"workspaceConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -5422,6 +5593,32 @@ func (s GoogleCloudDiscoveryengineV1ListConversationsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ListCustomModelsResponse: Response message for +// SearchTuningService.ListCustomModels method. +type GoogleCloudDiscoveryengineV1ListCustomModelsResponse struct { + // Models: List of custom tuning models. + Models []*GoogleCloudDiscoveryengineV1CustomTuningModel `json:"models,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Models") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Models") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ListCustomModelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ListCustomModelsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1ListDataStoresResponse: Response message for // DataStoreService.ListDataStores method. type GoogleCloudDiscoveryengineV1ListDataStoresResponse struct { @@ -7645,6 +7842,9 @@ type GoogleCloudDiscoveryengineV1SearchResponseSummary struct { // example, "Reply in the tone of a competing company's CEO". Only used when // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is // set to `true`. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -8010,9 +8210,9 @@ type GoogleCloudDiscoveryengineV1SpannerSource struct { EnableDataBoost bool `json:"enableDataBoost,omitempty"` // InstanceId: Required. The instance ID of the source Spanner table. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Spanner source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table name of the Spanner database that needs to be // imported. @@ -8214,6 +8414,146 @@ func (s GoogleCloudDiscoveryengineV1TextInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1TrainCustomModelMetadata: Metadata related to +// the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1TrainCustomModelMetadata 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelRequest: Request message for +// SearchTuningService.TrainCustomModel method. +type GoogleCloudDiscoveryengineV1TrainCustomModelRequest struct { + // ErrorConfig: The desired location of errors incurred during the data + // ingestion and training. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // GcsTrainingInput: Cloud Storage training input. + GcsTrainingInput *GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput `json:"gcsTrainingInput,omitempty"` + // ModelId: If not provided, a UUID will be generated. + ModelId string `json:"modelId,omitempty"` + // ModelType: Model to be trained. Supported values are: * **search-tuning**: + // Fine tuning the search system based on data provided. + ModelType string `json:"modelType,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput: Cloud +// Storage training data input. +type GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput struct { + // CorpusDataPath: The Cloud Storage corpus data which could be associated in + // train data. The data path format is `gs:///`. A newline delimited + // jsonl/ndjson file. For search-tuning model, each line should have the _id, + // title and text. Example: `{"_id": "doc1", title: "relevant doc", "text": + // "relevant text"}` + CorpusDataPath string `json:"corpusDataPath,omitempty"` + // QueryDataPath: The gcs query data which could be associated in train data. + // The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For + // search-tuning model, each line should have the _id and text. Example: + // {"_id": "query1", "text": "example query"} + QueryDataPath string `json:"queryDataPath,omitempty"` + // TestDataPath: Cloud Storage test data. Same format as train_data_path. If + // not provided, a random 80/20 train/test split will be performed on + // train_data_path. + TestDataPath string `json:"testDataPath,omitempty"` + // TrainDataPath: Cloud Storage training data path whose format should be + // `gs:///`. The file should be in tsv format. Each line should have the doc_id + // and query_id and score (number). For search-tuning model, it should have the + // query-id corpus-id score as tsv file header. The score should be a number in + // `[0, inf+)`. The larger the number is, the more relevant the pair is. + // Example: * `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` + TrainDataPath string `json:"trainDataPath,omitempty"` + // ForceSendFields is a list of field names (e.g. "CorpusDataPath") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CorpusDataPath") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1TrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelName: Fully qualified name of the CustomTuningModel. + ModelName string `json:"modelName,omitempty"` + // ModelStatus: The trained model status. Possible values are: * **bad-data**: + // The training data quality is bad. * **no-improvement**: Tuning didn't + // improve performance. Won't deploy. * **in-progress**: Model training job + // creation is in progress. * **training**: Model is actively training. * + // **evaluating**: The model is evaluating trained metrics. * **indexing**: The + // model trained metrics are indexing. * **ready**: The model is ready for + // serving. + ModelStatus string `json:"modelStatus,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1TransactionInfo: A transaction represents the // entire purchase transaction. type GoogleCloudDiscoveryengineV1TransactionInfo struct { @@ -8522,6 +8862,43 @@ func (s GoogleCloudDiscoveryengineV1UserInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type +// configuration for workspace data +type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control Configuration. type GoogleCloudDiscoveryengineV1alphaAclConfig struct { // IdpConfig: Identity provider config. @@ -8569,6 +8946,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -9267,7 +9647,7 @@ func (s GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]by // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1alphaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -9668,6 +10048,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -9725,6 +10107,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1alphaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AclEnabled") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -13465,13 +13851,50 @@ func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.BatchCreateTargetSites operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.BatchCreateTargetSites operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata 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"` @@ -13599,7 +14022,7 @@ func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byt // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1betaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -13968,6 +14391,8 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -14023,6 +14448,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1betaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -15614,6 +16043,19 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // (https://cloud.google.com/apis/design/standard_fields). If set, then results // will be boosted based on the region_code provided. RegionCode string `json:"regionCode,omitempty"` + // RelevanceThreshold: The relevance threshold of the search results. Default + // to Google defined threshold, leveraging a balance of precision and recall to + // deliver both highly accurate results and comprehensive coverage of relevant + // information. + // + // Possible values: + // "RELEVANCE_THRESHOLD_UNSPECIFIED" - Default value. In this case, server + // behavior defaults to Google defined threshold. + // "LOWEST" - Lowest relevance threshold. + // "LOW" - Low relevance threshold. + // "MEDIUM" - Medium relevance threshold. + // "HIGH" - High relevance threshold. + RelevanceThreshold string `json:"relevanceThreshold,omitempty"` // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` @@ -16927,6 +17369,43 @@ func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -18351,6 +18830,229 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C return ret, nil } +type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { + s *Service + dataStore string + googleclouddiscoveryenginev1traincustommodelrequest *GoogleCloudDiscoveryengineV1TrainCustomModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TrainCustomModel: Trains a custom model. +// +// - dataStore: The resource name of the Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. This field is used to identify the data store where to +// train the models. +func (r *ProjectsLocationsCollectionsDataStoresService) TrainCustomModel(dataStore string, googleclouddiscoveryenginev1traincustommodelrequest *GoogleCloudDiscoveryengineV1TrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + c.googleclouddiscoveryenginev1traincustommodelrequest = googleclouddiscoveryenginev1traincustommodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1traincustommodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataStore}:trainCustomModel") + 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{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// 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 *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) 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 +} + +type ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/batchGetDocumentsMetadata") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse{ + 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 +} + type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -21044,6 +21746,117 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . return ret, nil } +type ProjectsLocationsCollectionsDataStoresCustomModelsListCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of all the custom models. +// +// - dataStore: The resource name of the parent Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. This field is used to identify the data store where to +// fetch the models from. +func (r *ProjectsLocationsCollectionsDataStoresCustomModelsService) List(dataStore string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c := &ProjectsLocationsCollectionsDataStoresCustomModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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/{+dataStore}/customModels") + 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{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.customModels.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ListCustomModelsResponse.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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListCustomModelsResponse, 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 := &GoogleCloudDiscoveryengineV1ListCustomModelsResponse{ + 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 +} + type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { s *Service name string @@ -30245,6 +31058,124 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/batchGetDocumentsMetadata") + 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 "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse.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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse{ + 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 +} + type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index b1d715facca..7bc496fc4e7 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -246,7 +246,7 @@ ] }, "updateAclConfig": { - "description": "Default Acl Configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", + "description": "Default ACL configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", "httpMethod": "PATCH", "id": "discoveryengine.projects.locations.updateAclConfig", @@ -681,6 +681,39 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -4450,6 +4483,39 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -7289,6 +7355,80 @@ ] } } + }, + "userStores": { + "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}/userStores/{userStoresId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/userStores/[^/]+/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}/userStores/{userStoresId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.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/[^/]+/userStores/[^/]+$", + "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}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } } } }, @@ -7365,7 +7505,7 @@ } } }, - "revision": "20240801", + "revision": "20240813", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -7789,7 +7929,7 @@ "id": "GoogleCloudDiscoveryengineV1Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -8003,13 +8143,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -8076,6 +8218,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1Schema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -9034,6 +9180,57 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the data.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", + "type": "string" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -9068,6 +9265,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAclConfig": { "description": "Access Control Configuration.", "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", @@ -9104,7 +9332,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the AlloyDB source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -9128,7 +9356,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -9137,7 +9366,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -10033,6 +10263,63 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse": { + "description": "Response message for DocumentService.BatchGetDocumentsMetadata method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse", + "properties": { + "documentsMetadata": { + "description": "The metadata of the Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata": { + "description": "The metadata of a Document.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata", + "properties": { + "lastRefreshedTime": { + "description": "The timestamp of the last time the Document was last indexed.", + "format": "google-datetime", + "type": "string" + }, + "matcherValue": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "description": "The value of the matcher that was used to match the Document." + }, + "status": { + "description": "The status of the document.", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_INDEXED", + "STATUS_NOT_IN_TARGET_SITE", + "STATUS_NOT_IN_INDEX" + ], + "enumDescriptions": [ + "Should never be set.", + "The Document is indexed.", + "The Document is not indexed because its URI is not in the TargetSite.", + "The Document is not indexed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue": { + "description": "The value of the matcher that was used to match the Document.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "properties": { + "uri": { + "description": "If match by URI, the URI of the Document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest": { "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", "id": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest", @@ -10060,7 +10347,7 @@ "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." }, "projectId": { - "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10211,7 +10498,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Bigtable source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10301,6 +10588,11 @@ "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", "type": "boolean" }, + "score": { + "description": "Confidence score for the claim in the answer candidate, in the range of [0, 1].", + "format": "double", + "type": "number" + }, "startPos": { "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", "format": "int32", @@ -10539,7 +10831,7 @@ "type": "boolean" }, "projectId": { - "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Cloud SQL source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10700,7 +10992,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -11191,13 +11483,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -11273,6 +11567,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -15466,6 +15764,10 @@ "description": "Name of the string field as defined in the schema.", "type": "string" }, + "querySegment": { + "description": "Identifies the keywords within the search query that match a filter.", + "type": "string" + }, "values": { "description": "Values of the string field. The record will only be returned if the field value matches one of the values specified here.", "items": { @@ -15582,7 +15884,8 @@ "POTENTIAL_POLICY_VIOLATION", "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", @@ -15592,7 +15895,8 @@ "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.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -16084,7 +16388,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Spanner source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -16540,6 +16844,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata", @@ -16629,7 +16964,7 @@ "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -16910,13 +17245,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -16987,6 +17324,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1betaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -18136,6 +18477,24 @@ "description": "The Unicode country/region code (CLDR) of a location, such as \"US\" and \"419\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.", "type": "string" }, + "relevanceThreshold": { + "description": "The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.", + "enum": [ + "RELEVANCE_THRESHOLD_UNSPECIFIED", + "LOWEST", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Default value. In this case, server behavior defaults to Google defined threshold.", + "Lowest relevance threshold.", + "Low relevance threshold.", + "Medium relevance threshold.", + "High relevance threshold." + ], + "type": "string" + }, "safeSearch": { "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" @@ -18932,6 +19291,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 911b0337829..4f1ff4eafc5 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -181,6 +181,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Requirements = NewProjectsLocationsRequirementsService(s) rs.SampleQuerySets = NewProjectsLocationsSampleQuerySetsService(s) rs.UserEvents = NewProjectsLocationsUserEventsService(s) + rs.UserStores = NewProjectsLocationsUserStoresService(s) return rs } @@ -206,6 +207,8 @@ type ProjectsLocationsService struct { SampleQuerySets *ProjectsLocationsSampleQuerySetsService UserEvents *ProjectsLocationsUserEventsService + + UserStores *ProjectsLocationsUserStoresService } func NewProjectsLocationsCollectionsService(s *Service) *ProjectsLocationsCollectionsService { @@ -958,6 +961,27 @@ type ProjectsLocationsUserEventsService struct { s *Service } +func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserStoresService { + rs := &ProjectsLocationsUserStoresService{s: s} + rs.Operations = NewProjectsLocationsUserStoresOperationsService(s) + return rs +} + +type ProjectsLocationsUserStoresService struct { + s *Service + + Operations *ProjectsLocationsUserStoresOperationsService +} + +func NewProjectsLocationsUserStoresOperationsService(s *Service) *ProjectsLocationsUserStoresOperationsService { + rs := &ProjectsLocationsUserStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsUserStoresOperationsService struct { + s *Service +} + func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { rs := &ProjectsOperationsService{s: s} return rs @@ -1718,7 +1742,7 @@ func (s GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, e // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1Control struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -2033,6 +2057,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -2086,6 +2112,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1WorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3378,6 +3408,72 @@ func (s GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1TrainCustomModelMetadata: Metadata related to +// the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1TrainCustomModelMetadata 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1TrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelName: Fully qualified name of the CustomTuningModel. + ModelName string `json:"modelName,omitempty"` + // ModelStatus: The trained model status. Possible values are: * **bad-data**: + // The training data quality is bad. * **no-improvement**: Tuning didn't + // improve performance. Won't deploy. * **in-progress**: Model training job + // creation is in progress. * **training**: Model is actively training. * + // **evaluating**: The model is evaluating trained metrics. * **indexing**: The + // model trained metrics are indexing. * **ready**: The model is ready for + // serving. + ModelStatus string `json:"modelStatus,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -3431,6 +3527,43 @@ func (s GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type +// configuration for workspace data +type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control Configuration. type GoogleCloudDiscoveryengineV1alphaAclConfig struct { // IdpConfig: Identity provider config. @@ -3478,9 +3611,9 @@ type GoogleCloudDiscoveryengineV1alphaAlloyDbSource struct { // LocationId: Required. The AlloyDB location to copy the data from with a // length limit of 256 characters. LocationId string `json:"locationId,omitempty"` - // ProjectId: The project ID that the AlloyDB source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the AlloyDB source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The AlloyDB table to copy the data from with a length // limit of 256 characters. @@ -3524,6 +3657,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -4766,6 +4902,91 @@ func (s GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse: Response +// message for DocumentService.BatchGetDocumentsMetadata method. +type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse struct { + // DocumentsMetadata: The metadata of the Documents. + DocumentsMetadata []*GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata `json:"documentsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentsMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentsMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMet +// adata: The metadata of a Document. +type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata struct { + // LastRefreshedTime: The timestamp of the last time the Document was last + // indexed. + LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` + // MatcherValue: The value of the matcher that was used to match the Document. + MatcherValue *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` + // Status: The status of the document. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Should never be set. + // "STATUS_INDEXED" - The Document is indexed. + // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI + // is not in the TargetSite. + // "STATUS_NOT_IN_INDEX" - The Document is not indexed. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "LastRefreshedTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LastRefreshedTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMet +// adataMatcherValue: The value of the matcher that was used to match the +// Document. +type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue struct { + // Uri: If match by URI, the URI of the Document. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest: Request // message for SiteSearchEngineService.BatchVerifyTargetSites method. type GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest struct { @@ -4793,8 +5014,8 @@ type GoogleCloudDiscoveryengineV1alphaBigQuerySource struct { // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in // YYYY-MM-DD format. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery source - // is in with a length limit of 128 characters. If not specified, inherits the + // ProjectId: The project ID or the project number that contains the BigQuery + // source. Has a length limit of 128 characters. If not specified, inherits the // project ID from the parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The BigQuery table to copy the data from with a length @@ -4966,9 +5187,9 @@ type GoogleCloudDiscoveryengineV1alphaBigtableSource struct { // InstanceId: Required. The instance ID of the Cloud Bigtable that needs to be // imported. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Bigtable source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Bigtable source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table ID of the Cloud Bigtable that needs to be // imported. @@ -5101,6 +5322,9 @@ type GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim struct { // done for the claim and therefore citation_indices, and anti_citation_indices // should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // Score: Confidence score for the claim in the answer candidate, in the range + // of [0, 1]. + Score float64 `json:"score,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. StartPos int64 `json:"startPos,omitempty"` @@ -5122,6 +5346,20 @@ func (s GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim + 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 +} + // GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec: Specification for the // grounding check. type GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec struct { @@ -5443,7 +5681,7 @@ type GoogleCloudDiscoveryengineV1alphaCloudSqlSource struct { // additional cost. More info can be found here // (https://cloud.google.com/sql/pricing#serverless). Offload bool `json:"offload,omitempty"` - // ProjectId: The project ID that the Cloud SQL source is in with a length + // ProjectId: The project ID that contains the Cloud SQL source. Has a length // limit of 128 characters. If not specified, inherits the project ID from the // parent request. ProjectId string `json:"projectId,omitempty"` @@ -5693,7 +5931,7 @@ func (s GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]by // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1alphaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -6371,6 +6609,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -6428,6 +6668,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1alphaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -12667,6 +12911,9 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnder type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { // FieldName: Name of the string field as defined in the schema. FieldName string `json:"fieldName,omitempty"` + // QuerySegment: Identifies the keywords within the search query that match a + // filter. + QuerySegment string `json:"querySegment,omitempty"` // Values: Values of the string field. The record will only be returned if the // field value matches one of the values specified here. Values []string `json:"values,omitempty"` @@ -12841,6 +13088,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // example, "Reply in the tone of a competing company's CEO". Only used when // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is // set to `true`. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -13495,9 +13745,9 @@ type GoogleCloudDiscoveryengineV1alphaSpannerSource struct { EnableDataBoost bool `json:"enableDataBoost,omitempty"` // InstanceId: Required. The instance ID of the source Spanner table. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Spanner source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table name of the Spanner database that needs to be // imported. @@ -14184,6 +14434,43 @@ func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata // related to the progress of the // SiteSearchEngineService.BatchCreateTargetSites operation. This will be @@ -14318,7 +14605,7 @@ func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byt // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1betaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -14687,6 +14974,8 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -14742,6 +15031,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1betaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -16333,6 +16626,19 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // (https://cloud.google.com/apis/design/standard_fields). If set, then results // will be boosted based on the region_code provided. RegionCode string `json:"regionCode,omitempty"` + // RelevanceThreshold: The relevance threshold of the search results. Default + // to Google defined threshold, leveraging a balance of precision and recall to + // deliver both highly accurate results and comprehensive coverage of relevant + // information. + // + // Possible values: + // "RELEVANCE_THRESHOLD_UNSPECIFIED" - Default value. In this case, server + // behavior defaults to Google defined threshold. + // "LOWEST" - Lowest relevance threshold. + // "LOW" - Low relevance threshold. + // "MEDIUM" - Medium relevance threshold. + // "HIGH" - High relevance threshold. + RelevanceThreshold string `json:"relevanceThreshold,omitempty"` // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` @@ -17646,6 +17952,43 @@ func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -18446,7 +18789,7 @@ type ProjectsLocationsUpdateAclConfigCall struct { header_ http.Header } -// UpdateAclConfig: Default Acl Configuration for use in a location of a +// UpdateAclConfig: Default ACL configuration for use in a location of a // customer's project. Updates will only reflect to new data stores. Existing // data stores will still use the old value. // @@ -20031,6 +20374,124 @@ func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCal return ret, nil } +type ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/batchGetDocumentsMetadata") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse{ + 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 +} + type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -33951,6 +34412,124 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts return ret, nil } +type ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/batchGetDocumentsMetadata") + 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 "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse.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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse{ + 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 +} + type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -44376,6 +44955,266 @@ func (c *ProjectsLocationsUserEventsWriteCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsUserStoresOperationsGetCall 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 *ProjectsLocationsUserStoresOperationsService) Get(name string) *ProjectsLocationsUserStoresOperationsGetCall { + c := &ProjectsLocationsUserStoresOperationsGetCall{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 +// details. +func (c *ProjectsLocationsUserStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsUserStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsUserStoresOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUserStoresOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "discoveryengine.projects.locations.userStores.operations.get" call. +// 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 *ProjectsLocationsUserStoresOperationsGetCall) 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 +} + +type ProjectsLocationsUserStoresOperationsListCall 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 *ProjectsLocationsUserStoresOperationsService) List(name string) *ProjectsLocationsUserStoresOperationsListCall { + c := &ProjectsLocationsUserStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsUserStoresOperationsListCall) Filter(filter string) *ProjectsLocationsUserStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsUserStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsUserStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsUserStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsUserStoresOperationsListCall { + 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 +// details. +func (c *ProjectsLocationsUserStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsUserStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsUserStoresOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUserStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/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 "discoveryengine.projects.locations.userStores.operations.list" call. +// 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 *ProjectsLocationsUserStoresOperationsListCall) 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 +} + +// 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 *ProjectsLocationsUserStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsOperationsGetCall struct { s *Service name string diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 31200a9968d..89dd27f0197 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -486,6 +486,39 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -4021,6 +4054,39 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -6708,7 +6774,7 @@ } } }, - "revision": "20240801", + "revision": "20240813", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6946,7 +7012,7 @@ "id": "GoogleCloudDiscoveryengineV1Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -7160,13 +7226,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -7233,6 +7301,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1Schema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -8191,6 +8263,57 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the data.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", + "type": "string" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -8225,6 +8348,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAclConfig": { "description": "Access Control Configuration.", "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", @@ -8254,7 +8408,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -8263,7 +8418,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -8805,7 +8961,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -9101,13 +9257,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -9183,6 +9341,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -11793,6 +11955,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaAlloyDbSource": { "description": "AlloyDB source import data from.", "id": "GoogleCloudDiscoveryengineV1betaAlloyDbSource", @@ -11814,7 +12007,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the AlloyDB source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -11838,7 +12031,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -11847,7 +12041,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -12739,6 +12934,63 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse": { + "description": "Response message for DocumentService.BatchGetDocumentsMetadata method.", + "id": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse", + "properties": { + "documentsMetadata": { + "description": "The metadata of the Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata": { + "description": "The metadata of a Document.", + "id": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata", + "properties": { + "lastRefreshedTime": { + "description": "The timestamp of the last time the Document was last indexed.", + "format": "google-datetime", + "type": "string" + }, + "matcherValue": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "description": "The value of the matcher that was used to match the Document." + }, + "status": { + "description": "The status of the document.", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_INDEXED", + "STATUS_NOT_IN_TARGET_SITE", + "STATUS_NOT_IN_INDEX" + ], + "enumDescriptions": [ + "Should never be set.", + "The Document is indexed.", + "The Document is not indexed because its URI is not in the TargetSite.", + "The Document is not indexed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue": { + "description": "The value of the matcher that was used to match the Document.", + "id": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "properties": { + "uri": { + "description": "If match by URI, the URI of the Document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest": { "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", "id": "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest", @@ -12766,7 +13018,7 @@ "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." }, "projectId": { - "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -12917,7 +13169,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Bigtable source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -13007,6 +13259,11 @@ "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", "type": "boolean" }, + "score": { + "description": "Confidence score for the claim in the answer candidate, in the range of [0, 1].", + "format": "double", + "type": "number" + }, "startPos": { "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", "format": "int32", @@ -13156,7 +13413,7 @@ "type": "boolean" }, "projectId": { - "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Cloud SQL source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -13317,7 +13574,7 @@ "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -13793,13 +14050,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "The data store is used for public website search.", + "The data store is used for workspace search. Details of workspace data store are specified in the WorkspaceConfig." ], "type": "string" }, @@ -13870,6 +14129,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1betaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -16305,6 +16568,24 @@ "description": "The Unicode country/region code (CLDR) of a location, such as \"US\" and \"419\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.", "type": "string" }, + "relevanceThreshold": { + "description": "The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.", + "enum": [ + "RELEVANCE_THRESHOLD_UNSPECIFIED", + "LOWEST", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Default value. In this case, server behavior defaults to Google defined threshold.", + "Lowest relevance threshold.", + "Low relevance threshold.", + "Medium relevance threshold.", + "High relevance threshold." + ], + "type": "string" + }, "safeSearch": { "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" @@ -17188,6 +17469,10 @@ "description": "Name of the string field as defined in the schema.", "type": "string" }, + "querySegment": { + "description": "Identifies the keywords within the search query that match a filter.", + "type": "string" + }, "values": { "description": "Values of the string field. The record will only be returned if the field value matches one of the values specified here.", "items": { @@ -17304,7 +17589,8 @@ "POTENTIAL_POLICY_VIOLATION", "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", @@ -17314,7 +17600,8 @@ "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.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -17745,7 +18032,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Spanner source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -18201,6 +18488,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 2e08a729962..3aab80cd75b 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1269,7 +1269,7 @@ func (s GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, e // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1Control struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -1584,6 +1584,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -1637,6 +1639,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1WorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2929,6 +2935,72 @@ func (s GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1TrainCustomModelMetadata: Metadata related to +// the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1TrainCustomModelMetadata 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1TrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelName: Fully qualified name of the CustomTuningModel. + ModelName string `json:"modelName,omitempty"` + // ModelStatus: The trained model status. Possible values are: * **bad-data**: + // The training data quality is bad. * **no-improvement**: Tuning didn't + // improve performance. Won't deploy. * **in-progress**: Model training job + // creation is in progress. * **training**: Model is actively training. * + // **evaluating**: The model is evaluating trained metrics. * **indexing**: The + // model trained metrics are indexing. * **ready**: The model is ready for + // serving. + ModelStatus string `json:"modelStatus,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -2982,6 +3054,43 @@ func (s GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type +// configuration for workspace data +type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1WorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control Configuration. type GoogleCloudDiscoveryengineV1alphaAclConfig struct { // IdpConfig: Identity provider config. @@ -3029,6 +3138,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -3727,7 +3839,7 @@ func (s GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]by // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1alphaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -4128,6 +4240,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -4185,6 +4299,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1alphaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AclEnabled") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -7925,6 +8043,43 @@ func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaAlloyDbSource: AlloyDB source import data // from. type GoogleCloudDiscoveryengineV1betaAlloyDbSource struct { @@ -7943,9 +8098,9 @@ type GoogleCloudDiscoveryengineV1betaAlloyDbSource struct { // LocationId: Required. The AlloyDB location to copy the data from with a // length limit of 256 characters. LocationId string `json:"locationId,omitempty"` - // ProjectId: The project ID that the AlloyDB source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the AlloyDB source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The AlloyDB table to copy the data from with a length // limit of 256 characters. @@ -7989,6 +8144,9 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -9227,6 +9385,91 @@ func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse: Response +// message for DocumentService.BatchGetDocumentsMetadata method. +type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse struct { + // DocumentsMetadata: The metadata of the Documents. + DocumentsMetadata []*GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata `json:"documentsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentsMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentsMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMeta +// data: The metadata of a Document. +type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata struct { + // LastRefreshedTime: The timestamp of the last time the Document was last + // indexed. + LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` + // MatcherValue: The value of the matcher that was used to match the Document. + MatcherValue *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` + // Status: The status of the document. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Should never be set. + // "STATUS_INDEXED" - The Document is indexed. + // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI + // is not in the TargetSite. + // "STATUS_NOT_IN_INDEX" - The Document is not indexed. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "LastRefreshedTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LastRefreshedTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMeta +// dataMatcherValue: The value of the matcher that was used to match the +// Document. +type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue struct { + // Uri: If match by URI, the URI of the Document. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest: Request // message for SiteSearchEngineService.BatchVerifyTargetSites method. type GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest struct { @@ -9254,8 +9497,8 @@ type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in // YYYY-MM-DD format. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery source - // is in with a length limit of 128 characters. If not specified, inherits the + // ProjectId: The project ID or the project number that contains the BigQuery + // source. Has a length limit of 128 characters. If not specified, inherits the // project ID from the parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The BigQuery table to copy the data from with a length @@ -9427,9 +9670,9 @@ type GoogleCloudDiscoveryengineV1betaBigtableSource struct { // InstanceId: Required. The instance ID of the Cloud Bigtable that needs to be // imported. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Bigtable source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Bigtable source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table ID of the Cloud Bigtable that needs to be // imported. @@ -9562,6 +9805,9 @@ type GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim struct { // done for the claim and therefore citation_indices, and anti_citation_indices // should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // Score: Confidence score for the claim in the answer candidate, in the range + // of [0, 1]. + Score float64 `json:"score,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. StartPos int64 `json:"startPos,omitempty"` @@ -9583,6 +9829,20 @@ func (s GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim + 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 +} + // GoogleCloudDiscoveryengineV1betaCheckGroundingSpec: Specification for the // grounding check. type GoogleCloudDiscoveryengineV1betaCheckGroundingSpec struct { @@ -9783,7 +10043,7 @@ type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { // additional cost. More info can be found here // (https://cloud.google.com/sql/pricing#serverless). Offload bool `json:"offload,omitempty"` - // ProjectId: The project ID that the Cloud SQL source is in with a length + // ProjectId: The project ID that contains the Cloud SQL source. Has a length // limit of 128 characters. If not specified, inherits the project ID from the // parent request. ProjectId string `json:"projectId,omitempty"` @@ -10033,7 +10293,7 @@ func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byt // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1betaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -10679,6 +10939,8 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -10734,6 +10996,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1betaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -14340,6 +14606,19 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // (https://cloud.google.com/apis/design/standard_fields). If set, then results // will be boosted based on the region_code provided. RegionCode string `json:"regionCode,omitempty"` + // RelevanceThreshold: The relevance threshold of the search results. Default + // to Google defined threshold, leveraging a balance of precision and recall to + // deliver both highly accurate results and comprehensive coverage of relevant + // information. + // + // Possible values: + // "RELEVANCE_THRESHOLD_UNSPECIFIED" - Default value. In this case, server + // behavior defaults to Google defined threshold. + // "LOWEST" - Lowest relevance threshold. + // "LOW" - Low relevance threshold. + // "MEDIUM" - Medium relevance threshold. + // "HIGH" - High relevance threshold. + RelevanceThreshold string `json:"relevanceThreshold,omitempty"` // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` @@ -15765,6 +16044,9 @@ func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnders type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { // FieldName: Name of the string field as defined in the schema. FieldName string `json:"fieldName,omitempty"` + // QuerySegment: Identifies the keywords within the search query that match a + // filter. + QuerySegment string `json:"querySegment,omitempty"` // Values: Values of the string field. The record will only be returned if the // field value matches one of the values specified here. Values []string `json:"values,omitempty"` @@ -15939,6 +16221,9 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { // example, "Reply in the tone of a competing company's CEO". Only used when // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is // set to `true`. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -16520,9 +16805,9 @@ type GoogleCloudDiscoveryengineV1betaSpannerSource struct { EnableDataBoost bool `json:"enableDataBoost,omitempty"` // InstanceId: Required. The instance ID of the source Spanner table. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Spanner source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table name of the Spanner database that needs to be // imported. @@ -17209,6 +17494,43 @@ func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DasherCustomerId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -18740,6 +19062,124 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... return ret, nil } +type ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/batchGetDocumentsMetadata") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse{ + 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 +} + type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -31804,6 +32244,124 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.urisMatcher.uris", append([]string{}, matcherUrisMatcherUris...)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/batchGetDocumentsMetadata") + 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 "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse.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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse{ + 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 +} + type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index b35165ed3eb..aaf83d7070d 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20240716", + "revision": "20240813", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -4471,6 +4471,10 @@ "$ref": "GoogleCloudDocumentaiV1GcsDocument", "description": "A raw document on Google Cloud Storage." }, + "imagelessMode": { + "description": "Optional. Option to remove images from the document.", + "type": "boolean" + }, "inlineDocument": { "$ref": "GoogleCloudDocumentaiV1Document", "description": "An inline document proto." diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index d942a0a2fe8..46af4f9b57f 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -4839,6 +4839,8 @@ type GoogleCloudDocumentaiV1ProcessRequest struct { FieldMask string `json:"fieldMask,omitempty"` // GcsDocument: A raw document on Google Cloud Storage. GcsDocument *GoogleCloudDocumentaiV1GcsDocument `json:"gcsDocument,omitempty"` + // ImagelessMode: Optional. Option to remove images from the document. + ImagelessMode bool `json:"imagelessMode,omitempty"` // InlineDocument: An inline document proto. InlineDocument *GoogleCloudDocumentaiV1Document `json:"inlineDocument,omitempty"` // Labels: Optional. The labels with user-defined metadata for the request. diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 2f94a28dca8..90f48fb6a5f 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1284,7 +1284,7 @@ } } }, - "revision": "20240716", + "revision": "20240813", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -9073,6 +9073,10 @@ "$ref": "GoogleCloudDocumentaiV1beta3GcsDocument", "description": "A raw document on Google Cloud Storage." }, + "imagelessMode": { + "description": "Optional. Option to remove images from the document.", + "type": "boolean" + }, "inlineDocument": { "$ref": "GoogleCloudDocumentaiV1beta3Document", "description": "An inline document proto." diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index d43435983d5..dac275c3bc6 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -10565,6 +10565,8 @@ type GoogleCloudDocumentaiV1beta3ProcessRequest struct { FieldMask string `json:"fieldMask,omitempty"` // GcsDocument: A raw document on Google Cloud Storage. GcsDocument *GoogleCloudDocumentaiV1beta3GcsDocument `json:"gcsDocument,omitempty"` + // ImagelessMode: Optional. Option to remove images from the document. + ImagelessMode bool `json:"imagelessMode,omitempty"` // InlineDocument: An inline document proto. InlineDocument *GoogleCloudDocumentaiV1beta3Document `json:"inlineDocument,omitempty"` // Labels: Optional. The labels with user-defined metadata for the request. diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 95f38398cf2..3c0de6cf222 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240727", + "revision": "20240809", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2593,6 +2593,44 @@ }, "type": "object" }, + "CompliancePostureConfig": { + "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", + "id": "CompliancePostureConfig", + "properties": { + "complianceStandards": { + "description": "List of enabled compliance standards.", + "items": { + "$ref": "ComplianceStandard" + }, + "type": "array" + }, + "mode": { + "description": "Defines the enablement mode for Compliance Posture.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value not specified.", + "Disables Compliance Posture features on the cluster.", + "Enables Compliance Posture features on the cluster." + ], + "type": "string" + } + }, + "type": "object" + }, + "ComplianceStandard": { + "id": "ComplianceStandard", + "properties": { + "standard": { + "description": "Name of the compliance standard.", + "type": "string" + } + }, + "type": "object" + }, "ConfigManagementConfigSync": { "description": "Configuration for Config Sync", "id": "ConfigManagementConfigSync", @@ -3559,6 +3597,10 @@ "$ref": "BinaryAuthorizationConfig", "description": "Optional. Enable/Disable binary authorization features for the cluster." }, + "compliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Optional. Enable/Disable Compliance Posture features for the cluster. Note that on UpdateFleet, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask." + }, "securityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture features for the cluster." diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 50024af0dc1..15044b88568 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -1062,6 +1062,57 @@ func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CompliancePostureConfig: CompliancePostureConfig defines the settings needed +// to enable/disable features for the Compliance Posture. +type CompliancePostureConfig struct { + // ComplianceStandards: List of enabled compliance standards. + ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` + // Mode: Defines the enablement mode for Compliance Posture. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value not specified. + // "DISABLED" - Disables Compliance Posture features on the cluster. + // "ENABLED" - Enables Compliance Posture features on the cluster. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ComplianceStandards") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) { + type NoMethod CompliancePostureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ComplianceStandard struct { + // Standard: Name of the compliance standard. + Standard string `json:"standard,omitempty"` + // ForceSendFields is a list of field names (e.g. "Standard") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Standard") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ComplianceStandard) MarshalJSON() ([]byte, error) { + type NoMethod ComplianceStandard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConfigManagementConfigSync: Configuration for Config Sync type ConfigManagementConfigSync struct { // AllowVerticalScale: Set to true to allow the vertical scaling. Defaults to @@ -2059,6 +2110,11 @@ type DefaultClusterConfig struct { // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization // features for the cluster. BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` + // CompliancePostureConfig: Optional. Enable/Disable Compliance Posture + // features for the cluster. Note that on UpdateFleet, only full replacement of + // this field is allowed. Users are not allowed for partial updates through + // field mask. + CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` // SecurityPostureConfig: Enable/Disable Security Posture features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 28959f8014d..3996215ce41 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240727", + "revision": "20240809", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2627,6 +2627,44 @@ }, "type": "object" }, + "CompliancePostureConfig": { + "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", + "id": "CompliancePostureConfig", + "properties": { + "complianceStandards": { + "description": "List of enabled compliance standards.", + "items": { + "$ref": "ComplianceStandard" + }, + "type": "array" + }, + "mode": { + "description": "Defines the enablement mode for Compliance Posture.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value not specified.", + "Disables Compliance Posture features on the cluster.", + "Enables Compliance Posture features on the cluster." + ], + "type": "string" + } + }, + "type": "object" + }, + "ComplianceStandard": { + "id": "ComplianceStandard", + "properties": { + "standard": { + "description": "Name of the compliance standard.", + "type": "string" + } + }, + "type": "object" + }, "ConfigManagementBinauthzConfig": { "description": "Configuration for Binauthz", "id": "ConfigManagementBinauthzConfig", @@ -3653,6 +3691,10 @@ "$ref": "BinaryAuthorizationConfig", "description": "Optional. Enable/Disable binary authorization features for the cluster." }, + "compliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Optional. Enable/Disable Compliance Posture features for the cluster. Note that on UpdateFleet, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask." + }, "securityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture features for the cluster." diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index b534ff73d64..988f7248767 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1115,6 +1115,57 @@ func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CompliancePostureConfig: CompliancePostureConfig defines the settings needed +// to enable/disable features for the Compliance Posture. +type CompliancePostureConfig struct { + // ComplianceStandards: List of enabled compliance standards. + ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` + // Mode: Defines the enablement mode for Compliance Posture. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value not specified. + // "DISABLED" - Disables Compliance Posture features on the cluster. + // "ENABLED" - Enables Compliance Posture features on the cluster. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ComplianceStandards") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) { + type NoMethod CompliancePostureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ComplianceStandard struct { + // Standard: Name of the compliance standard. + Standard string `json:"standard,omitempty"` + // ForceSendFields is a list of field names (e.g. "Standard") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Standard") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ComplianceStandard) MarshalJSON() ([]byte, error) { + type NoMethod ComplianceStandard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConfigManagementBinauthzConfig: Configuration for Binauthz type ConfigManagementBinauthzConfig struct { // Enabled: Whether binauthz is enabled in this cluster. @@ -2192,6 +2243,11 @@ type DefaultClusterConfig struct { // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization // features for the cluster. BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` + // CompliancePostureConfig: Optional. Enable/Disable Compliance Posture + // features for the cluster. Note that on UpdateFleet, only full replacement of + // this field is allowed. Users are not allowed for partial updates through + // field mask. + CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` // SecurityPostureConfig: Enable/Disable Security Posture features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` diff --git a/gkehub/v2beta/gkehub-api.json b/gkehub/v2beta/gkehub-api.json new file mode 100644 index 00000000000..a587b00fb0a --- /dev/null +++ b/gkehub/v2beta/gkehub-api.json @@ -0,0 +1,435 @@ +{ + "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://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "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": "gkehub:v2beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "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": "v2beta/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2beta/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.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": "v2beta/{+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": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "gkehub.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": "v2beta/{+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": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "gkehub.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": "v2beta/{+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": "v2beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.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": "v2beta/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20240809", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "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" + }, + "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", + "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" + }, + "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" + }, + "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": "GoogleRpcStatus", + "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" + } + }, + "servicePath": "", + "title": "GKE Hub API", + "version": "v2beta", + "version_module": true +} \ No newline at end of file diff --git a/gkehub/v2beta/gkehub-gen.go b/gkehub/v2beta/gkehub-gen.go new file mode 100644 index 00000000000..65b2ca83dc2 --- /dev/null +++ b/gkehub/v2beta/gkehub-gen.go @@ -0,0 +1,1004 @@ +// Copyright 2024 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 gkehub provides access to the GKE Hub API. +// +// 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: +// +// import "google.golang.org/api/gkehub/v2beta" +// ... +// 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. +// +// # 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]: +// +// 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 [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 [google.golang.org/api/option.ClientOption] for details on options. +package gkehub // import "google.golang.org/api/gkehub/v2beta" + +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 = "gkehub:v2beta" +const apiName = "gkehub" +const apiVersion = "v2beta" +const basePath = "https://gkehub.googleapis.com/" +const basePathTemplate = "https://gkehub.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://gkehub.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.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + 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) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// 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:"-"` +} + +// 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), 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 *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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "gkehub.projects.locations.get" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "gkehub.projects.locations.list" call. +// 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 +} + +// 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")) + 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 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 +// details. +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. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "gkehub.projects.locations.operations.cancel" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "gkehub.projects.locations.operations.get" call. +// 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 +} + +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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2beta/{+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 "gkehub.projects.locations.operations.list" call. +// 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 +} + +// 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")) + 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) + } +} diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index c7f8c380522..79c3ba49dcc 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2812,7 +2812,7 @@ } } }, - "revision": "20240717", + "revision": "20240807", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptHubSpokeRequest": { @@ -2963,13 +2963,15 @@ "STATE_UNSPECIFIED", "VALID", "CONNECTION_POLICY_MISSING", - "POLICY_LIMIT_REACHED" + "POLICY_LIMIT_REACHED", + "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" ], "enumDescriptions": [ "Default state, when Connection Map is created initially.", "Set when policy and map configuration is valid, and their matching can lead to allowing creation of PSC Connections subject to other constraints like connections limit.", "No Service Connection Policy found for this network and Service Class", - "Service Connection Policy limit reached for this network and Service Class" + "Service Connection Policy limit reached for this network and Service Class", + "The consumer instance project is not in AllowedGoogleProducersResourceHierarchyLevels of the matching ServiceConnectionPolicy." ], "readOnly": true, "type": "string" @@ -3620,6 +3622,14 @@ }, "type": "array" }, + "producerVpcSpokes": { + "description": "Output only. The list of Producer VPC spokes that this VPC spoke is a service consumer VPC spoke for. These producer VPCs are connected through VPC peering to this spoke's backing VPC network.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "uri": { "description": "Required. The URI of the VPC network resource.", "type": "string" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 25e9e741598..444fb9ff1c8 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -643,6 +643,9 @@ type ConsumerPscConfig struct { // network and Service Class // "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for this // network and Service Class + // "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance + // project is not in AllowedGoogleProducersResourceHierarchyLevels of the + // matching ServiceConnectionPolicy. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "ConsumerInstanceProject") to // unconditionally include in API requests. By default, fields with empty or @@ -1377,6 +1380,10 @@ type LinkedVpcNetwork struct { // IncludeExportRanges: Optional. IP ranges allowed to be included from // peering. IncludeExportRanges []string `json:"includeExportRanges,omitempty"` + // ProducerVpcSpokes: Output only. The list of Producer VPC spokes that this + // VPC spoke is a service consumer VPC spoke for. These producer VPCs are + // connected through VPC peering to this spoke's backing VPC network. + ProducerVpcSpokes []string `json:"producerVpcSpokes,omitempty"` // Uri: Required. The URI of the VPC network resource. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "ExcludeExportRanges") to diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index c7114e4c842..3f963fa79d2 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -1116,7 +1116,7 @@ } } }, - "revision": "20240423", + "revision": "20240807", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1393,6 +1393,10 @@ "description": "User-defined labels.", "type": "object" }, + "migration": { + "$ref": "Migration", + "description": "Optional. Should be present if usage is set to FOR_MIGRATION." + }, "name": { "description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", "type": "string" @@ -1456,12 +1460,14 @@ "enum": [ "USAGE_UNSPECIFIED", "FOR_VPC", - "EXTERNAL_TO_VPC" + "EXTERNAL_TO_VPC", + "FOR_MIGRATION" ], "enumDescriptions": [ "Unspecified usage is allowed in calls which identify the resource by other fields and do not need Usage set to complete. These are, i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be specified explicitly in CreateInternalRange or UpdateInternalRange calls.", "A VPC resource can use the reserved CIDR block by associating it with the internal range resource if usage is set to FOR_VPC.", - "Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases such as usage on-premises, with dynamic route announcements via Interconnect." + "Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases such as usage on-premises, with dynamic route announcements via Interconnect.", + "Ranges created FOR_MIGRATION can be used to lock a CIDR range between a source and target subnet. If usage is set to FOR_MIGRATION the peering value has to be set to FOR_SELF or default to FOR_SELF when unset." ], "type": "string" }, @@ -1603,6 +1609,21 @@ }, "type": "object" }, + "Migration": { + "description": "Specification for migration with source and target resource names.", + "id": "Migration", + "properties": { + "source": { + "description": "Immutable. Resource path as an URI of the source resource, for example a subnet. The project for the source resource should match the project for the InternalRange. An example: /projects/{project}/regions/{region}/subnetworks/{subnet}", + "type": "string" + }, + "target": { + "description": "Immutable. Resource path of the target resource. The target project can be different, as in the cases when migrating to peer networks. The resource For example: /projects/{project}/regions/{region}/subnetworks/{subnet}", + "type": "string" + } + }, + "type": "object" + }, "OperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "OperationMetadata", diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 7e836bee98f..b6aef193027 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -648,6 +648,8 @@ type InternalRange struct { IpCidrRange string `json:"ipCidrRange,omitempty"` // Labels: User-defined labels. Labels map[string]string `json:"labels,omitempty"` + // Migration: Optional. Should be present if usage is set to FOR_MIGRATION. + Migration *Migration `json:"migration,omitempty"` // Name: Immutable. The name of an internal range. Format: // projects/{project}/locations/{location}/internalRanges/{internal_range} See: // https://google.aip.dev/122#fields-representing-resource-names @@ -718,6 +720,10 @@ type InternalRange struct { // associated with VPC resources and are meant to block out address ranges for // various use cases such as usage on-premises, with dynamic route // announcements via Interconnect. + // "FOR_MIGRATION" - Ranges created FOR_MIGRATION can be used to lock a CIDR + // range between a source and target subnet. If usage is set to FOR_MIGRATION + // the peering value has to be set to FOR_SELF or default to FOR_SELF when + // unset. Usage string `json:"usage,omitempty"` // Users: Output only. The list of resources that refer to this internal range. // Resources that use the internal range for their range allocation are @@ -906,6 +912,37 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Migration: Specification for migration with source and target resource +// names. +type Migration struct { + // Source: Immutable. Resource path as an URI of the source resource, for + // example a subnet. The project for the source resource should match the + // project for the InternalRange. An example: + // /projects/{project}/regions/{region}/subnetworks/{subnet} + Source string `json:"source,omitempty"` + // Target: Immutable. Resource path of the target resource. The target project + // can be different, as in the cases when migrating to peer networks. The + // resource For example: + // /projects/{project}/regions/{region}/subnetworks/{subnet} + Target string `json:"target,omitempty"` + // ForceSendFields is a list of field names (e.g. "Source") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Source") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Migration) MarshalJSON() ([]byte, error) { + type NoMethod Migration + return gensupport.MarshalJSON(NoMethod(s), 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. diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index 91f9cee8b6d..a423ad4c106 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -170,7 +170,7 @@ } } }, - "revision": "20240725", + "revision": "20240813", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { @@ -367,7 +367,7 @@ "type": "object" }, "DeviceIntegrity": { - "description": "Contains the device attestation information. Next tag: 4", + "description": "Contains the device attestation information.", "id": "DeviceIntegrity", "properties": { "deviceRecall": { @@ -403,7 +403,7 @@ "type": "object" }, "DeviceRecall": { - "description": "Contains the recall bits per device set by the developer. Next tag: 3", + "description": "Contains the recall bits per device set by the developer.", "id": "DeviceRecall", "properties": { "values": { @@ -589,7 +589,7 @@ "id": "WriteDeviceRecallRequest", "properties": { "integrityToken": { - "description": "Required. Integrity token obtained from calling Play Integrity API. Note that the integrity token contains the existing device recall bits. The write will only succeed if those bits in the integrity token are up to date.", + "description": "Required. Integrity token obtained from calling Play Integrity API.", "type": "string" }, "newValues": { diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index eddf6faa50c..eba28198029 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -428,7 +428,7 @@ func (s DecodeIntegrityTokenResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DeviceIntegrity: Contains the device attestation information. Next tag: 4 +// DeviceIntegrity: Contains the device attestation information. type DeviceIntegrity struct { // DeviceRecall: Details about the device recall bits set by the developer. DeviceRecall *DeviceRecall `json:"deviceRecall,omitempty"` @@ -470,8 +470,7 @@ func (s DeviceIntegrity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DeviceRecall: Contains the recall bits per device set by the developer. Next -// tag: 3 +// DeviceRecall: Contains the recall bits per device set by the developer. type DeviceRecall struct { // Values: Required. Contains the recall bits values. Values *Values `json:"values,omitempty"` @@ -721,9 +720,7 @@ func (s WriteDates) MarshalJSON() ([]byte, error) { // WriteDeviceRecallRequest: Request to write device recall bits. type WriteDeviceRecallRequest struct { // IntegrityToken: Required. Integrity token obtained from calling Play - // Integrity API. Note that the integrity token contains the existing device - // recall bits. The write will only succeed if those bits in the integrity - // token are up to date. + // Integrity API. IntegrityToken string `json:"integrityToken,omitempty"` // NewValues: Required. The new values for the device recall bits to be // written. diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 862c71346ce..8131657b50f 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240711", + "revision": "20240812", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -987,6 +987,10 @@ "readOnly": true, "type": "string" }, + "crossClusterReplicationConfig": { + "$ref": "CrossClusterReplicationConfig", + "description": "Optional. Cross cluster replication config." + }, "deletionProtectionEnabled": { "description": "Optional. The delete operation will fail when the value is set to true.", "type": "boolean" @@ -1059,7 +1063,7 @@ "type": "integer" }, "shardCount": { - "description": "Required. Number of shards for the Redis cluster.", + "description": "Optional. Number of shards for the Redis cluster.", "format": "int32", "type": "integer" }, @@ -1165,40 +1169,61 @@ }, "type": "object" }, - "CustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", - "id": "CustomMetadataData", + "CrossClusterReplicationConfig": { + "description": "Cross cluster replication config.", + "id": "CrossClusterReplicationConfig", "properties": { - "databaseMetadata": { + "clusterRole": { + "description": "The role of the cluster in cross cluster replication.", + "enum": [ + "CLUSTER_ROLE_UNSPECIFIED", + "NONE", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "Cluster role is not set. The behavior is equivalent to NONE.", + "This cluster does not participate in cross cluster replication. It is an independent cluster and does not replicate to or from any other clusters.", + "A cluster that allows both reads and writes. Any data written to this cluster is also replicated to the attached secondary clusters.", + "A cluster that allows only reads and replicates data from a primary cluster." + ], + "type": "string" + }, + "membership": { + "$ref": "Membership", + "description": "Output only. An output only view of all the member clusters participating in the cross cluster replication. This view will be provided by every member cluster irrespective of its cluster role(primary or secondary). A primary cluster can provide information about all the secondary clusters replicating from it. However, a secondary cluster only knows about the primary cluster from which it is replicating. However, for scenarios, where the primary cluster is unavailable(e.g. regional outage), a GetCluster request can be sent to any other member cluster and this field will list all the member clusters participating in cross cluster replication.", + "readOnly": true + }, + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Details of the primary cluster that is used as the replication source for this secondary cluster. This field is only set for a secondary cluster." + }, + "secondaryClusters": { + "description": "List of secondary clusters that are replicating from this primary cluster. This field is only set for a primary cluster.", "items": { - "$ref": "DatabaseMetadata" + "$ref": "RemoteCluster" }, "type": "array" + }, + "updateTime": { + "description": "Output only. The last time cross cluster replication config was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "DatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "DatabaseMetadata", + "CustomMetadataData": { + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "id": "CustomMetadataData", "properties": { - "backupConfiguration": { - "$ref": "BackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "BackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "Product" - }, - "resourceId": { - "$ref": "DatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", + "items": { + "$ref": "InternalResourceMetadata" + }, + "type": "array" } }, "type": "object" @@ -1340,6 +1365,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -1636,7 +1679,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -2570,6 +2613,31 @@ }, "type": "object" }, + "InternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "InternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "Product" + }, + "resourceId": { + "$ref": "DatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response for ListClusters.", "id": "ListClustersResponse", @@ -2780,6 +2848,26 @@ }, "type": "object" }, + "Membership": { + "description": "An output only view of all the member clusters participating in the cross cluster replication.", + "id": "Membership", + "properties": { + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Output only. The primary cluster that acts as the source of replication for the secondary clusters.", + "readOnly": true + }, + "secondaryClusters": { + "description": "Output only. The list of secondary clusters replicating from the primary cluster.", + "items": { + "$ref": "RemoteCluster" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "NodeInfo": { "description": "Node specific properties.", "id": "NodeInfo", @@ -3050,7 +3138,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -3066,6 +3156,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -3082,7 +3174,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -3099,7 +3193,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -3112,6 +3207,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -3125,7 +3221,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -3238,6 +3335,22 @@ }, "type": "object" }, + "RemoteCluster": { + "description": "Details of the remote cluster associated with this cluster in a cross cluster replication setup.", + "id": "RemoteCluster", + "properties": { + "cluster": { + "description": "The full resource path of the remote cluster in the format: projects//locations//clusters/", + "type": "string" + }, + "uid": { + "description": "Output only. The unique identifier of the remote cluster.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 6f66010a01a..b6ce611ff38 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -409,6 +409,8 @@ type Cluster struct { // CreateTime: Output only. The timestamp associated with the cluster creation // request. CreateTime string `json:"createTime,omitempty"` + // CrossClusterReplicationConfig: Optional. Cross cluster replication config. + CrossClusterReplicationConfig *CrossClusterReplicationConfig `json:"crossClusterReplicationConfig,omitempty"` // DeletionProtectionEnabled: Optional. The delete operation will fail when the // value is set to true. DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` @@ -447,7 +449,7 @@ type Cluster struct { RedisConfigs map[string]string `json:"redisConfigs,omitempty"` // ReplicaCount: Optional. The number of replica nodes per shard. ReplicaCount int64 `json:"replicaCount,omitempty"` - // ShardCount: Required. Number of shards for the Redis cluster. + // ShardCount: Optional. Number of shards for the Redis cluster. ShardCount int64 `json:"shardCount,omitempty"` // SizeGb: Output only. Redis memory size in GB for the entire cluster rounded // up to the next integer. @@ -574,58 +576,84 @@ func (s Compliance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CustomMetadataData: Any custom metadata associated with the resource. i.e. A -// spanner instance can have multiple databases with its own unique metadata. -// Information for these individual databases can be captured in custom -// metadata data -type CustomMetadataData struct { - DatabaseMetadata []*DatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to +// CrossClusterReplicationConfig: Cross cluster replication config. +type CrossClusterReplicationConfig struct { + // ClusterRole: The role of the cluster in cross cluster replication. + // + // Possible values: + // "CLUSTER_ROLE_UNSPECIFIED" - Cluster role is not set. The behavior is + // equivalent to NONE. + // "NONE" - This cluster does not participate in cross cluster replication. + // It is an independent cluster and does not replicate to or from any other + // clusters. + // "PRIMARY" - A cluster that allows both reads and writes. Any data written + // to this cluster is also replicated to the attached secondary clusters. + // "SECONDARY" - A cluster that allows only reads and replicates data from a + // primary cluster. + ClusterRole string `json:"clusterRole,omitempty"` + // Membership: Output only. An output only view of all the member clusters + // participating in the cross cluster replication. This view will be provided + // by every member cluster irrespective of its cluster role(primary or + // secondary). A primary cluster can provide information about all the + // secondary clusters replicating from it. However, a secondary cluster only + // knows about the primary cluster from which it is replicating. However, for + // scenarios, where the primary cluster is unavailable(e.g. regional outage), a + // GetCluster request can be sent to any other member cluster and this field + // will list all the member clusters participating in cross cluster + // replication. + Membership *Membership `json:"membership,omitempty"` + // PrimaryCluster: Details of the primary cluster that is used as the + // replication source for this secondary cluster. This field is only set for a + // secondary cluster. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: List of secondary clusters that are replicating from this + // primary cluster. This field is only set for a primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // UpdateTime: Output only. The last time cross cluster replication config was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterRole") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ClusterRole") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s CustomMetadataData) MarshalJSON() ([]byte, error) { - type NoMethod CustomMetadataData +func (s CrossClusterReplicationConfig) MarshalJSON() ([]byte, error) { + type NoMethod CrossClusterReplicationConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DatabaseMetadata: Metadata for individual databases created in an instance. -// i.e. spanner instance can have multiple databases with unique configuration -// settings. -type DatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *BackupRun `json:"backupRun,omitempty"` - Product *Product `json:"product,omitempty"` - ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") to - // unconditionally include in API requests. By default, fields with empty or +// CustomMetadataData: Any custom metadata associated with the resource. e.g. A +// spanner instance can have multiple databases with its own unique metadata. +// Information for these individual databases can be captured in custom +// metadata data +type CustomMetadataData struct { + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*InternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupConfiguration") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "InternalResourceMetadata") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s DatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseMetadata +func (s CustomMetadataData) MarshalJSON() ([]byte, error) { + type NoMethod CustomMetadataData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -736,6 +764,22 @@ type DatabaseResourceHealthSignalData struct { // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -973,8 +1017,10 @@ type DatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -1875,6 +1921,39 @@ func (s InstanceAuthString) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InternalResourceMetadata: Metadata for individual internal resources in an +// instance. e.g. spanner instance can have multiple databases with unique +// configuration settings. Similarly bigtable can have multiple clusters within +// same bigtable instance. +type InternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *BackupRun `json:"backupRun,omitempty"` + Product *Product `json:"product,omitempty"` + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupConfiguration") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response for ListClusters. type ListClustersResponse struct { // Clusters: A list of Redis clusters in the project in the specified location, @@ -2159,6 +2238,33 @@ func (s ManagedCertificateAuthority) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Membership: An output only view of all the member clusters participating in +// the cross cluster replication. +type Membership struct { + // PrimaryCluster: Output only. The primary cluster that acts as the source of + // replication for the secondary clusters. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: Output only. The list of secondary clusters replicating + // from the primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryCluster") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrimaryCluster") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Membership) MarshalJSON() ([]byte, error) { + type NoMethod Membership + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NodeInfo: Node specific properties. type NodeInfo struct { // Id: Output only. Node identifying string. e.g. 'node-0', 'node-1' @@ -2456,6 +2562,8 @@ type Product struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -2473,6 +2581,7 @@ type Product struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -2623,6 +2732,32 @@ func (s ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RemoteCluster: Details of the remote cluster associated with this cluster in +// a cross cluster replication setup. +type RemoteCluster struct { + // Cluster: The full resource path of the remote cluster in the format: + // projects//locations//clusters/ + Cluster string `json:"cluster,omitempty"` + // Uid: Output only. The unique identifier of the remote cluster. + Uid string `json:"uid,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cluster") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RemoteCluster) MarshalJSON() ([]byte, error) { + type NoMethod RemoteCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 4760ddc20df..7742c590964 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240711", + "revision": "20240812", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -987,6 +987,10 @@ "readOnly": true, "type": "string" }, + "crossClusterReplicationConfig": { + "$ref": "CrossClusterReplicationConfig", + "description": "Optional. Cross cluster replication config." + }, "deletionProtectionEnabled": { "description": "Optional. The delete operation will fail when the value is set to true.", "type": "boolean" @@ -1059,7 +1063,7 @@ "type": "integer" }, "shardCount": { - "description": "Required. Number of shards for the Redis cluster.", + "description": "Optional. Number of shards for the Redis cluster.", "format": "int32", "type": "integer" }, @@ -1165,40 +1169,61 @@ }, "type": "object" }, - "CustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", - "id": "CustomMetadataData", + "CrossClusterReplicationConfig": { + "description": "Cross cluster replication config.", + "id": "CrossClusterReplicationConfig", "properties": { - "databaseMetadata": { + "clusterRole": { + "description": "The role of the cluster in cross cluster replication.", + "enum": [ + "CLUSTER_ROLE_UNSPECIFIED", + "NONE", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "Cluster role is not set. The behavior is equivalent to NONE.", + "This cluster does not participate in cross cluster replication. It is an independent cluster and does not replicate to or from any other clusters.", + "A cluster that allows both reads and writes. Any data written to this cluster is also replicated to the attached secondary clusters.", + "A cluster that allows only reads and replicates data from a primary cluster." + ], + "type": "string" + }, + "membership": { + "$ref": "Membership", + "description": "Output only. An output only view of all the member clusters participating in the cross cluster replication. This view will be provided by every member cluster irrespective of its cluster role(primary or secondary). A primary cluster can provide information about all the secondary clusters replicating from it. However, a secondary cluster only knows about the primary cluster from which it is replicating. However, for scenarios, where the primary cluster is unavailable(e.g. regional outage), a GetCluster request can be sent to any other member cluster and this field will list all the member clusters participating in cross cluster replication.", + "readOnly": true + }, + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Details of the primary cluster that is used as the replication source for this secondary cluster. This field is only set for a secondary cluster." + }, + "secondaryClusters": { + "description": "List of secondary clusters that are replicating from this primary cluster. This field is only set for a primary cluster.", "items": { - "$ref": "DatabaseMetadata" + "$ref": "RemoteCluster" }, "type": "array" + }, + "updateTime": { + "description": "Output only. The last time cross cluster replication config was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "DatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "DatabaseMetadata", + "CustomMetadataData": { + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "id": "CustomMetadataData", "properties": { - "backupConfiguration": { - "$ref": "BackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "BackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "Product" - }, - "resourceId": { - "$ref": "DatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", + "items": { + "$ref": "InternalResourceMetadata" + }, + "type": "array" } }, "type": "object" @@ -1340,6 +1365,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -1636,7 +1679,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -2577,6 +2620,31 @@ }, "type": "object" }, + "InternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "InternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "Product" + }, + "resourceId": { + "$ref": "DatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response for ListClusters.", "id": "ListClustersResponse", @@ -2787,6 +2855,26 @@ }, "type": "object" }, + "Membership": { + "description": "An output only view of all the member clusters participating in the cross cluster replication.", + "id": "Membership", + "properties": { + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Output only. The primary cluster that acts as the source of replication for the secondary clusters.", + "readOnly": true + }, + "secondaryClusters": { + "description": "Output only. The list of secondary clusters replicating from the primary cluster.", + "items": { + "$ref": "RemoteCluster" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "NodeInfo": { "description": "Node specific properties.", "id": "NodeInfo", @@ -3057,7 +3145,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -3073,6 +3163,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -3089,7 +3181,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -3106,7 +3200,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -3119,6 +3214,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -3132,7 +3228,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -3245,6 +3342,22 @@ }, "type": "object" }, + "RemoteCluster": { + "description": "Details of the remote cluster associated with this cluster in a cross cluster replication setup.", + "id": "RemoteCluster", + "properties": { + "cluster": { + "description": "The full resource path of the remote cluster in the format: projects//locations//clusters/", + "type": "string" + }, + "uid": { + "description": "Output only. The unique identifier of the remote cluster.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index c3a5b40177f..ab078697e2d 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -409,6 +409,8 @@ type Cluster struct { // CreateTime: Output only. The timestamp associated with the cluster creation // request. CreateTime string `json:"createTime,omitempty"` + // CrossClusterReplicationConfig: Optional. Cross cluster replication config. + CrossClusterReplicationConfig *CrossClusterReplicationConfig `json:"crossClusterReplicationConfig,omitempty"` // DeletionProtectionEnabled: Optional. The delete operation will fail when the // value is set to true. DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` @@ -447,7 +449,7 @@ type Cluster struct { RedisConfigs map[string]string `json:"redisConfigs,omitempty"` // ReplicaCount: Optional. The number of replica nodes per shard. ReplicaCount int64 `json:"replicaCount,omitempty"` - // ShardCount: Required. Number of shards for the Redis cluster. + // ShardCount: Optional. Number of shards for the Redis cluster. ShardCount int64 `json:"shardCount,omitempty"` // SizeGb: Output only. Redis memory size in GB for the entire cluster rounded // up to the next integer. @@ -574,58 +576,84 @@ func (s Compliance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CustomMetadataData: Any custom metadata associated with the resource. i.e. A -// spanner instance can have multiple databases with its own unique metadata. -// Information for these individual databases can be captured in custom -// metadata data -type CustomMetadataData struct { - DatabaseMetadata []*DatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to +// CrossClusterReplicationConfig: Cross cluster replication config. +type CrossClusterReplicationConfig struct { + // ClusterRole: The role of the cluster in cross cluster replication. + // + // Possible values: + // "CLUSTER_ROLE_UNSPECIFIED" - Cluster role is not set. The behavior is + // equivalent to NONE. + // "NONE" - This cluster does not participate in cross cluster replication. + // It is an independent cluster and does not replicate to or from any other + // clusters. + // "PRIMARY" - A cluster that allows both reads and writes. Any data written + // to this cluster is also replicated to the attached secondary clusters. + // "SECONDARY" - A cluster that allows only reads and replicates data from a + // primary cluster. + ClusterRole string `json:"clusterRole,omitempty"` + // Membership: Output only. An output only view of all the member clusters + // participating in the cross cluster replication. This view will be provided + // by every member cluster irrespective of its cluster role(primary or + // secondary). A primary cluster can provide information about all the + // secondary clusters replicating from it. However, a secondary cluster only + // knows about the primary cluster from which it is replicating. However, for + // scenarios, where the primary cluster is unavailable(e.g. regional outage), a + // GetCluster request can be sent to any other member cluster and this field + // will list all the member clusters participating in cross cluster + // replication. + Membership *Membership `json:"membership,omitempty"` + // PrimaryCluster: Details of the primary cluster that is used as the + // replication source for this secondary cluster. This field is only set for a + // secondary cluster. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: List of secondary clusters that are replicating from this + // primary cluster. This field is only set for a primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // UpdateTime: Output only. The last time cross cluster replication config was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterRole") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ClusterRole") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s CustomMetadataData) MarshalJSON() ([]byte, error) { - type NoMethod CustomMetadataData +func (s CrossClusterReplicationConfig) MarshalJSON() ([]byte, error) { + type NoMethod CrossClusterReplicationConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DatabaseMetadata: Metadata for individual databases created in an instance. -// i.e. spanner instance can have multiple databases with unique configuration -// settings. -type DatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *BackupRun `json:"backupRun,omitempty"` - Product *Product `json:"product,omitempty"` - ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") to - // unconditionally include in API requests. By default, fields with empty or +// CustomMetadataData: Any custom metadata associated with the resource. e.g. A +// spanner instance can have multiple databases with its own unique metadata. +// Information for these individual databases can be captured in custom +// metadata data +type CustomMetadataData struct { + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*InternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupConfiguration") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "InternalResourceMetadata") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s DatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseMetadata +func (s CustomMetadataData) MarshalJSON() ([]byte, error) { + type NoMethod CustomMetadataData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -736,6 +764,22 @@ type DatabaseResourceHealthSignalData struct { // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -973,8 +1017,10 @@ type DatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -1879,6 +1925,39 @@ func (s InstanceAuthString) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InternalResourceMetadata: Metadata for individual internal resources in an +// instance. e.g. spanner instance can have multiple databases with unique +// configuration settings. Similarly bigtable can have multiple clusters within +// same bigtable instance. +type InternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *BackupRun `json:"backupRun,omitempty"` + Product *Product `json:"product,omitempty"` + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupConfiguration") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response for ListClusters. type ListClustersResponse struct { // Clusters: A list of Redis clusters in the project in the specified location, @@ -2163,6 +2242,33 @@ func (s ManagedCertificateAuthority) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Membership: An output only view of all the member clusters participating in +// the cross cluster replication. +type Membership struct { + // PrimaryCluster: Output only. The primary cluster that acts as the source of + // replication for the secondary clusters. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: Output only. The list of secondary clusters replicating + // from the primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryCluster") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrimaryCluster") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Membership) MarshalJSON() ([]byte, error) { + type NoMethod Membership + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NodeInfo: Node specific properties. type NodeInfo struct { // Id: Output only. Node identifying string. e.g. 'node-0', 'node-1' @@ -2460,6 +2566,8 @@ type Product struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -2477,6 +2585,7 @@ type Product struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -2627,6 +2736,32 @@ func (s ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RemoteCluster: Details of the remote cluster associated with this cluster in +// a cross cluster replication setup. +type RemoteCluster struct { + // Cluster: The full resource path of the remote cluster in the format: + // projects//locations//clusters/ + Cluster string `json:"cluster,omitempty"` + // Uid: Output only. The unique identifier of the remote cluster. + Uid string `json:"uid,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cluster") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RemoteCluster) MarshalJSON() ([]byte, error) { + type NoMethod RemoteCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up