From 8757dbf5811cc9f4092a8259d859c35ad3cc6442 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 24 Aug 2022 13:04:23 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#1677) --- api-list.json | 15 - assuredworkloads/v1/assuredworkloads-api.json | 5 +- assuredworkloads/v1/assuredworkloads-gen.go | 2 +- cloudasset/v1/cloudasset-api.json | 44 +- cloudasset/v1/cloudasset-gen.go | 76 +- content/v2.1/content-api.json | 4 +- content/v2.1/content-gen.go | 2 +- documentai/v1/documentai-api.json | 112 +- documentai/v1/documentai-gen.go | 218 ++- documentai/v1beta2/documentai-api.json | 35 +- documentai/v1beta2/documentai-gen.go | 53 +- documentai/v1beta3/documentai-api.json | 112 +- documentai/v1beta3/documentai-gen.go | 219 ++- firebase/v1beta1/firebase-api.json | 20 +- firebase/v1beta1/firebase-gen.go | 18 +- .../v1alpha/policysimulator-api.json | 635 ++++++++ .../v1alpha/policysimulator-gen.go | 1390 +++++++++++++++++ .../v1/servicenetworking-api.json | 6 +- servicenetworking/v1/servicenetworking-gen.go | 24 +- .../v1beta/servicenetworking-api.json | 6 +- .../v1beta/servicenetworking-gen.go | 24 +- tagmanager/v2/tagmanager-api.json | 10 +- tagmanager/v2/tagmanager-gen.go | 12 +- 23 files changed, 2673 insertions(+), 369 deletions(-) create mode 100644 policysimulator/v1alpha/policysimulator-api.json create mode 100644 policysimulator/v1alpha/policysimulator-gen.go diff --git a/api-list.json b/api-list.json index c32199630ab..ba983a933c6 100644 --- a/api-list.json +++ b/api-list.json @@ -4627,21 +4627,6 @@ "documentationLink": "https://cloud.google.com/recommendations", "preferred": true }, - { - "kind": "discovery#directoryItem", - "id": "run:v1alpha1", - "name": "run", - "version": "v1alpha1", - "title": "Cloud Run Admin API", - "description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", - "discoveryRestUrl": "https://run.googleapis.com/$discovery/rest?version=v1alpha1", - "icons": { - "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", - "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" - }, - "documentationLink": "https://cloud.google.com/run/", - "preferred": false - }, { "kind": "discovery#directoryItem", "id": "run:v1", diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 7682599f86e..4d6dbdb5b90 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -379,7 +379,7 @@ } } }, - "revision": "20220725", + "revision": "20220818", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -780,7 +780,8 @@ "id": "GoogleCloudAssuredworkloadsV1beta1Workload", "properties": { "billingAccount": { - "description": "Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "description": "Output only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "readOnly": true, "type": "string" }, "cjisSettings": { diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index fb25730a638..93b0259ce15 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -712,7 +712,7 @@ func (s *GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata) Mars // GoogleCloudAssuredworkloadsV1beta1Workload: An Workload object for // managing highly regulated workloads of cloud customers. type GoogleCloudAssuredworkloadsV1beta1Workload struct { - // BillingAccount: Input only. The billing account used for the + // BillingAccount: Output only. The billing account used for the // resources which are direct children of workload. This billing account // is initially associated with the resources created as part of // Workload creation. After the initial creation of these resources, the diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index b84d807ef8b..3c04acdb601 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -929,7 +929,7 @@ } } }, - "revision": "20220805", + "revision": "20220820", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -3220,7 +3220,7 @@ "type": "object" }, "ResourceSearchResult": { - "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 29", + "description": "A result of Resource Search, containing information of a cloud resource. Next ID: 31", "id": "ResourceSearchResult", "properties": { "additionalAttributes": { @@ -3228,11 +3228,11 @@ "description": "Properties of the object.", "type": "any" }, - "description": "The additional searchable attributes of this resource. The attributes may vary from one resource type to another. Examples: `projectId` for Project, `dnsName` for DNS ManagedZone. This field contains a subset of the resource metadata fields that are returned by the List or Get APIs provided by the corresponding GCP service (e.g., Compute Engine). see [API references and supported searchable attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) to see which fields are included. You can search values of these fields through free text search. However, you should not consume the field programically as the field names and values may change as the GCP service updates to a new incompatible API version. To search against the `additional_attributes`: * use a free text query to match the attributes values. Example: to search `additional_attributes = { dnsName: \"foobar\" }`, you can issue a query `foobar`.", + "description": "The additional searchable attributes of this resource. The attributes may vary from one resource type to another. Examples: `projectId` for Project, `dnsName` for DNS ManagedZone. This field contains a subset of the resource metadata fields that are returned by the List or Get APIs provided by the corresponding GCP service (e.g., Compute Engine). see [API references and supported searchable attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) to see which fields are included. You can search values of these fields through free text search. However, you should not consume the field programically as the field names and values may change as the GCP service updates to a new incompatible API version. To search against the `additional_attributes`: * Use a free text query to match the attributes values. Example: to search `additional_attributes = { dnsName: \"foobar\" }`, you can issue a query `foobar`.", "type": "object" }, "assetType": { - "description": "The type of this resource. Example: `compute.googleapis.com/Disk`. To search against the `asset_type`: * specify the `asset_type` field in your search request.", + "description": "The type of this resource. Example: `compute.googleapis.com/Disk`. To search against the `asset_type`: * Specify the `asset_type` field in your search request.", "type": "string" }, "attachedResources": { @@ -3243,65 +3243,65 @@ "type": "array" }, "createTime": { - "description": "The create timestamp of this resource, at which the resource was created. The granularity is in seconds. Timestamp.nanos will always be 0. This field is available only when the resource's Protobuf contains it. To search against `create_time`: * use a field query. - value in seconds since unix epoch. Example: `createTime \u003e 1609459200` - value in date string. Example: `createTime \u003e 2021-01-01` - value in date-time string (must be quoted). Example: `createTime \u003e \"2021-01-01T00:00:00\"`", + "description": "The create timestamp of this resource, at which the resource was created. The granularity is in seconds. Timestamp.nanos will always be 0. This field is available only when the resource's Protobuf contains it. To search against `create_time`: * Use a field query. - value in seconds since unix epoch. Example: `createTime \u003e 1609459200` - value in date string. Example: `createTime \u003e 2021-01-01` - value in date-time string (must be quoted). Example: `createTime \u003e \"2021-01-01T00:00:00\"`", "format": "google-datetime", "type": "string" }, "description": { - "description": "One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes. This field is available only when the resource's Protobuf contains it. To search against the `description`: * use a field query. Example: `description:\"important instance\"` * use a free text query. Example: `\"important instance\"`", + "description": "One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes. This field is available only when the resource's Protobuf contains it. To search against the `description`: * Use a field query. Example: `description:\"important instance\"` * Use a free text query. Example: `\"important instance\"`", "type": "string" }, "displayName": { - "description": "The display name of this resource. This field is available only when the resource's Protobuf contains it. To search against the `display_name`: * use a field query. Example: `displayName:\"My Instance\"` * use a free text query. Example: `\"My Instance\"`", + "description": "The display name of this resource. This field is available only when the resource's Protobuf contains it. To search against the `display_name`: * Use a field query. Example: `displayName:\"My Instance\"` * Use a free text query. Example: `\"My Instance\"`", "type": "string" }, "folders": { - "description": "The folder(s) that this resource belongs to, in the form of folders/{FOLDER_NUMBER}. This field is available when the resource belongs to one or more folders. To search against `folders`: * use a field query. Example: `folders:(123 OR 456)` * use a free text query. Example: `123` * specify the `scope` field as this folder in your search request.", + "description": "The folder(s) that this resource belongs to, in the form of folders/{FOLDER_NUMBER}. This field is available when the resource belongs to one or more folders. To search against `folders`: * Use a field query. Example: `folders:(123 OR 456)` * Use a free text query. Example: `123` * Specify the `scope` field as this folder in your search request.", "items": { "type": "string" }, "type": "array" }, "kmsKey": { - "description": "The Cloud KMS [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) name or [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) name. This field is available only when the resource's Protobuf contains it. To search against the `kms_key`: * use a field query. Example: `kmsKey:key` * use a free text query. Example: `key`", + "description": "The Cloud KMS [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys) name or [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) name. This field is available only when the resource's Protobuf contains it. To search against the `kms_key`: * Use a field query. Example: `kmsKey:key` * Use a free text query. Example: `key`", "type": "string" }, "labels": { "additionalProperties": { "type": "string" }, - "description": "Labels associated with this resource. See [Labelling and grouping GCP resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information. This field is available only when the resource's Protobuf contains it. To search against the `labels`: * use a field query: - query on any label's key or value. Example: `labels:prod` - query by a given label. Example: `labels.env:prod` - query by a given label's existence. Example: `labels.env:*` * use a free text query. Example: `prod`", + "description": "Labels associated with this resource. See [Labelling and grouping GCP resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information. This field is available only when the resource's Protobuf contains it. To search against the `labels`: * Use a field query: - query on any label's key or value. Example: `labels:prod` - query by a given label. Example: `labels.env:prod` - query by a given label's existence. Example: `labels.env:*` * Use a free text query. Example: `prod`", "type": "object" }, "location": { - "description": "Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`. This field is available only when the resource's Protobuf contains it. To search against the `location`: * use a field query. Example: `location:us-west*` * use a free text query. Example: `us-west*`", + "description": "Location can be `global`, regional like `us-east1`, or zonal like `us-west1-b`. This field is available only when the resource's Protobuf contains it. To search against the `location`: * Use a field query. Example: `location:us-west*` * Use a free text query. Example: `us-west*`", "type": "string" }, "name": { - "description": "The full resource name of this resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Cloud Asset Inventory Resource Name Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) for more information. To search against the `name`: * use a field query. Example: `name:instance1` * use a free text query. Example: `instance1`", + "description": "The full resource name of this resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. See [Cloud Asset Inventory Resource Name Format](https://cloud.google.com/asset-inventory/docs/resource-name-format) for more information. To search against the `name`: * Use a field query. Example: `name:instance1` * Use a free text query. Example: `instance1`", "type": "string" }, "networkTags": { - "description": "Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See [Labelling GCP resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information. This field is available only when the resource's Protobuf contains it. To search against the `network_tags`: * use a field query. Example: `networkTags:internal` * use a free text query. Example: `internal`", + "description": "Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See [Labelling GCP resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) for more information. This field is available only when the resource's Protobuf contains it. To search against the `network_tags`: * Use a field query. Example: `networkTags:internal` * Use a free text query. Example: `internal`", "items": { "type": "string" }, "type": "array" }, "organization": { - "description": "The organization that this resource belongs to, in the form of organizations/{ORGANIZATION_NUMBER}. This field is available when the resource belongs to an organization. To search against `organization`: * use a field query. Example: `organization:123` * use a free text query. Example: `123` * specify the `scope` field as this organization in your search request.", + "description": "The organization that this resource belongs to, in the form of organizations/{ORGANIZATION_NUMBER}. This field is available when the resource belongs to an organization. To search against `organization`: * Use a field query. Example: `organization:123` * Use a free text query. Example: `123` * Specify the `scope` field as this organization in your search request.", "type": "string" }, "parentAssetType": { - "description": "The type of this resource's immediate parent, if there is one. To search against the `parent_asset_type`: * use a field query. Example: `parentAssetType:\"cloudresourcemanager.googleapis.com/Project\"` * use a free text query. Example: `cloudresourcemanager.googleapis.com/Project`", + "description": "The type of this resource's immediate parent, if there is one. To search against the `parent_asset_type`: * Use a field query. Example: `parentAssetType:\"cloudresourcemanager.googleapis.com/Project\"` * Use a free text query. Example: `cloudresourcemanager.googleapis.com/Project`", "type": "string" }, "parentFullResourceName": { - "description": "The full resource name of this resource's parent, if it has one. To search against the `parent_full_resource_name`: * use a field query. Example: `parentFullResourceName:\"project-name\"` * use a free text query. Example: `project-name`", + "description": "The full resource name of this resource's parent, if it has one. To search against the `parent_full_resource_name`: * Use a field query. Example: `parentFullResourceName:\"project-name\"` * Use a free text query. Example: `project-name`", "type": "string" }, "project": { - "description": "The project that this resource belongs to, in the form of projects/{PROJECT_NUMBER}. This field is available when the resource belongs to a project. To search against `project`: * use a field query. Example: `project:12345` * use a free text query. Example: `12345` * specify the `scope` field as this project in your search request.", + "description": "The project that this resource belongs to, in the form of projects/{PROJECT_NUMBER}. This field is available when the resource belongs to a project. To search against `project`: * Use a field query. Example: `project:12345` * Use a free text query. Example: `12345` * Specify the `scope` field as this project in your search request.", "type": "string" }, "relationships": { @@ -3312,32 +3312,32 @@ "type": "object" }, "state": { - "description": "The state of this resource. Different resources types have different state definitions that are mapped from various fields of different resource types. This field is available only when the resource's Protobuf contains it. Example: If the resource is an instance provided by Compute Engine, its state will include PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition in [API Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). If the resource is a project provided by Cloud Resource Manager, its state will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and DELETE_IN_PROGRESS. See `lifecycleState` definition in [API Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). To search against the `state`: * use a field query. Example: `state:RUNNING` * use a free text query. Example: `RUNNING`", + "description": "The state of this resource. Different resources types have different state definitions that are mapped from various fields of different resource types. This field is available only when the resource's Protobuf contains it. Example: If the resource is an instance provided by Compute Engine, its state will include PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition in [API Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). If the resource is a project provided by Cloud Resource Manager, its state will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and DELETE_IN_PROGRESS. See `lifecycleState` definition in [API Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). To search against the `state`: * Use a field query. Example: `state:RUNNING` * Use a free text query. Example: `RUNNING`", "type": "string" }, "tagKeys": { - "description": "TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. To search against the `tagKeys`: * use a field query. Example: - `tagKeys:\"123456789/env*\"` - `tagKeys=\"123456789/env\"` - `tagKeys:\"env\"` * use a free text query. Example: - `env`", + "description": "TagKey namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. To search against the `tagKeys`: * Use a field query. Example: - `tagKeys:\"123456789/env*\"` - `tagKeys=\"123456789/env\"` - `tagKeys:\"env\"` * Use a free text query. Example: - `env`", "items": { "type": "string" }, "type": "array" }, "tagValueIds": { - "description": "TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. To search against the `tagValueIds`: * use a field query. Example: - `tagValueIds:\"456\"` - `tagValueIds=\"tagValues/456\"` * use a free text query. Example: - `456`", + "description": "TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. To search against the `tagValueIds`: * Use a field query. Example: - `tagValueIds:\"456\"` - `tagValueIds=\"tagValues/456\"` * Use a free text query. Example: - `456`", "items": { "type": "string" }, "type": "array" }, "tagValues": { - "description": "TagValue namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. To search against the `tagValues`: * use a field query. Example: - `tagValues:\"env\"` - `tagValues:\"env/prod\"` - `tagValues:\"123456789/env/prod*\"` - `tagValues=\"123456789/env/prod\"` * use a free text query. Example: - `prod`", + "description": "TagValue namespaced names, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. To search against the `tagValues`: * Use a field query. Example: - `tagValues:\"env\"` - `tagValues:\"env/prod\"` - `tagValues:\"123456789/env/prod*\"` - `tagValues=\"123456789/env/prod\"` * Use a free text query. Example: - `prod`", "items": { "type": "string" }, "type": "array" }, "updateTime": { - "description": "The last update timestamp of this resource, at which the resource was last modified or deleted. The granularity is in seconds. Timestamp.nanos will always be 0. This field is available only when the resource's Protobuf contains it. To search against `update_time`: * use a field query. - value in seconds since unix epoch. Example: `updateTime \u003c 1609459200` - value in date string. Example: `updateTime \u003c 2021-01-01` - value in date-time string (must be quoted). Example: `updateTime \u003c \"2021-01-01T00:00:00\"`", + "description": "The last update timestamp of this resource, at which the resource was last modified or deleted. The granularity is in seconds. Timestamp.nanos will always be 0. This field is available only when the resource's Protobuf contains it. To search against `update_time`: * Use a field query. - value in seconds since unix epoch. Example: `updateTime \u003c 1609459200` - value in date string. Example: `updateTime \u003c 2021-01-01` - value in date-time string (must be quoted). Example: `updateTime \u003c \"2021-01-01T00:00:00\"`", "format": "google-datetime", "type": "string" }, diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index 25aefee00b8..2b97a8d40f3 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -4846,7 +4846,7 @@ func (s *Resource) MarshalJSON() ([]byte, error) { } // ResourceSearchResult: A result of Resource Search, containing -// information of a cloud resource. Next ID: 29 +// information of a cloud resource. Next ID: 31 type ResourceSearchResult struct { // AdditionalAttributes: The additional searchable attributes of this // resource. The attributes may vary from one resource type to another. @@ -4860,14 +4860,14 @@ type ResourceSearchResult struct { // fields through free text search. However, you should not consume the // field programically as the field names and values may change as the // GCP service updates to a new incompatible API version. To search - // against the `additional_attributes`: * use a free text query to match + // against the `additional_attributes`: * Use a free text query to match // the attributes values. Example: to search `additional_attributes = { // dnsName: "foobar" }`, you can issue a query `foobar`. AdditionalAttributes googleapi.RawMessage `json:"additionalAttributes,omitempty"` // AssetType: The type of this resource. Example: // `compute.googleapis.com/Disk`. To search against the `asset_type`: * - // specify the `asset_type` field in your search request. + // Specify the `asset_type` field in your search request. AssetType string `json:"assetType,omitempty"` // AttachedResources: Attached resources of this resource. For example, @@ -4882,7 +4882,7 @@ type ResourceSearchResult struct { // CreateTime: The create timestamp of this resource, at which the // resource was created. The granularity is in seconds. Timestamp.nanos // will always be 0. This field is available only when the resource's - // Protobuf contains it. To search against `create_time`: * use a field + // Protobuf contains it. To search against `create_time`: * Use a field // query. - value in seconds since unix epoch. Example: `createTime > // 1609459200` - value in date string. Example: `createTime > // 2021-01-01` - value in date-time string (must be quoted). Example: @@ -4892,23 +4892,23 @@ type ResourceSearchResult struct { // Description: One or more paragraphs of text description of this // resource. Maximum length could be up to 1M bytes. This field is // available only when the resource's Protobuf contains it. To search - // against the `description`: * use a field query. Example: - // `description:"important instance" * use a free text query. Example: + // against the `description`: * Use a field query. Example: + // `description:"important instance" * Use a free text query. Example: // "important instance" Description string `json:"description,omitempty"` // DisplayName: The display name of this resource. This field is // available only when the resource's Protobuf contains it. To search - // against the `display_name`: * use a field query. Example: - // `displayName:"My Instance" * use a free text query. Example: "My + // against the `display_name`: * Use a field query. Example: + // `displayName:"My Instance" * Use a free text query. Example: "My // Instance" DisplayName string `json:"displayName,omitempty"` // Folders: The folder(s) that this resource belongs to, in the form of // folders/{FOLDER_NUMBER}. This field is available when the resource - // belongs to one or more folders. To search against `folders`: * use a - // field query. Example: `folders:(123 OR 456)` * use a free text query. - // Example: `123` * specify the `scope` field as this folder in your + // belongs to one or more folders. To search against `folders`: * Use a + // field query. Example: `folders:(123 OR 456)` * Use a free text query. + // Example: `123` * Specify the `scope` field as this folder in your // search request. Folders []string `json:"folders,omitempty"` @@ -4917,8 +4917,8 @@ type ResourceSearchResult struct { // name or CryptoKeyVersion // (https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions) // name. This field is available only when the resource's Protobuf - // contains it. To search against the `kms_key`: * use a field query. - // Example: `kmsKey:key` * use a free text query. Example: `key` + // contains it. To search against the `kms_key`: * Use a field query. + // Example: `kmsKey:key` * Use a free text query. Example: `key` KmsKey string `json:"kmsKey,omitempty"` // Labels: Labels associated with this resource. See Labelling and @@ -4926,16 +4926,16 @@ type ResourceSearchResult struct { // (https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) // for more information. This field is available only when the // resource's Protobuf contains it. To search against the `labels`: * - // use a field query: - query on any label's key or value. Example: + // Use a field query: - query on any label's key or value. Example: // `labels:prod` - query by a given label. Example: `labels.env:prod` - - // query by a given label's existence. Example: `labels.env:*` * use a + // query by a given label's existence. Example: `labels.env:*` * Use a // free text query. Example: `prod` Labels map[string]string `json:"labels,omitempty"` // Location: Location can be `global`, regional like `us-east1`, or // zonal like `us-west1-b`. This field is available only when the // resource's Protobuf contains it. To search against the `location`: * - // use a field query. Example: `location:us-west*` * use a free text + // Use a field query. Example: `location:us-west*` * Use a free text // query. Example: `us-west*` Location string `json:"location,omitempty"` @@ -4943,8 +4943,8 @@ type ResourceSearchResult struct { // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance // s/instance1`. See Cloud Asset Inventory Resource Name Format // (https://cloud.google.com/asset-inventory/docs/resource-name-format) - // for more information. To search against the `name`: * use a field - // query. Example: `name:instance1` * use a free text query. Example: + // for more information. To search against the `name`: * Use a field + // query. Example: `name:instance1` * Use a free text query. Example: // `instance1` Name string `json:"name,omitempty"` @@ -4954,38 +4954,38 @@ type ResourceSearchResult struct { // (https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) // for more information. This field is available only when the // resource's Protobuf contains it. To search against the - // `network_tags`: * use a field query. Example: `networkTags:internal` - // * use a free text query. Example: `internal` + // `network_tags`: * Use a field query. Example: `networkTags:internal` + // * Use a free text query. Example: `internal` NetworkTags []string `json:"networkTags,omitempty"` // Organization: The organization that this resource belongs to, in the // form of organizations/{ORGANIZATION_NUMBER}. This field is available // when the resource belongs to an organization. To search against - // `organization`: * use a field query. Example: `organization:123` * - // use a free text query. Example: `123` * specify the `scope` field as + // `organization`: * Use a field query. Example: `organization:123` * + // Use a free text query. Example: `123` * Specify the `scope` field as // this organization in your search request. Organization string `json:"organization,omitempty"` // ParentAssetType: The type of this resource's immediate parent, if - // there is one. To search against the `parent_asset_type`: * use a + // there is one. To search against the `parent_asset_type`: * Use a // field query. Example: - // `parentAssetType:"cloudresourcemanager.googleapis.com/Project" * use + // `parentAssetType:"cloudresourcemanager.googleapis.com/Project" * Use // a free text query. Example: // `cloudresourcemanager.googleapis.com/Project` ParentAssetType string `json:"parentAssetType,omitempty"` // ParentFullResourceName: The full resource name of this resource's // parent, if it has one. To search against the - // `parent_full_resource_name`: * use a field query. Example: - // `parentFullResourceName:"project-name" * use a free text query. + // `parent_full_resource_name`: * Use a field query. Example: + // `parentFullResourceName:"project-name" * Use a free text query. // Example: `project-name` ParentFullResourceName string `json:"parentFullResourceName,omitempty"` // Project: The project that this resource belongs to, in the form of // projects/{PROJECT_NUMBER}. This field is available when the resource - // belongs to a project. To search against `project`: * use a field - // query. Example: `project:12345` * use a free text query. Example: - // `12345` * specify the `scope` field as this project in your search + // belongs to a project. To search against `project`: * Use a field + // query. Example: `project:12345` * Use a free text query. Example: + // `12345` * Specify the `scope` field as this project in your search // request. Project string `json:"project,omitempty"` @@ -5010,36 +5010,36 @@ type ResourceSearchResult struct { // DELETE_REQUESTED and DELETE_IN_PROGRESS. See `lifecycleState` // definition in API Reference // (https://cloud.google.com/resource-manager/reference/rest/v1/projects). - // To search against the `state`: * use a field query. Example: - // `state:RUNNING` * use a free text query. Example: `RUNNING` + // To search against the `state`: * Use a field query. Example: + // `state:RUNNING` * Use a free text query. Example: `RUNNING` State string `json:"state,omitempty"` // TagKeys: TagKey namespaced names, in the format of - // {ORG_ID}/{TAG_KEY_SHORT_NAME}. To search against the `tagKeys`: * use + // {ORG_ID}/{TAG_KEY_SHORT_NAME}. To search against the `tagKeys`: * Use // a field query. Example: - `tagKeys:"123456789/env*" - - // `tagKeys="123456789/env" - `tagKeys:"env" * use a free text query. + // `tagKeys="123456789/env" - `tagKeys:"env" * Use a free text query. // Example: - `env` TagKeys []string `json:"tagKeys,omitempty"` // TagValueIds: TagValue IDs, in the format of tagValues/{TAG_VALUE_ID}. - // To search against the `tagValueIds`: * use a field query. Example: - - // `tagValueIds:"456" - `tagValueIds="tagValues/456" * use a free text + // To search against the `tagValueIds`: * Use a field query. Example: - + // `tagValueIds:"456" - `tagValueIds="tagValues/456" * Use a free text // query. Example: - `456` TagValueIds []string `json:"tagValueIds,omitempty"` // TagValues: TagValue namespaced names, in the format of // {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. To search - // against the `tagValues`: * use a field query. Example: - + // against the `tagValues`: * Use a field query. Example: - // `tagValues:"env" - `tagValues:"env/prod" - // `tagValues:"123456789/env/prod*" - `tagValues="123456789/env/prod" - // * use a free text query. Example: - `prod` + // * Use a free text query. Example: - `prod` TagValues []string `json:"tagValues,omitempty"` // UpdateTime: The last update timestamp of this resource, at which the // resource was last modified or deleted. The granularity is in seconds. // Timestamp.nanos will always be 0. This field is available only when // the resource's Protobuf contains it. To search against `update_time`: - // * use a field query. - value in seconds since unix epoch. Example: + // * Use a field query. - value in seconds since unix epoch. Example: // `updateTime < 1609459200` - value in date string. Example: // `updateTime < 2021-01-01` - value in date-time string (must be // quoted). Example: `updateTime < "2021-01-01T00:00:00" diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 5524412e361..80d4a2a9061 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -5908,7 +5908,7 @@ } } }, - "revision": "20220805", + "revision": "20220818", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -5957,7 +5957,7 @@ "description": "The Business Profile which is linked or in the process of being linked with the Merchant Center account." }, "id": { - "description": "Required for update. Merchant Center account ID.", + "description": "Required. 64-bit Merchant Center account ID.", "format": "uint64", "type": "string" }, diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 21927335cba..e986ac2b644 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -650,7 +650,7 @@ type Account struct { // process of being linked with the Merchant Center account. GoogleMyBusinessLink *AccountGoogleMyBusinessLink `json:"googleMyBusinessLink,omitempty"` - // Id: Required for update. Merchant Center account ID. + // Id: Required. 64-bit Merchant Center account ID. Id uint64 `json:"id,omitempty,string"` // Kind: Identifies what kind of resource this is. Value: the fixed diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index ff7fd604867..7f169a94619 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1069,7 +1069,7 @@ } } }, - "revision": "20220815", + "revision": "20220821", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1079,6 +1079,11 @@ "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", "description": "The basic metadata of the long running operation." }, + "errorDocumentCount": { + "description": "Total number of documents that failed to be deleted in storage.", + "format": "int32", + "type": "integer" + }, "individualBatchDeleteStatuses": { "description": "The list of response details of each document.", "items": { @@ -1440,7 +1445,7 @@ "type": "object" }, "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is ok if the configuration is valid and the specified documents are valid for importing. Otherwise status will be set as errors.", + "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", "id": "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -1500,13 +1505,6 @@ "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus" }, "type": "array" - }, - "newlyAddedDocuments": { - "description": "Returns the newly added document Cloud Storage prefix if the documents are founded in Cloud Storage while not in Document Service storage.", - "items": { - "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument" - }, - "type": "array" } }, "type": "object" @@ -1565,25 +1563,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument": { - "description": "The proto for updated document in resync pipeline.", - "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument", - "properties": { - "destinationPrefix": { - "description": "The prefix of cloud storage, identifies the destination document which should be updated by resync pipeline.", - "type": "string" - }, - "sourcePrefix": { - "description": "The prefix of cloud storage, identifies the original document which should be updated by resync pipeline.", - "type": "string" - }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The final status of the documents which should be updated by resync pipeline." - } - }, - "type": "object" - }, "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse": { "description": "The response proto of ResyncDataset method.", "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse", @@ -2975,6 +2954,10 @@ "description": "User defined name for the type.", "type": "string" }, + "entityTypeMetadata": { + "$ref": "GoogleCloudDocumentaiV1EntityTypeMetadata", + "description": "Metadata for the entity type." + }, "enumValues": { "$ref": "GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues", "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." @@ -3033,6 +3016,10 @@ ], "type": "string" }, + "propertyMetadata": { + "$ref": "GoogleCloudDocumentaiV1PropertyMetadata", + "description": "Any additional metadata about the property can be added here." + }, "valueType": { "description": "A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.", "type": "string" @@ -3216,6 +3203,29 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1EntityTypeMetadata": { + "description": "Metadata about an entity type.", + "id": "GoogleCloudDocumentaiV1EntityTypeMetadata", + "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewValidationMetadata", + "description": "Human review config on the entity type." + }, + "inactive": { + "description": "Whether the entity type should be considered as \"inactive\".", + "type": "boolean" + }, + "prefixedNamingOnProperties": { + "description": "If set, the properties of this entity type must be prefixed with the parents.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1FetchProcessorTypesResponse": { "description": "Response message for fetch processor types.", "id": "GoogleCloudDocumentaiV1FetchProcessorTypesResponse", @@ -3270,6 +3280,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata": { + "description": "Metadata for human review labeling config.", + "id": "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata", + "properties": { + "enableNormalizationEditing": { + "description": "Whether to enable normalization editing.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1HumanReviewStatus": { "description": "The status of human review on a processed document.", "id": "GoogleCloudDocumentaiV1HumanReviewStatus", @@ -3303,6 +3324,22 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1HumanReviewValidationMetadata": { + "description": "Metadata for Human Review config.", + "id": "GoogleCloudDocumentaiV1HumanReviewValidationMetadata", + "properties": { + "confidenceThreshold": { + "description": "The confidence threshold if human review validation is enabled.", + "format": "float", + "type": "number" + }, + "enableValidation": { + "description": "Whether to enable human review validation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1ListProcessorTypesResponse": { "description": "Response message for list processor types.", "id": "GoogleCloudDocumentaiV1ListProcessorTypesResponse", @@ -3617,6 +3654,25 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1PropertyMetadata": { + "description": "Metadata about a property.", + "id": "GoogleCloudDocumentaiV1PropertyMetadata", + "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1HumanReviewValidationMetadata", + "description": "Human review validation config on the property." + }, + "inactive": { + "description": "Whether the property should be considered as \"inactive\".", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1RawDocument": { "description": "Payload message of raw document content (bytes).", "id": "GoogleCloudDocumentaiV1RawDocument", diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index d36d6063b83..97f2dd5ed1e 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -294,6 +294,10 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + // ErrorDocumentCount: Total number of documents that failed to be + // deleted in storage. + ErrorDocumentCount int64 `json:"errorDocumentCount,omitempty"` + // IndividualBatchDeleteStatuses: The list of response details of each // document. IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` @@ -991,8 +995,9 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([ // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValid // ationResult: The validation status of each import config. Status is -// ok if the configuration is valid and the specified documents are -// valid for importing. Otherwise status will be set as errors. +// set to errors if there is no documents to import in the +// import_config, or OK if the operation will try to proceed at least +// one document. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -1083,11 +1088,6 @@ type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { // inconsistencies. IndividualDocumentResyncStatuses []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus `json:"individualDocumentResyncStatuses,omitempty"` - // NewlyAddedDocuments: Returns the newly added document Cloud Storage - // prefix if the documents are founded in Cloud Storage while not in - // Document Service storage. - NewlyAddedDocuments []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument `json:"newlyAddedDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "CommonMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1200,45 +1200,6 @@ func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentRe return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument: -// The proto for updated document in resync pipeline. -type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument struct { - // DestinationPrefix: The prefix of cloud storage, identifies the - // destination document which should be updated by resync pipeline. - DestinationPrefix string `json:"destinationPrefix,omitempty"` - - // SourcePrefix: The prefix of cloud storage, identifies the original - // document which should be updated by resync pipeline. - SourcePrefix string `json:"sourcePrefix,omitempty"` - - // Status: The final status of the documents which should be updated by - // resync pipeline. - Status *GoogleRpcStatus `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationPrefix") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationPrefix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response // proto of ResyncDataset method. type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { @@ -3456,6 +3417,9 @@ type GoogleCloudDocumentaiV1DocumentSchemaEntityType struct { // DisplayName: User defined name for the type. DisplayName string `json:"displayName,omitempty"` + // EntityTypeMetadata: Metadata for the entity type. + EntityTypeMetadata *GoogleCloudDocumentaiV1EntityTypeMetadata `json:"entityTypeMetadata,omitempty"` + // EnumValues: If specified, lists all the possible values for this // entity. This should not be more than a handful of values. If the // number of values is >10 or could change frequently use the @@ -3551,6 +3515,10 @@ type GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty struct { // times. OccurrenceType string `json:"occurrenceType,omitempty"` + // PropertyMetadata: Any additional metadata about the property can be + // added here. + PropertyMetadata *GoogleCloudDocumentaiV1PropertyMetadata `json:"propertyMetadata,omitempty"` + // ValueType: A reference to the value type of the property. This type // is subject to the same conventions as the `Entity.base_types` field. ValueType string `json:"valueType,omitempty"` @@ -3909,6 +3877,48 @@ type GoogleCloudDocumentaiV1EnableProcessorRequest struct { type GoogleCloudDocumentaiV1EnableProcessorResponse struct { } +// GoogleCloudDocumentaiV1EntityTypeMetadata: Metadata about an entity +// type. +type GoogleCloudDocumentaiV1EntityTypeMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review config on the entity type. + HumanReviewMetadata *GoogleCloudDocumentaiV1HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + + // Inactive: Whether the entity type should be considered as "inactive". + Inactive bool `json:"inactive,omitempty"` + + // PrefixedNamingOnProperties: If set, the properties of this entity + // type must be prefixed with the parents. + PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1EntityTypeMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1EntityTypeMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1FetchProcessorTypesResponse: Response message // for fetch processor types. type GoogleCloudDocumentaiV1FetchProcessorTypesResponse struct { @@ -4033,6 +4043,37 @@ func (s *GoogleCloudDocumentaiV1GcsPrefix) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1HumanReviewLabelingMetadata: Metadata for +// human review labeling config. +type GoogleCloudDocumentaiV1HumanReviewLabelingMetadata struct { + // EnableNormalizationEditing: Whether to enable normalization editing. + EnableNormalizationEditing bool `json:"enableNormalizationEditing,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableNormalizationEditing") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableNormalizationEditing") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1HumanReviewLabelingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1HumanReviewLabelingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1HumanReviewStatus: The status of human review // on a processed document. type GoogleCloudDocumentaiV1HumanReviewStatus struct { @@ -4088,6 +4129,54 @@ func (s *GoogleCloudDocumentaiV1HumanReviewStatus) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1HumanReviewValidationMetadata: Metadata for +// Human Review config. +type GoogleCloudDocumentaiV1HumanReviewValidationMetadata struct { + // ConfidenceThreshold: The confidence threshold if human review + // validation is enabled. + ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` + + // EnableValidation: Whether to enable human review validation. + EnableValidation bool `json:"enableValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfidenceThreshold") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1HumanReviewValidationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1HumanReviewValidationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1HumanReviewValidationMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1HumanReviewValidationMetadata + var s1 struct { + ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) + return nil +} + // GoogleCloudDocumentaiV1ListProcessorTypesResponse: Response message // for list processor types. type GoogleCloudDocumentaiV1ListProcessorTypesResponse struct { @@ -4629,6 +4718,43 @@ func (s *GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1PropertyMetadata: Metadata about a property. +type GoogleCloudDocumentaiV1PropertyMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review validation config on the property. + HumanReviewMetadata *GoogleCloudDocumentaiV1HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + + // Inactive: Whether the property should be considered as "inactive". + Inactive bool `json:"inactive,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1PropertyMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1PropertyMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1RawDocument: Payload message of raw document // content (bytes). type GoogleCloudDocumentaiV1RawDocument struct { diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index 46375a7456f..c4c4c36ed8f 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220815", + "revision": "20220821", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -302,6 +302,11 @@ "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", "description": "The basic metadata of the long running operation." }, + "errorDocumentCount": { + "description": "Total number of documents that failed to be deleted in storage.", + "format": "int32", + "type": "integer" + }, "individualBatchDeleteStatuses": { "description": "The list of response details of each document.", "items": { @@ -663,7 +668,7 @@ "type": "object" }, "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is ok if the configuration is valid and the specified documents are valid for importing. Otherwise status will be set as errors.", + "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", "id": "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -723,13 +728,6 @@ "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus" }, "type": "array" - }, - "newlyAddedDocuments": { - "description": "Returns the newly added document Cloud Storage prefix if the documents are founded in Cloud Storage while not in Document Service storage.", - "items": { - "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument" - }, - "type": "array" } }, "type": "object" @@ -788,25 +786,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument": { - "description": "The proto for updated document in resync pipeline.", - "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument", - "properties": { - "destinationPrefix": { - "description": "The prefix of cloud storage, identifies the destination document which should be updated by resync pipeline.", - "type": "string" - }, - "sourcePrefix": { - "description": "The prefix of cloud storage, identifies the original document which should be updated by resync pipeline.", - "type": "string" - }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The final status of the documents which should be updated by resync pipeline." - } - }, - "type": "object" - }, "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse": { "description": "The response proto of ResyncDataset method.", "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse", diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 6bb5e9a843e..b15db156893 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -210,6 +210,10 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + // ErrorDocumentCount: Total number of documents that failed to be + // deleted in storage. + ErrorDocumentCount int64 `json:"errorDocumentCount,omitempty"` + // IndividualBatchDeleteStatuses: The list of response details of each // document. IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` @@ -907,8 +911,9 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([ // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValid // ationResult: The validation status of each import config. Status is -// ok if the configuration is valid and the specified documents are -// valid for importing. Otherwise status will be set as errors. +// set to errors if there is no documents to import in the +// import_config, or OK if the operation will try to proceed at least +// one document. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -999,11 +1004,6 @@ type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { // inconsistencies. IndividualDocumentResyncStatuses []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus `json:"individualDocumentResyncStatuses,omitempty"` - // NewlyAddedDocuments: Returns the newly added document Cloud Storage - // prefix if the documents are founded in Cloud Storage while not in - // Document Service storage. - NewlyAddedDocuments []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument `json:"newlyAddedDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "CommonMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1116,45 +1116,6 @@ func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentRe return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument: -// The proto for updated document in resync pipeline. -type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument struct { - // DestinationPrefix: The prefix of cloud storage, identifies the - // destination document which should be updated by resync pipeline. - DestinationPrefix string `json:"destinationPrefix,omitempty"` - - // SourcePrefix: The prefix of cloud storage, identifies the original - // document which should be updated by resync pipeline. - SourcePrefix string `json:"sourcePrefix,omitempty"` - - // Status: The final status of the documents which should be updated by - // resync pipeline. - Status *GoogleRpcStatus `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationPrefix") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationPrefix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response // proto of ResyncDataset method. type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 70249ed2a18..5bc23ab863f 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -836,7 +836,7 @@ } } }, - "revision": "20220815", + "revision": "20220821", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -846,6 +846,11 @@ "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", "description": "The basic metadata of the long running operation." }, + "errorDocumentCount": { + "description": "Total number of documents that failed to be deleted in storage.", + "format": "int32", + "type": "integer" + }, "individualBatchDeleteStatuses": { "description": "The list of response details of each document.", "items": { @@ -1207,7 +1212,7 @@ "type": "object" }, "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is ok if the configuration is valid and the specified documents are valid for importing. Otherwise status will be set as errors.", + "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", "id": "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -1267,13 +1272,6 @@ "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus" }, "type": "array" - }, - "newlyAddedDocuments": { - "description": "Returns the newly added document Cloud Storage prefix if the documents are founded in Cloud Storage while not in Document Service storage.", - "items": { - "$ref": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument" - }, - "type": "array" } }, "type": "object" @@ -1332,25 +1330,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument": { - "description": "The proto for updated document in resync pipeline.", - "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument", - "properties": { - "destinationPrefix": { - "description": "The prefix of cloud storage, identifies the destination document which should be updated by resync pipeline.", - "type": "string" - }, - "sourcePrefix": { - "description": "The prefix of cloud storage, identifies the original document which should be updated by resync pipeline.", - "type": "string" - }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The final status of the documents which should be updated by resync pipeline." - } - }, - "type": "object" - }, "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse": { "description": "The response proto of ResyncDataset method.", "id": "GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse", @@ -5633,6 +5612,10 @@ "description": "User defined name for the type.", "type": "string" }, + "entityTypeMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3EntityTypeMetadata", + "description": "Metadata for the entity type." + }, "enumValues": { "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues", "description": "If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is \u003e10 or could change frequently use the `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file." @@ -5691,6 +5674,10 @@ ], "type": "string" }, + "propertyMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3PropertyMetadata", + "description": "Any additional metadata about the property can be added here." + }, "valueType": { "description": "A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field.", "type": "string" @@ -5874,6 +5861,29 @@ "properties": {}, "type": "object" }, + "GoogleCloudDocumentaiV1beta3EntityTypeMetadata": { + "description": "Metadata about an entity type.", + "id": "GoogleCloudDocumentaiV1beta3EntityTypeMetadata", + "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata", + "description": "Human review config on the entity type." + }, + "inactive": { + "description": "Whether the entity type should be considered as \"inactive\".", + "type": "boolean" + }, + "prefixedNamingOnProperties": { + "description": "If set, the properties of this entity type must be prefixed with the parents.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse": { "description": "Response message for fetch processor types.", "id": "GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse", @@ -5928,6 +5938,17 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata": { + "description": "Metadata for human review labeling config.", + "id": "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata", + "properties": { + "enableNormalizationEditing": { + "description": "Whether to enable normalization editing.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3HumanReviewStatus": { "description": "The status of human review on a processed document.", "id": "GoogleCloudDocumentaiV1beta3HumanReviewStatus", @@ -5961,6 +5982,22 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata": { + "description": "Metadata for Human Review config.", + "id": "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata", + "properties": { + "confidenceThreshold": { + "description": "The confidence threshold if human review validation is enabled.", + "format": "float", + "type": "number" + }, + "enableValidation": { + "description": "Whether to enable human review validation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse": { "description": "Response message for list processor types.", "id": "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse", @@ -6283,6 +6320,25 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3PropertyMetadata": { + "description": "Metadata about a property.", + "id": "GoogleCloudDocumentaiV1beta3PropertyMetadata", + "properties": { + "humanReviewLabelingMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata", + "description": "Human review labeling config on the property." + }, + "humanReviewMetadata": { + "$ref": "GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata", + "description": "Human review validation config on the property." + }, + "inactive": { + "description": "Whether the property should be considered as \"inactive\".", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3RawDocument": { "description": "Payload message of raw document content (bytes).", "id": "GoogleCloudDocumentaiV1beta3RawDocument", diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 5fa3f027047..19998baff52 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -222,6 +222,10 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` + // ErrorDocumentCount: Total number of documents that failed to be + // deleted in storage. + ErrorDocumentCount int64 `json:"errorDocumentCount,omitempty"` + // IndividualBatchDeleteStatuses: The list of response details of each // document. IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` @@ -919,8 +923,9 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([ // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValid // ationResult: The validation status of each import config. Status is -// ok if the configuration is valid and the specified documents are -// valid for importing. Otherwise status will be set as errors. +// set to errors if there is no documents to import in the +// import_config, or OK if the operation will try to proceed at least +// one document. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -1011,11 +1016,6 @@ type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { // inconsistencies. IndividualDocumentResyncStatuses []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus `json:"individualDocumentResyncStatuses,omitempty"` - // NewlyAddedDocuments: Returns the newly added document Cloud Storage - // prefix if the documents are founded in Cloud Storage while not in - // Document Service storage. - NewlyAddedDocuments []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument `json:"newlyAddedDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "CommonMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1128,45 +1128,6 @@ func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentRe return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument: -// The proto for updated document in resync pipeline. -type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument struct { - // DestinationPrefix: The prefix of cloud storage, identifies the - // destination document which should be updated by resync pipeline. - DestinationPrefix string `json:"destinationPrefix,omitempty"` - - // SourcePrefix: The prefix of cloud storage, identifies the original - // document which should be updated by resync pipeline. - SourcePrefix string `json:"sourcePrefix,omitempty"` - - // Status: The final status of the documents which should be updated by - // resync pipeline. - Status *GoogleRpcStatus `json:"status,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DestinationPrefix") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DestinationPrefix") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataUpdatedDocument - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response // proto of ResyncDataset method. type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { @@ -8124,6 +8085,9 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType struct { // DisplayName: User defined name for the type. DisplayName string `json:"displayName,omitempty"` + // EntityTypeMetadata: Metadata for the entity type. + EntityTypeMetadata *GoogleCloudDocumentaiV1beta3EntityTypeMetadata `json:"entityTypeMetadata,omitempty"` + // EnumValues: If specified, lists all the possible values for this // entity. This should not be more than a handful of values. If the // number of values is >10 or could change frequently use the @@ -8219,6 +8183,10 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty struct { // times. OccurrenceType string `json:"occurrenceType,omitempty"` + // PropertyMetadata: Any additional metadata about the property can be + // added here. + PropertyMetadata *GoogleCloudDocumentaiV1beta3PropertyMetadata `json:"propertyMetadata,omitempty"` + // ValueType: A reference to the value type of the property. This type // is subject to the same conventions as the `Entity.base_types` field. ValueType string `json:"valueType,omitempty"` @@ -8578,6 +8546,48 @@ type GoogleCloudDocumentaiV1beta3EnableProcessorRequest struct { type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { } +// GoogleCloudDocumentaiV1beta3EntityTypeMetadata: Metadata about an +// entity type. +type GoogleCloudDocumentaiV1beta3EntityTypeMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review config on the entity type. + HumanReviewMetadata *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + + // Inactive: Whether the entity type should be considered as "inactive". + Inactive bool `json:"inactive,omitempty"` + + // PrefixedNamingOnProperties: If set, the properties of this entity + // type must be prefixed with the parents. + PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3EntityTypeMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3EntityTypeMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse: Response // message for fetch processor types. type GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse struct { @@ -8702,6 +8712,37 @@ func (s *GoogleCloudDocumentaiV1beta3GcsPrefix) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata: Metadata for +// human review labeling config. +type GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata struct { + // EnableNormalizationEditing: Whether to enable normalization editing. + EnableNormalizationEditing bool `json:"enableNormalizationEditing,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableNormalizationEditing") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableNormalizationEditing") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3HumanReviewStatus: The status of human // review on a processed document. type GoogleCloudDocumentaiV1beta3HumanReviewStatus struct { @@ -8757,6 +8798,54 @@ func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata: Metadata +// for Human Review config. +type GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata struct { + // ConfidenceThreshold: The confidence threshold if human review + // validation is enabled. + ConfidenceThreshold float64 `json:"confidenceThreshold,omitempty"` + + // EnableValidation: Whether to enable human review validation. + EnableValidation bool `json:"enableValidation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfidenceThreshold") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfidenceThreshold") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata + var s1 struct { + ConfidenceThreshold gensupport.JSONFloat64 `json:"confidenceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ConfidenceThreshold = float64(s1.ConfidenceThreshold) + return nil +} + // GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse: Response // message for list processor types. type GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse struct { @@ -9308,6 +9397,44 @@ func (s *GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3PropertyMetadata: Metadata about a +// property. +type GoogleCloudDocumentaiV1beta3PropertyMetadata struct { + // HumanReviewLabelingMetadata: Human review labeling config on the + // property. + HumanReviewLabelingMetadata *GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata `json:"humanReviewLabelingMetadata,omitempty"` + + // HumanReviewMetadata: Human review validation config on the property. + HumanReviewMetadata *GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata `json:"humanReviewMetadata,omitempty"` + + // Inactive: Whether the property should be considered as "inactive". + Inactive bool `json:"inactive,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "HumanReviewLabelingMetadata") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3PropertyMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3PropertyMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3RawDocument: Payload message of raw // document content (bytes). type GoogleCloudDocumentaiV1beta3RawDocument struct { diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index 183841da377..b48931a5bfb 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -665,7 +665,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" ] }, "undelete": { @@ -693,7 +694,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" ] } }, @@ -1054,7 +1056,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" ] }, "undelete": { @@ -1082,7 +1085,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" ] } } @@ -1278,7 +1282,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" ] }, "undelete": { @@ -1306,7 +1311,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/firebase" ] } } @@ -1314,7 +1320,7 @@ } } }, - "revision": "20220819", + "revision": "20220822", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index d499caf9e6c..0f1b3e12984 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -5027,7 +5027,8 @@ func (c *ProjectsAndroidAppsRemoveCall) Do(opts ...googleapi.CallOption) (*Opera // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" // ] // } @@ -5175,7 +5176,8 @@ func (c *ProjectsAndroidAppsUndeleteCall) Do(opts ...googleapi.CallOption) (*Ope // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" // ] // } @@ -7015,7 +7017,8 @@ func (c *ProjectsIosAppsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" // ] // } @@ -7162,7 +7165,8 @@ func (c *ProjectsIosAppsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" // ] // } @@ -8156,7 +8160,8 @@ func (c *ProjectsWebAppsRemoveCall) Do(opts ...googleapi.CallOption) (*Operation // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" // ] // } @@ -8303,7 +8308,8 @@ func (c *ProjectsWebAppsUndeleteCall) Do(opts ...googleapi.CallOption) (*Operati // "$ref": "Operation" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/firebase" // ] // } diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json new file mode 100644 index 00000000000..527f853314a --- /dev/null +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -0,0 +1,635 @@ +{ + "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://policysimulator.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Policy Simulator", + "description": " Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/iam/docs/simulating-access", + "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": "policysimulator:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://policysimulator.mtls.googleapis.com/", + "name": "policysimulator", + "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": { + "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/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1alpha/operations", + "httpMethod": "GET", + "id": "policysimulator.operations.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "query", + "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/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + }, + "revision": "20220821", + "rootUrl": "https://policysimulator.googleapis.com/", + "schemas": { + "GoogleCloudPolicysimulatorV1Replay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1Replay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1ReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1ReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayOperationMetadata": { + "description": "Metadata about a Replay operation.", + "id": "GoogleCloudPolicysimulatorV1ReplayOperationMetadata", + "properties": { + "startTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1Replay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1beta1Replay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1beta1ReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1ReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1beta1ReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata": { + "description": "Metadata about a Replay operation.", + "id": "GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata", + "properties": { + "startTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleIamV1AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "GoogleIamV1AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "GoogleIamV1AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "GoogleIamV1AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "GoogleIamV1Binding", + "properties": { + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "GoogleIamV1Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "GoogleIamV1Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "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": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "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 response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "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" + }, + "GoogleTypeDate": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleTypeExpr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "GoogleTypeExpr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Policy Simulator API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go new file mode 100644 index 00000000000..5afcc369c00 --- /dev/null +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -0,0 +1,1390 @@ +// Copyright 2022 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 policysimulator provides access to the Policy Simulator API. +// +// For product documentation, see: https://cloud.google.com/iam/docs/simulating-access +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/policysimulator/v1alpha" +// ... +// ctx := context.Background() +// policysimulatorService, err := policysimulator.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// policysimulatorService, err := policysimulator.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// policysimulatorService, err := policysimulator.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package policysimulator // import "google.golang.org/api/policysimulator/v1alpha" + +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 + +const apiId = "policysimulator:v1alpha" +const apiName = "policysimulator" +const apiVersion = "v1alpha" +const basePath = "https://policysimulator.googleapis.com/" +const mtlsBasePath = "https://policysimulator.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Operations = NewOperationsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Operations *OperationsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewOperationsService(s *Service) *OperationsService { + rs := &OperationsService{s: s} + return rs +} + +type OperationsService struct { + s *Service +} + +// GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, +// or simulation. +type GoogleCloudPolicysimulatorV1Replay struct { + // Config: Required. The configuration used for the `Replay`. + Config *GoogleCloudPolicysimulatorV1ReplayConfig `json:"config,omitempty"` + + // Name: Output only. The resource name of the `Replay`, which has the + // following format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}`, where `{resource-id}` is the ID of the project, + // folder, or organization that owns the Replay. Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36` + Name string `json:"name,omitempty"` + + // ResultsSummary: Output only. Summary statistics about the replayed + // log entries. + ResultsSummary *GoogleCloudPolicysimulatorV1ReplayResultsSummary `json:"resultsSummary,omitempty"` + + // State: Output only. The current state of the `Replay`. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "PENDING" - The `Replay` has not started yet. + // "RUNNING" - The `Replay` is currently running. + // "SUCCEEDED" - The `Replay` has successfully completed. + // "FAILED" - The `Replay` has finished with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1Replay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1Replay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1ReplayConfig: The configuration used for +// a Replay. +type GoogleCloudPolicysimulatorV1ReplayConfig struct { + // LogSource: The logs to use as input for the Replay. + // + // Possible values: + // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log + // source is unspecified, the Replay defaults to using + // `RECENT_ACCESSES`. + // "RECENT_ACCESSES" - All access logs from the last 90 days. These + // logs may not include logs from the most recent 7 days. + LogSource string `json:"logSource,omitempty"` + + // PolicyOverlay: A mapping of the resources that you want to simulate + // policies for and the policies that you want to simulate. Keys are the + // full resource names for the resources. For example, + // `//cloudresourcemanager.googleapis.com/projects/my-project`. For + // examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + // Values are Policy objects representing the policies that you want to + // simulate. Replays automatically take into account any IAM policies + // inherited through the resource hierarchy, and any policies set on + // descendant resources. You do not need to include these policies in + // the policy overlay. + PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1ReplayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1ReplayOperationMetadata: Metadata about a +// Replay operation. +type GoogleCloudPolicysimulatorV1ReplayOperationMetadata struct { + // StartTime: Time when the request was received. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StartTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StartTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1ReplayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1ReplayResultsSummary: Summary statistics +// about the replayed log entries. +type GoogleCloudPolicysimulatorV1ReplayResultsSummary struct { + // DifferenceCount: The number of replayed log entries with a difference + // between baseline and simulated policies. + DifferenceCount int64 `json:"differenceCount,omitempty"` + + // ErrorCount: The number of log entries that could not be replayed. + ErrorCount int64 `json:"errorCount,omitempty"` + + // LogCount: The total number of log entries replayed. + LogCount int64 `json:"logCount,omitempty"` + + // NewestDate: The date of the newest log entry replayed. + NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` + + // OldestDate: The date of the oldest log entry replayed. + OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` + + // UnchangedCount: The number of replayed log entries with no difference + // between baseline and simulated policies. + UnchangedCount int64 `json:"unchangedCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DifferenceCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DifferenceCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1ReplayResultsSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1beta1Replay: A resource describing a +// `Replay`, or simulation. +type GoogleCloudPolicysimulatorV1beta1Replay struct { + // Config: Required. The configuration used for the `Replay`. + Config *GoogleCloudPolicysimulatorV1beta1ReplayConfig `json:"config,omitempty"` + + // Name: Output only. The resource name of the `Replay`, which has the + // following format: + // `{projects|folders|organizations}/{resource-id}/locations/global/repla + // ys/{replay-id}`, where `{resource-id}` is the ID of the project, + // folder, or organization that owns the Replay. Example: + // `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d + // 7d-8e03-479ce1833c36` + Name string `json:"name,omitempty"` + + // ResultsSummary: Output only. Summary statistics about the replayed + // log entries. + ResultsSummary *GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary `json:"resultsSummary,omitempty"` + + // State: Output only. The current state of the `Replay`. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state is unspecified. + // "PENDING" - The `Replay` has not started yet. + // "RUNNING" - The `Replay` is currently running. + // "SUCCEEDED" - The `Replay` has successfully completed. + // "FAILED" - The `Replay` has finished with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1beta1Replay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1beta1Replay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1beta1ReplayConfig: The configuration used +// for a Replay. +type GoogleCloudPolicysimulatorV1beta1ReplayConfig struct { + // LogSource: The logs to use as input for the Replay. + // + // Possible values: + // "LOG_SOURCE_UNSPECIFIED" - An unspecified log source. If the log + // source is unspecified, the Replay defaults to using + // `RECENT_ACCESSES`. + // "RECENT_ACCESSES" - All access logs from the last 90 days. These + // logs may not include logs from the most recent 7 days. + LogSource string `json:"logSource,omitempty"` + + // PolicyOverlay: A mapping of the resources that you want to simulate + // policies for and the policies that you want to simulate. Keys are the + // full resource names for the resources. For example, + // `//cloudresourcemanager.googleapis.com/projects/my-project`. For + // examples of full resource names for Google Cloud services, see + // https://cloud.google.com/iam/help/troubleshooter/full-resource-names. + // Values are Policy objects representing the policies that you want to + // simulate. Replays automatically take into account any IAM policies + // inherited through the resource hierarchy, and any policies set on + // descendant resources. You do not need to include these policies in + // the policy overlay. + PolicyOverlay map[string]GoogleIamV1Policy `json:"policyOverlay,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1beta1ReplayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata: Metadata +// about a Replay operation. +type GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata struct { + // StartTime: Time when the request was received. + StartTime string `json:"startTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StartTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StartTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary: Summary +// statistics about the replayed log entries. +type GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary struct { + // DifferenceCount: The number of replayed log entries with a difference + // between baseline and simulated policies. + DifferenceCount int64 `json:"differenceCount,omitempty"` + + // ErrorCount: The number of log entries that could not be replayed. + ErrorCount int64 `json:"errorCount,omitempty"` + + // LogCount: The total number of log entries replayed. + LogCount int64 `json:"logCount,omitempty"` + + // NewestDate: The date of the newest log entry replayed. + NewestDate *GoogleTypeDate `json:"newestDate,omitempty"` + + // OldestDate: The date of the oldest log entry replayed. + OldestDate *GoogleTypeDate `json:"oldestDate,omitempty"` + + // UnchangedCount: The number of replayed log entries with no difference + // between baseline and simulated policies. + UnchangedCount int64 `json:"unchangedCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DifferenceCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DifferenceCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: Specifies the audit configuration for a +// service. The configuration determines which permission types are +// logged, and what identities, if any, are exempted from logging. An +// AuditConfig must have one or more AuditLogConfigs. If there are +// AuditConfigs for both `allServices` and a specific service, the union +// of the two AuditConfigs is used for that service: the log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: Provides the configuration for logging a +// type of permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type GoogleIamV1AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. * + // `user:{emailid}`: An email address that represents a specific Google + // account. For example, `alice@example.com` . * + // `serviceAccount:{emailid}`: An email address that represents a Google + // service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) that represents all the users of that domain. + // For example, `google.com` or `example.com`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, +// which specifies access controls for Google Cloud resources. A +// `Policy` is a collection of `bindings`. A `binding` binds one or more +// `members`, or principals, to a single `role`. Principals can be user +// accounts, service accounts, Google groups, and domains (such as G +// Suite). A `role` is a named list of permissions; each `role` can be +// an IAM predefined role or a user-created custom role. For some types +// of Google Cloud resources, a `binding` can also specify a +// `condition`, which is a logical expression that allows access to a +// resource only if the expression evaluates to `true`. A condition can +// add constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: Represents a textual expression in the Common +// Expression Language (CEL) syntax. CEL is a C-like expression +// language. The syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.operations.list": + +type OperationsListCall struct { + s *Service + 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`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +func (r *OperationsService) List() *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// Name sets the optional parameter "name": The name of the operation's +// parent resource. +func (c *OperationsListCall) Name(name string) *OperationsListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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, err + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1alpha/operations", + // "httpMethod": "GET", + // "id": "policysimulator.operations.list", + // "parameterOrder": [], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "query", + // "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/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index a08a37dd056..702c2d1cd35 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -865,7 +865,7 @@ } } }, - "revision": "20220816", + "revision": "20220822", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -2519,10 +2519,6 @@ "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", "properties": { - "allowAnyScope": { - "description": "UNIMPLEMENTED: If enabled, ESF will allow OAuth credentials with any scope, more details in http://go/esf-oauth-any-scope. WARNING: Enabling this option will bring security risks. Customers enabling this feature accidentally may have the risk of losing authentication enforcement. Please reach out to api-auth@ and esf-team@ for approval and allowlisting before you enable this option. ", - "type": "boolean" - }, "canonicalScopes": { "description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", "type": "string" diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index fb34819c2bb..fc1182223ff 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -3483,15 +3483,6 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { // accepted and passed to the backend, a request can still fail due to // the backend requiring additional scopes or permissions. type OAuthRequirements struct { - // AllowAnyScope: UNIMPLEMENTED: If enabled, ESF will allow OAuth - // credentials with any scope, more details in - // http://go/esf-oauth-any-scope. WARNING: Enabling this option will - // bring security risks. Customers enabling this feature accidentally - // may have the risk of losing authentication enforcement. Please reach - // out to api-auth@ and esf-team@ for approval and allowlisting before - // you enable this option. - AllowAnyScope bool `json:"allowAnyScope,omitempty"` - // CanonicalScopes: The list of publicly documented OAuth scopes that // are allowed access. An OAuth token containing any of these scopes // will be accepted. Example: canonical_scopes: @@ -3499,7 +3490,7 @@ type OAuthRequirements struct { // https://www.googleapis.com/auth/calendar.read CanonicalScopes string `json:"canonicalScopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowAnyScope") to + // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3507,12 +3498,13 @@ type OAuthRequirements struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowAnyScope") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CanonicalScopes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index 163e1e56aea..b7b334081fa 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20220816", + "revision": "20220822", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1777,10 +1777,6 @@ "description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", "id": "OAuthRequirements", "properties": { - "allowAnyScope": { - "description": "UNIMPLEMENTED: If enabled, ESF will allow OAuth credentials with any scope, more details in http://go/esf-oauth-any-scope. WARNING: Enabling this option will bring security risks. Customers enabling this feature accidentally may have the risk of losing authentication enforcement. Please reach out to api-auth@ and esf-team@ for approval and allowlisting before you enable this option. ", - "type": "boolean" - }, "canonicalScopes": { "description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", "type": "string" diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index 4d31ce42ac0..2f58e01d356 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -2994,15 +2994,6 @@ func (s *MonitoringDestination) MarshalJSON() ([]byte, error) { // accepted and passed to the backend, a request can still fail due to // the backend requiring additional scopes or permissions. type OAuthRequirements struct { - // AllowAnyScope: UNIMPLEMENTED: If enabled, ESF will allow OAuth - // credentials with any scope, more details in - // http://go/esf-oauth-any-scope. WARNING: Enabling this option will - // bring security risks. Customers enabling this feature accidentally - // may have the risk of losing authentication enforcement. Please reach - // out to api-auth@ and esf-team@ for approval and allowlisting before - // you enable this option. - AllowAnyScope bool `json:"allowAnyScope,omitempty"` - // CanonicalScopes: The list of publicly documented OAuth scopes that // are allowed access. An OAuth token containing any of these scopes // will be accepted. Example: canonical_scopes: @@ -3010,7 +3001,7 @@ type OAuthRequirements struct { // https://www.googleapis.com/auth/calendar.read CanonicalScopes string `json:"canonicalScopes,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowAnyScope") to + // ForceSendFields is a list of field names (e.g. "CanonicalScopes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3018,12 +3009,13 @@ type OAuthRequirements struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowAnyScope") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CanonicalScopes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index 5c4e8e27d1f..c7397e263ea 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -2663,7 +2663,7 @@ ], "parameters": { "parent": { - "description": "GTM Workspaces's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", + "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", "location": "path", "pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", "required": true, @@ -2744,7 +2744,7 @@ "type": "string" }, "parent": { - "description": "GTM Workspaces's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", + "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", "location": "path", "pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", "required": true, @@ -3317,7 +3317,7 @@ } } }, - "revision": "20220813", + "revision": "20220820", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { @@ -3375,7 +3375,7 @@ "type": "object" }, "BuiltInVariable": { - "description": "Built-in variables are a special category of variables that are pre-created and non-customizable. They provide common functionality like accessing propeties of the gtm data layer, monitoring clicks, or accessing elements of a page URL.", + "description": "Built-in variables are a special category of variables that are pre-created and non-customizable. They provide common functionality like accessing properties of the gtm data layer, monitoring clicks, or accessing elements of a page URL.", "id": "BuiltInVariable", "properties": { "accountId": { @@ -4042,7 +4042,7 @@ "type": "string" }, "path": { - "description": "GTM Container Versions's API relative path.", + "description": "GTM Container Version's API relative path.", "type": "string" } }, diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index df0f4c85d49..c8cb536c4ef 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -437,7 +437,7 @@ func (s *AccountAccess) MarshalJSON() ([]byte, error) { // BuiltInVariable: Built-in variables are a special category of // variables that are pre-created and non-customizable. They provide -// common functionality like accessing propeties of the gtm data layer, +// common functionality like accessing properties of the gtm data layer, // monitoring clicks, or accessing elements of a page URL. type BuiltInVariable struct { // AccountId: GTM Account ID. @@ -1003,7 +1003,7 @@ type ContainerVersionHeader struct { // NumZones: Number of zones in the container version. NumZones string `json:"numZones,omitempty"` - // Path: GTM Container Versions's API relative path. + // Path: GTM Container Version's API relative path. Path string `json:"path,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -13902,7 +13902,7 @@ type AccountsContainersWorkspacesTriggersCreateCall struct { // Create: Creates a GTM Trigger. // -// - parent: GTM Workspaces's API relative path. Example: +// - parent: GTM Workspace's API relative path. Example: // accounts/{account_id}/containers/{container_id}/workspaces/{workspac // e_id}. func (r *AccountsContainersWorkspacesTriggersService) Create(parent string, trigger *Trigger) *AccountsContainersWorkspacesTriggersCreateCall { @@ -14012,7 +14012,7 @@ func (c *AccountsContainersWorkspacesTriggersCreateCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "parent": { - // "description": "GTM Workspaces's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", + // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", // "location": "path", // "pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", // "required": true, @@ -14301,7 +14301,7 @@ type AccountsContainersWorkspacesTriggersListCall struct { // List: Lists all GTM Triggers of a Container. // -// - parent: GTM Workspaces's API relative path. Example: +// - parent: GTM Workspace's API relative path. Example: // accounts/{account_id}/containers/{container_id}/workspaces/{workspac // e_id}. func (r *AccountsContainersWorkspacesTriggersService) List(parent string) *AccountsContainersWorkspacesTriggersListCall { @@ -14430,7 +14430,7 @@ func (c *AccountsContainersWorkspacesTriggersListCall) Do(opts ...googleapi.Call // "type": "string" // }, // "parent": { - // "description": "GTM Workspaces's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", + // "description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", // "location": "path", // "pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", // "required": true,