From 304fb51a451f64eb6e91ed66e05a2bec7fe7288e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 16 Sep 2023 00:22:12 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2165) --- artifactregistry/v1/artifactregistry-api.json | 13 +- artifactregistry/v1/artifactregistry-gen.go | 5 +- .../v1beta1/artifactregistry-api.json | 11 +- .../v1beta1/artifactregistry-gen.go | 3 +- .../v1beta2/artifactregistry-api.json | 11 +- .../v1beta2/artifactregistry-gen.go | 3 +- batch/v1/batch-api.json | 4 +- batch/v1/batch-gen.go | 4 +- .../v1/certificatemanager-api.json | 4 +- .../v1/certificatemanager-gen.go | 2 +- cloudtasks/v2/cloudtasks-api.json | 12 +- cloudtasks/v2/cloudtasks-gen.go | 46 +- cloudtasks/v2beta2/cloudtasks-api.json | 85 ++- cloudtasks/v2beta2/cloudtasks-gen.go | 389 +++++++++++++- cloudtasks/v2beta3/cloudtasks-api.json | 16 +- cloudtasks/v2beta3/cloudtasks-gen.go | 74 ++- connectors/v1/connectors-api.json | 255 ++++++++- connectors/v1/connectors-gen.go | 153 +++++- connectors/v2/connectors-api.json | 310 ++++++++++- connectors/v2/connectors-gen.go | 504 +++++++++++++++++- dataform/v1beta1/dataform-api.json | 4 +- .../v1/networkconnectivity-api.json | 24 +- .../v1/networkconnectivity-gen.go | 56 ++ transcoder/v1/transcoder-api.json | 17 +- transcoder/v1/transcoder-gen.go | 33 ++ workflows/v1/workflows-api.json | 56 +- workflows/v1/workflows-gen.go | 235 ++++++++ 27 files changed, 2231 insertions(+), 98 deletions(-) diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 36e3c166b6e..fbba2ac1b61 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -18,6 +18,13 @@ "description": "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/artifacts/docs/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://artifactregistry.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -1661,7 +1668,7 @@ } } }, - "revision": "20230905", + "revision": "20230913", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -2998,7 +3005,7 @@ "description": "Docker repository config contains repository level configuration for the repositories of docker type." }, "format": { - "description": "The format of packages that are stored in the repository.", + "description": "Optional. The format of packages that are stored in the repository.", "enum": [ "FORMAT_UNSPECIFIED", "DOCKER", @@ -3041,7 +3048,7 @@ "description": "Maven repository config contains repository level configuration for the repositories of maven type." }, "mode": { - "description": "The mode of the repository.", + "description": "Optional. The mode of the repository.", "enum": [ "MODE_UNSPECIFIED", "STANDARD_REPOSITORY", diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index ad2a0b346b5..413fd9b5f77 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -2675,7 +2675,8 @@ type Repository struct { // configuration for the repositories of docker type. DockerConfig *DockerRepositoryConfig `json:"dockerConfig,omitempty"` - // Format: The format of packages that are stored in the repository. + // Format: Optional. The format of packages that are stored in the + // repository. // // Possible values: // "FORMAT_UNSPECIFIED" - Unspecified package format. @@ -2709,7 +2710,7 @@ type Repository struct { // configuration for the repositories of maven type. MavenConfig *MavenRepositoryConfig `json:"mavenConfig,omitempty"` - // Mode: The mode of the repository. + // Mode: Optional. The mode of the repository. // // Possible values: // "MODE_UNSPECIFIED" - Unspecified mode. diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index 68d5dd9a2d7..8f652b9f475 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -18,6 +18,13 @@ "description": "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/artifacts/docs/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://artifactregistry.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -929,7 +936,7 @@ } } }, - "revision": "20230803", + "revision": "20230913", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { @@ -1289,7 +1296,7 @@ "type": "string" }, "format": { - "description": "The format of packages that are stored in the repository.", + "description": "Optional. The format of packages that are stored in the repository.", "enum": [ "FORMAT_UNSPECIFIED", "DOCKER", diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 53f71397066..57abad7f37a 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -978,7 +978,8 @@ type Repository struct { // Description: The user-provided description of the repository. Description string `json:"description,omitempty"` - // Format: The format of packages that are stored in the repository. + // Format: Optional. The format of packages that are stored in the + // repository. // // Possible values: // "FORMAT_UNSPECIFIED" - Unspecified package format. diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index fa50a3d4618..98eee135dbe 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -18,6 +18,13 @@ "description": "Store and manage build artifacts in a scalable and integrated service built on Google infrastructure.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/artifacts/docs/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://artifactregistry.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -1135,7 +1142,7 @@ } } }, - "revision": "20230905", + "revision": "20230913", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -1749,7 +1756,7 @@ "type": "string" }, "format": { - "description": "The format of packages that are stored in the repository.", + "description": "Optional. The format of packages that are stored in the repository.", "enum": [ "FORMAT_UNSPECIFIED", "DOCKER", diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index f93dc398ec0..3e135e5de42 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -1416,7 +1416,8 @@ type Repository struct { // Description: The user-provided description of the repository. Description string `json:"description,omitempty"` - // Format: The format of packages that are stored in the repository. + // Format: Optional. The format of packages that are stored in the + // repository. // // Possible values: // "FORMAT_UNSPECIFIED" - Unspecified package format. diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index e6ae9365d3a..982ce8ced69 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20230807", + "revision": "20230826", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1087,7 +1087,7 @@ "id": "Disk", "properties": { "diskInterface": { - "description": "Local SSDs are available through both \"SCSI\" and \"NVMe\" interfaces. If not indicated, \"NVMe\" will be the default one for local ssds. We only support \"SCSI\" for persistent disks now.", + "description": "Local SSDs are available through both \"SCSI\" and \"NVMe\" interfaces. If not indicated, \"NVMe\" will be the default one for local ssds. This field is ignored for persistent disks as the interface is chosen automatically. See https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.", "type": "string" }, "image": { diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 78925b766eb..709e68b03f7 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1074,7 +1074,9 @@ func (s *Container) MarshalJSON() ([]byte, error) { type Disk struct { // DiskInterface: Local SSDs are available through both "SCSI" and // "NVMe" interfaces. If not indicated, "NVMe" will be the default one - // for local ssds. We only support "SCSI" for persistent disks now. + // for local ssds. This field is ignored for persistent disks as the + // interface is chosen automatically. See + // https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface. DiskInterface string `json:"diskInterface,omitempty"` // Image: URL for a VM image to use as the data source for this disk. diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 2f813c7fd53..8b1c18a92e6 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -1280,7 +1280,7 @@ } } }, - "revision": "20230809", + "revision": "20230906", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { @@ -1397,7 +1397,7 @@ "enumDescriptions": [ "Certificates with default scope are served from core Google data centers. If unsure, choose this option.", "Certificates with scope EDGE_CACHE are special-purposed certificates, served from Edge Points of Presence. See https://cloud.google.com/vpc/docs/edge-locations.", - "Certificates with ALL_REGIONS scope are served from all GCP regions. See https://cloud.google.com/compute/docs/regions-zones." + "Certificates with ALL_REGIONS scope are served from all Google Cloud regions. See https://cloud.google.com/compute/docs/regions-zones." ], "type": "string" }, diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index 5276c29768f..ec078629df6 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -365,7 +365,7 @@ type Certificate struct { // special-purposed certificates, served from Edge Points of Presence. // See https://cloud.google.com/vpc/docs/edge-locations. // "ALL_REGIONS" - Certificates with ALL_REGIONS scope are served from - // all GCP regions. See + // all Google Cloud regions. See // https://cloud.google.com/compute/docs/regions-zones. Scope string `json:"scope,omitempty"` diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index 42be6f58dff..0d1ec55ae35 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -685,7 +685,7 @@ } } }, - "revision": "20230505", + "revision": "20230906", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -1067,7 +1067,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { @@ -1182,7 +1182,7 @@ "type": "integer" }, "maxBackoff": { - "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. `max_backoff` will be truncated to the nearest second. This field has the same meaning as [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", + "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `max_backoff` will be truncated to the nearest second. This field has the same meaning as [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", "format": "google-duration", "type": "string" }, @@ -1192,12 +1192,12 @@ "type": "integer" }, "maxRetryDuration": { - "description": "If positive, `max_retry_duration` specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once `max_retry_duration` time has passed *and* the task has been attempted max_attempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the queue is created, Cloud Tasks will pick the default. `max_retry_duration` will be truncated to the nearest second. This field has the same meaning as [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", + "description": "If positive, `max_retry_duration` specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once `max_retry_duration` time has passed *and* the task has been attempted max_attempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For the maximum possible value or the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `max_retry_duration` will be truncated to the nearest second. This field has the same meaning as [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", "format": "google-duration", "type": "string" }, "minBackoff": { - "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. `min_backoff` will be truncated to the nearest second. This field has the same meaning as [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", + "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `min_backoff` will be truncated to the nearest second. This field has the same meaning as [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", "format": "google-duration", "type": "string" } @@ -1294,7 +1294,7 @@ "type": "integer" }, "dispatchDeadline": { - "description": "The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: * For HTTP tasks, the default is 10 minutes. The deadline must be in the interval [15 seconds, 30 minutes]. * For App Engine tasks, 0 indicates that the request has the default deadline. The default deadline depends on the [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) of the service: 10 minutes for standard apps with automatic scaling, 24 hours for standard apps with manual and basic scaling, and 60 minutes for flex apps. If the request deadline is set, it must be in the interval [15 seconds, 24 hours 15 seconds]. Regardless of the task's `dispatch_deadline`, the app handler will not run for longer than than the service's timeout. We recommend setting the `dispatch_deadline` to at most a few seconds more than the app handler's timeout. For more information see [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). `dispatch_deadline` will be truncated to the nearest millisecond. The deadline is an approximate deadline.", + "description": "The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: * For HTTP tasks, the default is 10 minutes. The deadline must be in the interval [15 seconds, 30 minutes]. * For App Engine tasks, 0 indicates that the request has the default deadline. The default deadline depends on the [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) of the service: 10 minutes for standard apps with automatic scaling, 24 hours for standard apps with manual and basic scaling, and 60 minutes for flex apps. If the request deadline is set, it must be in the interval [15 seconds, 24 hours 15 seconds]. Regardless of the task's `dispatch_deadline`, the app handler will not run for longer than than the service's timeout. We recommend setting the `dispatch_deadline` to at most a few seconds more than the app handler's timeout. For more information see [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `dispatch_deadline` will be truncated to the nearest millisecond. The deadline is an approximate deadline.", "format": "google-duration", "type": "string" }, diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index 56ace42ae3e..e55fcc93ecb 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -1110,7 +1110,7 @@ type PauseQueueRequest struct { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1119,17 +1119,17 @@ type PauseQueueRequest struct { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and @@ -1432,9 +1432,13 @@ type RetryConfig struct { // MaxBackoff: A task will be scheduled for retry between min_backoff // and max_backoff duration after it fails, if the queue's RetryConfig // specifies that the task should be retried. If unspecified when the - // queue is created, Cloud Tasks will pick the default. `max_backoff` - // will be truncated to the nearest second. This field has the same - // meaning as max_backoff_seconds in queue.yaml/xml + // queue is created, Cloud Tasks will pick the default. The value must + // be given as a string that indicates the length of time (in seconds) + // followed by `s` (for "seconds"). For more information on the format, + // see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // `max_backoff` will be truncated to the nearest second. This field has + // the same meaning as max_backoff_seconds in queue.yaml/xml // (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). MaxBackoff string `json:"maxBackoff,omitempty"` @@ -1459,18 +1463,26 @@ type RetryConfig struct { // the task has been attempted max_attempts times, no further attempts // will be made and the task will be deleted. If zero, then the task age // is unlimited. If unspecified when the queue is created, Cloud Tasks - // will pick the default. `max_retry_duration` will be truncated to the - // nearest second. This field has the same meaning as task_age_limit in - // queue.yaml/xml + // will pick the default. The value must be given as a string that + // indicates the length of time (in seconds) followed by `s` (for + // "seconds"). For the maximum possible value or the format, see the + // documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // `max_retry_duration` will be truncated to the nearest second. This + // field has the same meaning as task_age_limit in queue.yaml/xml // (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). MaxRetryDuration string `json:"maxRetryDuration,omitempty"` // MinBackoff: A task will be scheduled for retry between min_backoff // and max_backoff duration after it fails, if the queue's RetryConfig // specifies that the task should be retried. If unspecified when the - // queue is created, Cloud Tasks will pick the default. `min_backoff` - // will be truncated to the nearest second. This field has the same - // meaning as min_backoff_seconds in queue.yaml/xml + // queue is created, Cloud Tasks will pick the default. The value must + // be given as a string that indicates the length of time (in seconds) + // followed by `s` (for "seconds"). For more information on the format, + // see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // `min_backoff` will be truncated to the nearest second. This field has + // the same meaning as min_backoff_seconds in queue.yaml/xml // (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). MinBackoff string `json:"minBackoff,omitempty"` @@ -1703,6 +1715,10 @@ type Task struct { // `dispatch_deadline` to at most a few seconds more than the app // handler's timeout. For more information see Timeouts // (https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + // The value must be given as a string that indicates the length of time + // (in seconds) followed by `s` (for "seconds"). For more information on + // the format, see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). // `dispatch_deadline` will be truncated to the nearest millisecond. The // deadline is an approximate deadline. DispatchDeadline string `json:"dispatchDeadline,omitempty"` diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 5773f49a453..250c04536ba 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -166,6 +166,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getCmekConfig": { + "description": "Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured.", + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "httpMethod": "GET", + "id": "cloudtasks.projects.locations.getCmekConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The config. For example: projects/PROJECT_ID/locations/LOCATION_ID/CmekConfig`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfig$", + "required": true, + "type": "string" + } + }, + "path": "v2beta2/{+name}", + "response": { + "$ref": "CmekConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists information about the supported locations for this service.", "flatPath": "v2beta2/projects/{projectsId}/locations", @@ -206,6 +231,44 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "updateCmekConfig": { + "description": "Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks created in the location will be encrypted at-rest with the KMS-key provided in the config.", + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "httpMethod": "PATCH", + "id": "cloudtasks.projects.locations.updateCmekConfig", + "parameterOrder": [ + "projectsId", + "locationsId" + ], + "parameters": { + "locationsId": { + "location": "path", + "required": true, + "type": "string" + }, + "projectsId": { + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "List of fields to be updated in this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig", + "request": { + "$ref": "CmekConfig" + }, + "response": { + "$ref": "CmekConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -240,7 +303,7 @@ ] }, "delete": { - "description": "Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.", + "description": "Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, you may be prevented from creating a new queue with the same name as the deleted queue for a tombstone window of up to 3 days. During this window, the CreateQueue operation may appear to recreate the queue, but this can be misleading. If you attempt to create a queue with the same name as one that is in the tombstone window, run GetQueue to confirm that the queue creation was successful. If GetQueue returns 200 response code, your queue was successfully created with the name of the previously deleted queue. Otherwise, your queue did not successfully recreate. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.", "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", "httpMethod": "DELETE", "id": "cloudtasks.projects.locations.queues.delete", @@ -876,7 +939,7 @@ } } }, - "revision": "20230505", + "revision": "20230906", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -1072,6 +1135,22 @@ }, "type": "object" }, + "CmekConfig": { + "description": "CMEK, or Customer Managed Encryption Keys, enables GCP products to put control over encryption and key management in their customer’s hands.", + "id": "CmekConfig", + "properties": { + "kmsKey": { + "description": "Resource name of the Cloud KMS key, of the form `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID`, that will be used to encrypt the Queues \u0026 Tasks in the region. Setting this as blank will turn off CMEK encryption.", + "type": "string" + }, + "name": { + "description": "Output only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig`", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "CreateTaskRequest": { "description": "Request message for CreateTask.", "id": "CreateTaskRequest", @@ -1492,7 +1571,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index c9d7a050383..42677efc6c2 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -756,6 +756,48 @@ func (s *CancelLeaseRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CmekConfig: CMEK, or Customer Managed Encryption Keys, enables GCP +// products to put control over encryption and key management in their +// customer’s hands. +type CmekConfig struct { + // KmsKey: Resource name of the Cloud KMS key, of the form + // `projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/crypto + // Keys/KEY_ID`, that will be used to encrypt the Queues & Tasks in the + // region. Setting this as blank will turn off CMEK encryption. + KmsKey string `json:"kmsKey,omitempty"` + + // Name: Output only. The config resource name which includes the + // project and location and must end in 'cmekConfig', in the format + // projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig` + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "KmsKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "KmsKey") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CmekConfig) MarshalJSON() ([]byte, error) { + type NoMethod CmekConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateTaskRequest: Request message for CreateTask. type CreateTaskRequest struct { // ResponseView: The response_view specifies which subset of the Task @@ -1664,7 +1706,7 @@ type PauseQueueRequest struct { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1673,17 +1715,17 @@ type PauseQueueRequest struct { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and @@ -2979,6 +3021,155 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, } +// method id "cloudtasks.projects.locations.getCmekConfig": + +type ProjectsLocationsGetCmekConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCmekConfig: Gets the CMEK config. Gets the Customer Managed +// Encryption Key configured with the Cloud Tasks lcoation. By default +// there is no kms_key configured. +// +// - name: The config. For example: +// projects/PROJECT_ID/locations/LOCATION_ID/CmekConfig`. +func (r *ProjectsLocationsService) GetCmekConfig(name string) *ProjectsLocationsGetCmekConfigCall { + c := &ProjectsLocationsGetCmekConfigCall{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 *ProjectsLocationsGetCmekConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCmekConfigCall { + 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 *ProjectsLocationsGetCmekConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCmekConfigCall { + 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 *ProjectsLocationsGetCmekConfigCall) Context(ctx context.Context) *ProjectsLocationsGetCmekConfigCall { + 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 *ProjectsLocationsGetCmekConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCmekConfigCall) 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, "v2beta2/{+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 "cloudtasks.projects.locations.getCmekConfig" call. +// Exactly one of *CmekConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CmekConfig.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 *ProjectsLocationsGetCmekConfigCall) Do(opts ...googleapi.CallOption) (*CmekConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &CmekConfig{ + 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 CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig", + // "httpMethod": "GET", + // "id": "cloudtasks.projects.locations.getCmekConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The config. For example: projects/PROJECT_ID/locations/LOCATION_ID/CmekConfig`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/cmekConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}", + // "response": { + // "$ref": "CmekConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudtasks.projects.locations.list": type ProjectsLocationsListCall struct { @@ -3188,6 +3379,173 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "cloudtasks.projects.locations.updateCmekConfig": + +type ProjectsLocationsUpdateCmekConfigCall struct { + s *Service + projectsId string + locationsId string + cmekconfig *CmekConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCmekConfig: Creates or Updates a CMEK config. Updates the +// Customer Managed Encryption Key assotiated with the Cloud Tasks +// location (Creates if the key does not already exist). All new tasks +// created in the location will be encrypted at-rest with the KMS-key +// provided in the config. +// +// - locationsId: . +// - projectsId: . +func (r *ProjectsLocationsService) UpdateCmekConfig(projectsId string, locationsId string, cmekconfig *CmekConfig) *ProjectsLocationsUpdateCmekConfigCall { + c := &ProjectsLocationsUpdateCmekConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.cmekconfig = cmekconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields +// to be updated in this request. +func (c *ProjectsLocationsUpdateCmekConfigCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateCmekConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUpdateCmekConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateCmekConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUpdateCmekConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateCmekConfigCall { + 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 *ProjectsLocationsUpdateCmekConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateCmekConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmekconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudtasks.projects.locations.updateCmekConfig" call. +// Exactly one of *CmekConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CmekConfig.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 *ProjectsLocationsUpdateCmekConfigCall) Do(opts ...googleapi.CallOption) (*CmekConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &CmekConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks created in the location will be encrypted at-rest with the KMS-key provided in the config.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig", + // "httpMethod": "PATCH", + // "id": "cloudtasks.projects.locations.updateCmekConfig", + // "parameterOrder": [ + // "projectsId", + // "locationsId" + // ], + // "parameters": { + // "locationsId": { + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectsId": { + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "List of fields to be updated in this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2beta2/projects/{projectsId}/locations/{locationsId}/cmekConfig", + // "request": { + // "$ref": "CmekConfig" + // }, + // "response": { + // "$ref": "CmekConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudtasks.projects.locations.queues.create": type ProjectsLocationsQueuesCreateCall struct { @@ -3351,11 +3709,18 @@ type ProjectsLocationsQueuesDeleteCall struct { } // Delete: Deletes a queue. This command will delete the queue even if -// it has tasks in it. Note: If you delete a queue, a queue with the -// same name can't be created for 7 days. WARNING: Using this method may -// have unintended side effects if you are using an App Engine -// `queue.yaml` or `queue.xml` file to manage your queues. Read Overview -// of Queue Management and queue.yaml +// it has tasks in it. Note: If you delete a queue, you may be prevented +// from creating a new queue with the same name as the deleted queue for +// a tombstone window of up to 3 days. During this window, the +// CreateQueue operation may appear to recreate the queue, but this can +// be misleading. If you attempt to create a queue with the same name as +// one that is in the tombstone window, run GetQueue to confirm that the +// queue creation was successful. If GetQueue returns 200 response code, +// your queue was successfully created with the name of the previously +// deleted queue. Otherwise, your queue did not successfully recreate. +// WARNING: Using this method may have unintended side effects if you +// are using an App Engine `queue.yaml` or `queue.xml` file to manage +// your queues. Read Overview of Queue Management and queue.yaml // (https://cloud.google.com/tasks/docs/queue-yaml) before using this // method. // @@ -3453,7 +3818,7 @@ func (c *ProjectsLocationsQueuesDeleteCall) Do(opts ...googleapi.CallOption) (*E } return ret, nil // { - // "description": "Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.", + // "description": "Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, you may be prevented from creating a new queue with the same name as the deleted queue for a tombstone window of up to 3 days. During this window, the CreateQueue operation may appear to recreate the queue, but this can be misleading. If you attempt to create a queue with the same name as one that is in the tombstone window, run GetQueue to confirm that the queue creation was successful. If GetQueue returns 200 response code, your queue was successfully created with the name of the previously deleted queue. Otherwise, your queue did not successfully recreate. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.", // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", // "httpMethod": "DELETE", // "id": "cloudtasks.projects.locations.queues.delete", diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index 88962b3f050..8172e624e1e 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -732,7 +732,7 @@ } } }, - "revision": "20230726", + "revision": "20230906", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -1261,7 +1261,7 @@ "type": "object" }, "Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", "properties": { "bindings": { @@ -1372,12 +1372,12 @@ "readOnly": true }, "taskTtl": { - "description": "The maximum amount of time that a task will be retained in this queue. Queues created by Cloud Tasks have a default `task_ttl` of 31 days. After a task has lived for `task_ttl`, the task will be deleted regardless of whether it was dispatched or not. The `task_ttl` for queues created via queue.yaml/xml is equal to the maximum duration because there is a [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for these queues. To view the maximum valid duration, see the documentation for Duration.", + "description": "The maximum amount of time that a task will be retained in this queue. After a task has lived for `task_ttl`, the task will be deleted regardless of whether it was dispatched or not. The minimum value is 10 days. The maximum value is 10 years. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). Queues created by Cloud Tasks have a default `task_ttl` of 31 days. . Queues created by queue.yaml/xml have a fixed `task_ttl` of the maximum duration, because there is a [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for these queues.", "format": "google-duration", "type": "string" }, "tombstoneTtl": { - "description": "The task tombstone time to live (TTL). After a task is deleted or executed, the task's tombstone is retained for the length of time specified by `tombstone_ttl`. The tombstone is used by task de-duplication; another task with the same name can't be created until the tombstone has expired. For more information about task de-duplication, see the documentation for CreateTaskRequest. Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.", + "description": "The task tombstone time to live (TTL). After a task is deleted or executed, the task's tombstone is retained for the length of time specified by `tombstone_ttl`. The tombstone is used by task de-duplication; another task with the same name can't be created until the tombstone has expired. For more information about task de-duplication, see the documentation for CreateTaskRequest. The minimum value is 1 hour. The maximum value is 9 days. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.", "format": "google-duration", "type": "string" }, @@ -1473,7 +1473,7 @@ "type": "integer" }, "maxBackoff": { - "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. `max_backoff` will be truncated to the nearest second. This field has the same meaning as [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", + "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `max_backoff` will be truncated to the nearest second. This field has the same meaning as [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", "format": "google-duration", "type": "string" }, @@ -1483,12 +1483,12 @@ "type": "integer" }, "maxRetryDuration": { - "description": "If positive, `max_retry_duration` specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once `max_retry_duration` time has passed *and* the task has been attempted max_attempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the queue is created, Cloud Tasks will pick the default. `max_retry_duration` will be truncated to the nearest second. This field has the same meaning as [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", + "description": "If positive, `max_retry_duration` specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once `max_retry_duration` time has passed *and* the task has been attempted max_attempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. If unspecified when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For the maximum possible value or the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `max_retry_duration` will be truncated to the nearest second. This field has the same meaning as [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", "format": "google-duration", "type": "string" }, "minBackoff": { - "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. `min_backoff` will be truncated to the nearest second. This field has the same meaning as [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", + "description": "A task will be scheduled for retry between min_backoff and max_backoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. If unspecified when the queue is created, Cloud Tasks will pick the default. The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `min_backoff` will be truncated to the nearest second. This field has the same meaning as [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).", "format": "google-duration", "type": "string" } @@ -1585,7 +1585,7 @@ "type": "integer" }, "dispatchDeadline": { - "description": "The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: * For HTTP tasks, the default is 10 minutes. The deadline must be in the interval [15 seconds, 30 minutes]. * For App Engine tasks, 0 indicates that the request has the default deadline. The default deadline depends on the [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) of the service: 10 minutes for standard apps with automatic scaling, 24 hours for standard apps with manual and basic scaling, and 60 minutes for flex apps. If the request deadline is set, it must be in the interval [15 seconds, 24 hours 15 seconds]. Regardless of the task's `dispatch_deadline`, the app handler will not run for longer than than the service's timeout. We recommend setting the `dispatch_deadline` to at most a few seconds more than the app handler's timeout. For more information see [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). `dispatch_deadline` will be truncated to the nearest millisecond. The deadline is an approximate deadline.", + "description": "The deadline for requests sent to the worker. If the worker does not respond by this deadline then the request is cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the task according to the RetryConfig. Note that when the request is cancelled, Cloud Tasks will stop listening for the response, but whether the worker stops processing depends on the worker. For example, if the worker is stuck, it may not react to cancelled requests. The default and maximum values depend on the type of request: * For HTTP tasks, the default is 10 minutes. The deadline must be in the interval [15 seconds, 30 minutes]. * For App Engine tasks, 0 indicates that the request has the default deadline. The default deadline depends on the [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) of the service: 10 minutes for standard apps with automatic scaling, 24 hours for standard apps with manual and basic scaling, and 60 minutes for flex apps. If the request deadline is set, it must be in the interval [15 seconds, 24 hours 15 seconds]. Regardless of the task's `dispatch_deadline`, the app handler will not run for longer than than the service's timeout. We recommend setting the `dispatch_deadline` to at most a few seconds more than the app handler's timeout. For more information see [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). The value must be given as a string that indicates the length of time (in seconds) followed by `s` (for \"seconds\"). For more information on the format, see the documentation for [Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration). `dispatch_deadline` will be truncated to the nearest millisecond. The deadline is an approximate deadline.", "format": "google-duration", "type": "string" }, diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index b3425817438..8e7c545ccd7 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -1433,7 +1433,7 @@ type PauseQueueRequest struct { // both. To learn which resources support conditions in their IAM // policies, see the IAM documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -// **JSON example:** { "bindings": [ { "role": +// **JSON example:** ``` { "bindings": [ { "role": // "roles/resourcemanager.organizationAdmin", "members": [ // "user:mike@example.com", "group:admins@example.com", // "domain:google.com", @@ -1442,17 +1442,17 @@ type PauseQueueRequest struct { // "user:eve@example.com" ], "condition": { "title": "expirable access", // "description": "Does not grant access after Sep 2020", "expression": // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], -// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - +// "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` +// bindings: - members: - user:mike@example.com - +// group:admins@example.com - domain:google.com - // serviceAccount:my-project-id@appspot.gserviceaccount.com role: // roles/resourcemanager.organizationAdmin - members: - // user:eve@example.com role: roles/resourcemanager.organizationViewer // condition: title: expirable access description: Does not grant access // after Sep 2020 expression: request.time < // timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 -// For a description of IAM and its features, see the IAM documentation -// (https://cloud.google.com/iam/docs/). +// ``` For a description of IAM and its features, see the IAM +// documentation (https://cloud.google.com/iam/docs/). type Policy struct { // Bindings: Associates a list of `members`, or principals, with a // `role`. Optionally, may specify a `condition` that determines how and @@ -1701,14 +1701,18 @@ type Queue struct { Stats *QueueStats `json:"stats,omitempty"` // TaskTtl: The maximum amount of time that a task will be retained in - // this queue. Queues created by Cloud Tasks have a default `task_ttl` - // of 31 days. After a task has lived for `task_ttl`, the task will be - // deleted regardless of whether it was dispatched or not. The - // `task_ttl` for queues created via queue.yaml/xml is equal to the - // maximum duration because there is a storage quota + // this queue. After a task has lived for `task_ttl`, the task will be + // deleted regardless of whether it was dispatched or not. The minimum + // value is 10 days. The maximum value is 10 years. The value must be + // given as a string that indicates the length of time (in seconds) + // followed by `s` (for "seconds"). For more information on the format, + // see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // Queues created by Cloud Tasks have a default `task_ttl` of 31 days. . + // Queues created by queue.yaml/xml have a fixed `task_ttl` of the + // maximum duration, because there is a storage quota // (https://cloud.google.com/appengine/quotas#Task_Queue) for these - // queues. To view the maximum valid duration, see the documentation for - // Duration. + // queues. TaskTtl string `json:"taskTtl,omitempty"` // TombstoneTtl: The task tombstone time to live (TTL). After a task is @@ -1716,8 +1720,14 @@ type Queue struct { // of time specified by `tombstone_ttl`. The tombstone is used by task // de-duplication; another task with the same name can't be created // until the tombstone has expired. For more information about task - // de-duplication, see the documentation for CreateTaskRequest. Queues - // created by Cloud Tasks have a default `tombstone_ttl` of 1 hour. + // de-duplication, see the documentation for CreateTaskRequest. The + // minimum value is 1 hour. The maximum value is 9 days. The value must + // be given as a string that indicates the length of time (in seconds) + // followed by `s` (for "seconds"). For more information on the format, + // see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 + // hour. TombstoneTtl string `json:"tombstoneTtl,omitempty"` // Type: Immutable. The type of a queue (push or pull). `Queue.type` is @@ -1929,9 +1939,13 @@ type RetryConfig struct { // MaxBackoff: A task will be scheduled for retry between min_backoff // and max_backoff duration after it fails, if the queue's RetryConfig // specifies that the task should be retried. If unspecified when the - // queue is created, Cloud Tasks will pick the default. `max_backoff` - // will be truncated to the nearest second. This field has the same - // meaning as max_backoff_seconds in queue.yaml/xml + // queue is created, Cloud Tasks will pick the default. The value must + // be given as a string that indicates the length of time (in seconds) + // followed by `s` (for "seconds"). For more information on the format, + // see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // `max_backoff` will be truncated to the nearest second. This field has + // the same meaning as max_backoff_seconds in queue.yaml/xml // (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). MaxBackoff string `json:"maxBackoff,omitempty"` @@ -1956,18 +1970,26 @@ type RetryConfig struct { // the task has been attempted max_attempts times, no further attempts // will be made and the task will be deleted. If zero, then the task age // is unlimited. If unspecified when the queue is created, Cloud Tasks - // will pick the default. `max_retry_duration` will be truncated to the - // nearest second. This field has the same meaning as task_age_limit in - // queue.yaml/xml + // will pick the default. The value must be given as a string that + // indicates the length of time (in seconds) followed by `s` (for + // "seconds"). For the maximum possible value or the format, see the + // documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // `max_retry_duration` will be truncated to the nearest second. This + // field has the same meaning as task_age_limit in queue.yaml/xml // (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). MaxRetryDuration string `json:"maxRetryDuration,omitempty"` // MinBackoff: A task will be scheduled for retry between min_backoff // and max_backoff duration after it fails, if the queue's RetryConfig // specifies that the task should be retried. If unspecified when the - // queue is created, Cloud Tasks will pick the default. `min_backoff` - // will be truncated to the nearest second. This field has the same - // meaning as min_backoff_seconds in queue.yaml/xml + // queue is created, Cloud Tasks will pick the default. The value must + // be given as a string that indicates the length of time (in seconds) + // followed by `s` (for "seconds"). For more information on the format, + // see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). + // `min_backoff` will be truncated to the nearest second. This field has + // the same meaning as min_backoff_seconds in queue.yaml/xml // (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). MinBackoff string `json:"minBackoff,omitempty"` @@ -2200,6 +2222,10 @@ type Task struct { // `dispatch_deadline` to at most a few seconds more than the app // handler's timeout. For more information see Timeouts // (https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + // The value must be given as a string that indicates the length of time + // (in seconds) followed by `s` (for "seconds"). For more information on + // the format, see the documentation for Duration + // (https://protobuf.dev/reference/protobuf/google.protobuf/#duration). // `dispatch_deadline` will be truncated to the nearest millisecond. The // deadline is an approximate deadline. DispatchDeadline string `json:"dispatchDeadline,omitempty"` diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 3664551e6ff..1bb66539864 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1773,7 +1773,7 @@ } } }, - "revision": "20230812", + "revision": "20230906", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2201,6 +2201,11 @@ "readOnly": true, "type": "string" }, + "isTrustedTester": { + "description": "Output only. Is trusted tester program enabled for the project.", + "readOnly": true, + "type": "boolean" + }, "labels": { "additionalProperties": { "type": "string" @@ -2471,6 +2476,10 @@ "resourceRequests": { "$ref": "ResourceRequests", "description": "System resource requests." + }, + "sharedDeployment": { + "description": "The name of shared connector deployment.", + "type": "string" } }, "type": "object" @@ -2628,6 +2637,11 @@ "$ref": "ResourceRequests", "description": "Output only. System resource requests.", "readOnly": true + }, + "sharedDeployment": { + "description": "Output only. The name of shared connector deployment.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -3036,9 +3050,17 @@ "description": "Enrichment Enabled.", "type": "boolean" }, + "privateConnectivityEnabled": { + "description": "Optional. Private Connectivity Enabled.", + "type": "boolean" + }, + "publicEventsListenerEndpoint": { + "description": "Optional. Public Events listener endpoint.", + "type": "string" + }, "registrationDestinationConfig": { "$ref": "DestinationConfig", - "description": "Registration endpoint for auto regsitration." + "description": "Registration endpoint for auto registration." } }, "type": "object" @@ -3178,12 +3200,14 @@ "enum": [ "STATE_UNSPECIFIED", "ACTIVE", - "ERROR" + "ERROR", + "PUBLIC_ENDPOINT_REQUIRED" ], "enumDescriptions": [ "Default state.", "Eventing is enabled and ready to receive events.", - "Eventing is not active due to an error." + "Eventing is not active due to an error.", + "Public endpoint required." ], "readOnly": true, "type": "string" @@ -3412,6 +3436,10 @@ "description": "Name of the Field.", "type": "string" }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema representation of this entity's schema" + }, "key": { "description": "The following boolean field specifies if the current Field acts as a primary key or id if the parent is of type entity.", "type": "boolean" @@ -3656,6 +3684,10 @@ "description": "A brief description of the Parameter.", "type": "string" }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema representation of this action's parameter" + }, "nullable": { "description": "Specifies whether a null value is allowed.", "type": "boolean" @@ -3667,6 +3699,202 @@ }, "type": "object" }, + "JsonSchema": { + "description": "JsonSchema representation of schema metadata", + "id": "JsonSchema", + "properties": { + "default": { + "description": "The default value of the field or object described by this schema.", + "type": "any" + }, + "description": { + "description": "A description of this schema.", + "type": "string" + }, + "enum": { + "description": "Possible values for an enumeration. This works in conjunction with `type` to represent types with a fixed set of legal values", + "items": { + "type": "any" + }, + "type": "array" + }, + "format": { + "description": "Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format", + "type": "string" + }, + "items": { + "$ref": "JsonSchema", + "description": "Schema that applies to array values, applicable only if this is of type `array`." + }, + "jdbcType": { + "description": "JDBC datatype of the field.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "DATA_TYPE_INT", + "DATA_TYPE_SMALLINT", + "DATA_TYPE_DOUBLE", + "DATA_TYPE_DATE", + "DATA_TYPE_DATETIME", + "DATA_TYPE_TIME", + "DATA_TYPE_STRING", + "DATA_TYPE_LONG", + "DATA_TYPE_BOOLEAN", + "DATA_TYPE_DECIMAL", + "DATA_TYPE_UUID", + "DATA_TYPE_BLOB", + "DATA_TYPE_BIT", + "DATA_TYPE_TINYINT", + "DATA_TYPE_INTEGER", + "DATA_TYPE_BIGINT", + "DATA_TYPE_FLOAT", + "DATA_TYPE_REAL", + "DATA_TYPE_NUMERIC", + "DATA_TYPE_CHAR", + "DATA_TYPE_VARCHAR", + "DATA_TYPE_LONGVARCHAR", + "DATA_TYPE_TIMESTAMP", + "DATA_TYPE_NCHAR", + "DATA_TYPE_NVARCHAR", + "DATA_TYPE_LONGNVARCHAR", + "DATA_TYPE_NULL", + "DATA_TYPE_OTHER", + "DATA_TYPE_JAVA_OBJECT", + "DATA_TYPE_DISTINCT", + "DATA_TYPE_STRUCT", + "DATA_TYPE_ARRAY", + "DATA_TYPE_CLOB", + "DATA_TYPE_REF", + "DATA_TYPE_DATALINK", + "DATA_TYPE_ROWID", + "DATA_TYPE_BINARY", + "DATA_TYPE_VARBINARY", + "DATA_TYPE_LONGVARBINARY", + "DATA_TYPE_NCLOB", + "DATA_TYPE_SQLXML", + "DATA_TYPE_REF_CURSOR", + "DATA_TYPE_TIME_WITH_TIMEZONE", + "DATA_TYPE_TIMESTAMP_WITH_TIMEZONE" + ], + "enumDeprecated": [ + false, + true, + false, + false, + false, + true, + false, + true, + true, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Data type is not specified.", + "DEPRECATED! Use DATA_TYPE_INTEGER.", + "Short integer(int16) data type.", + "Double data type.", + "Date data type.", + "DEPRECATED! Use DATA_TYPE_TIMESTAMP.", + "Time data type.", + "DEPRECATED! Use DATA_TYPE_VARCHAR.", + "DEPRECATED! Use DATA_TYPE_BIGINT.", + "Boolean data type.", + "Decimal data type.", + "DEPRECATED! Use DATA_TYPE_VARCHAR.", + "UNSUPPORTED! Binary data type.", + "Bit data type.", + "Small integer(int8) data type.", + "Integer(int32) data type.", + "Long integer(int64) data type.", + "Float data type.", + "Real data type.", + "Numeric data type.", + "Char data type.", + "Varchar data type.", + "Longvarchar data type.", + "Timestamp data type.", + "Nchar data type.", + "Nvarchar data type.", + "Longnvarchar data type.", + "Null data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Row id data type.", + "UNSUPPORTED! Binary data type.", + "UNSUPPORTED! Variable binary data type.", + "UNSUPPORTED! Long variable binary data type.", + "UNSUPPORTED! NCLOB data type.", + "UNSUPPORTED! SQL XML data type is not supported.", + "UNSUPPORTED! Cursor reference type is not supported.", + "UNSUPPORTED! Use TIME or TIMESTAMP instead.", + "UNSUPPORTED! Use TIMESTAMP instead." + ], + "type": "string" + }, + "properties": { + "additionalProperties": { + "$ref": "JsonSchema" + }, + "description": "The child schemas, applicable only if this is of type `object`. The key is the name of the property and the value is the json schema that describes that property", + "type": "object" + }, + "required": { + "description": "Whether this property is required.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "JSON Schema Validation: A Vocabulary for Structural Validation of JSON", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "JwtClaims": { "description": "JWT claims used for the jwt-bearer authorization grant.", "id": "JwtClaims", @@ -4581,6 +4809,10 @@ "field": { "description": "Name of the result field.", "type": "string" + }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema representation of this action's result" } }, "type": "object" @@ -4634,6 +4866,11 @@ "readOnly": true, "type": "string" }, + "inputJsonSchema": { + "$ref": "JsonSchema", + "description": "Output only. JsonSchema representation of this action's input metadata", + "readOnly": true + }, "inputParameters": { "description": "Output only. List of input parameter metadata for the action.", "items": { @@ -4642,6 +4879,11 @@ "readOnly": true, "type": "array" }, + "resultJsonSchema": { + "$ref": "JsonSchema", + "description": "Output only. JsonSchema representation of this action's result metadata", + "readOnly": true + }, "resultMetadata": { "description": "Output only. List of result field metadata.", "items": { @@ -4753,6 +4995,11 @@ }, "readOnly": true, "type": "array" + }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "Output only. JsonSchema representation of this entity's metadata", + "readOnly": true } }, "type": "object" diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index d63e2e407f7..1906cd90c5e 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -862,6 +862,10 @@ type Connection struct { // stored. formatted like: gcr.io/{bucketName}/{imageName} ImageLocation string `json:"imageLocation,omitempty"` + // IsTrustedTester: Output only. Is trusted tester program enabled for + // the project. + IsTrustedTester bool `json:"isTrustedTester,omitempty"` + // Labels: Optional. Resource labels to represent user-provided // metadata. Refer to cloud documentation on labels for more details. // https://cloud.google.com/compute/docs/labeling-resources @@ -1144,6 +1148,9 @@ type ConnectorInfraConfig struct { // ResourceRequests: System resource requests. ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` + // SharedDeployment: The name of shared connector deployment. + SharedDeployment string `json:"sharedDeployment,omitempty"` + // ForceSendFields is a list of field names (e.g. "HpaConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1293,6 +1300,10 @@ type ConnectorVersionInfraConfig struct { // ResourceRequests: Output only. System resource requests. ResourceRequests *ResourceRequests `json:"resourceRequests,omitempty"` + // SharedDeployment: Output only. The name of shared connector + // deployment. + SharedDeployment string `json:"sharedDeployment,omitempty"` + // ForceSendFields is a list of field names (e.g. "HpaConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1895,8 +1906,15 @@ type EventingConfig struct { // EnrichmentEnabled: Enrichment Enabled. EnrichmentEnabled bool `json:"enrichmentEnabled,omitempty"` + // PrivateConnectivityEnabled: Optional. Private Connectivity Enabled. + PrivateConnectivityEnabled bool `json:"privateConnectivityEnabled,omitempty"` + + // PublicEventsListenerEndpoint: Optional. Public Events listener + // endpoint. + PublicEventsListenerEndpoint string `json:"publicEventsListenerEndpoint,omitempty"` + // RegistrationDestinationConfig: Registration endpoint for auto - // regsitration. + // registration. RegistrationDestinationConfig *DestinationConfig `json:"registrationDestinationConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalVariables") @@ -2078,6 +2096,7 @@ type EventingStatus struct { // "STATE_UNSPECIFIED" - Default state. // "ACTIVE" - Eventing is enabled and ready to receive events. // "ERROR" - Eventing is not active due to an error. + // "PUBLIC_ENDPOINT_REQUIRED" - Public endpoint required. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Description") to @@ -2298,6 +2317,9 @@ type Field struct { // Field: Name of the Field. Field string `json:"field,omitempty"` + // JsonSchema: JsonSchema representation of this entity's schema + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Key: The following boolean field specifies if the current Field acts // as a primary key or id if the parent is of type entity. Key bool `json:"key,omitempty"` @@ -2509,6 +2531,9 @@ type InputParameter struct { // Description: A brief description of the Parameter. Description string `json:"description,omitempty"` + // JsonSchema: JsonSchema representation of this action's parameter + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Nullable: Specifies whether a null value is allowed. Nullable bool `json:"nullable,omitempty"` @@ -2538,6 +2563,117 @@ func (s *InputParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JsonSchema: JsonSchema representation of schema metadata +type JsonSchema struct { + // Default: The default value of the field or object described by this + // schema. + Default interface{} `json:"default,omitempty"` + + // Description: A description of this schema. + Description string `json:"description,omitempty"` + + // Enum: Possible values for an enumeration. This works in conjunction + // with `type` to represent types with a fixed set of legal values + Enum []interface{} `json:"enum,omitempty"` + + // Format: Format of the value as per + // https://json-schema.org/understanding-json-schema/reference/string.html#format + Format string `json:"format,omitempty"` + + // Items: Schema that applies to array values, applicable only if this + // is of type `array`. + Items *JsonSchema `json:"items,omitempty"` + + // JdbcType: JDBC datatype of the field. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Data type is not specified. + // "DATA_TYPE_INT" - DEPRECATED! Use DATA_TYPE_INTEGER. + // "DATA_TYPE_SMALLINT" - Short integer(int16) data type. + // "DATA_TYPE_DOUBLE" - Double data type. + // "DATA_TYPE_DATE" - Date data type. + // "DATA_TYPE_DATETIME" - DEPRECATED! Use DATA_TYPE_TIMESTAMP. + // "DATA_TYPE_TIME" - Time data type. + // "DATA_TYPE_STRING" - DEPRECATED! Use DATA_TYPE_VARCHAR. + // "DATA_TYPE_LONG" - DEPRECATED! Use DATA_TYPE_BIGINT. + // "DATA_TYPE_BOOLEAN" - Boolean data type. + // "DATA_TYPE_DECIMAL" - Decimal data type. + // "DATA_TYPE_UUID" - DEPRECATED! Use DATA_TYPE_VARCHAR. + // "DATA_TYPE_BLOB" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_BIT" - Bit data type. + // "DATA_TYPE_TINYINT" - Small integer(int8) data type. + // "DATA_TYPE_INTEGER" - Integer(int32) data type. + // "DATA_TYPE_BIGINT" - Long integer(int64) data type. + // "DATA_TYPE_FLOAT" - Float data type. + // "DATA_TYPE_REAL" - Real data type. + // "DATA_TYPE_NUMERIC" - Numeric data type. + // "DATA_TYPE_CHAR" - Char data type. + // "DATA_TYPE_VARCHAR" - Varchar data type. + // "DATA_TYPE_LONGVARCHAR" - Longvarchar data type. + // "DATA_TYPE_TIMESTAMP" - Timestamp data type. + // "DATA_TYPE_NCHAR" - Nchar data type. + // "DATA_TYPE_NVARCHAR" - Nvarchar data type. + // "DATA_TYPE_LONGNVARCHAR" - Longnvarchar data type. + // "DATA_TYPE_NULL" - Null data type. + // "DATA_TYPE_OTHER" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_JAVA_OBJECT" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_DISTINCT" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_STRUCT" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_ARRAY" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_CLOB" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_REF" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_DATALINK" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_ROWID" - UNSUPPORTED! Row id data type. + // "DATA_TYPE_BINARY" - UNSUPPORTED! Binary data type. + // "DATA_TYPE_VARBINARY" - UNSUPPORTED! Variable binary data type. + // "DATA_TYPE_LONGVARBINARY" - UNSUPPORTED! Long variable binary data + // type. + // "DATA_TYPE_NCLOB" - UNSUPPORTED! NCLOB data type. + // "DATA_TYPE_SQLXML" - UNSUPPORTED! SQL XML data type is not + // supported. + // "DATA_TYPE_REF_CURSOR" - UNSUPPORTED! Cursor reference type is not + // supported. + // "DATA_TYPE_TIME_WITH_TIMEZONE" - UNSUPPORTED! Use TIME or TIMESTAMP + // instead. + // "DATA_TYPE_TIMESTAMP_WITH_TIMEZONE" - UNSUPPORTED! Use TIMESTAMP + // instead. + JdbcType string `json:"jdbcType,omitempty"` + + // Properties: The child schemas, applicable only if this is of type + // `object`. The key is the name of the property and the value is the + // json schema that describes that property + Properties map[string]JsonSchema `json:"properties,omitempty"` + + // Required: Whether this property is required. + Required []string `json:"required,omitempty"` + + // Type: JSON Schema Validation: A Vocabulary for Structural Validation + // of JSON + Type []string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Default") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Default") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JsonSchema) MarshalJSON() ([]byte, error) { + type NoMethod JsonSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JwtClaims: JWT claims used for the jwt-bearer authorization grant. type JwtClaims struct { // Audience: Value for the "aud" claim. @@ -3836,6 +3972,9 @@ type ResultMetadata struct { // Field: Name of the result field. Field string `json:"field,omitempty"` + // JsonSchema: JsonSchema representation of this action's result + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3920,10 +4059,18 @@ type RuntimeActionSchema struct { // Action: Output only. Name of the action. Action string `json:"action,omitempty"` + // InputJsonSchema: Output only. JsonSchema representation of this + // action's input metadata + InputJsonSchema *JsonSchema `json:"inputJsonSchema,omitempty"` + // InputParameters: Output only. List of input parameter metadata for // the action. InputParameters []*InputParameter `json:"inputParameters,omitempty"` + // ResultJsonSchema: Output only. JsonSchema representation of this + // action's result metadata + ResultJsonSchema *JsonSchema `json:"resultJsonSchema,omitempty"` + // ResultMetadata: Output only. List of result field metadata. ResultMetadata []*ResultMetadata `json:"resultMetadata,omitempty"` @@ -4041,6 +4188,10 @@ type RuntimeEntitySchema struct { // Fields: Output only. List of fields in the entity. Fields []*Field `json:"fields,omitempty"` + // JsonSchema: Output only. JsonSchema representation of this entity's + // metadata + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entity") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/connectors/v2/connectors-api.json b/connectors/v2/connectors-api.json index 095bfd7b59b..8cd380e57b0 100644 --- a/connectors/v2/connectors-api.json +++ b/connectors/v2/connectors-api.json @@ -171,6 +171,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "get": { + "description": "Gets the schema of the given action.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/actions/{actionsId}", + "httpMethod": "GET", + "id": "connectors.projects.locations.connections.actions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the Action. Format: projects/{project}/locations/{location}/connections/{connection}/actions/{action}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/actions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Action" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Gets the schema of all the actions supported by the connector.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/actions", @@ -197,6 +222,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Specifies which fields of the Action are returned in the response.", + "enum": [ + "ACTION_VIEW_UNSPECIFIED", + "ACTION_VIEW_BASIC", + "ACTION_VIEW_FULL" + ], + "enumDescriptions": [ + "VIEW_UNSPECIFIED. The unset value Defaults to FULL View.", + "Return only action names.", + "Return actions with schema." + ], + "location": "query", + "type": "string" } }, "path": "v2/{+parent}/actions", @@ -211,6 +251,31 @@ }, "entityTypes": { "methods": { + "get": { + "description": "Gets metadata of given entity type", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/entityTypes/{entityTypesId}", + "httpMethod": "GET", + "id": "connectors.projects.locations.connections.entityTypes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{entityType}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/entityTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "EntityType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists metadata related to all entity types present in the external system.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/entityTypes", @@ -237,6 +302,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Specifies which fields of the Entity Type are returned in the response.", + "enum": [ + "ENTITY_TYPE_VIEW_UNSPECIFIED", + "ENTITY_TYPE_VIEW_BASIC", + "ENTITY_TYPE_VIEW_FULL" + ], + "enumDescriptions": [ + "VIEW_UNSPECIFIED. The unset value. Defaults to FULL View.", + "Return only entity type names.", + "Return entity types with schema" + ], + "location": "query", + "type": "string" } }, "path": "v2/{+parent}/entityTypes", @@ -478,13 +558,17 @@ } } }, - "revision": "20230812", + "revision": "20230906", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "Action": { "description": "Action message contains metadata information about a single action present in the external system.", "id": "Action", "properties": { + "inputJsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema representation of this actions's input schema" + }, "inputParameters": { "description": "List containing input parameter metadata.", "items": { @@ -496,6 +580,10 @@ "description": "Name of the action.", "type": "string" }, + "resultJsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema representation of this actions's result schema" + }, "resultMetadata": { "description": "List containing the metadata of result fields.", "items": { @@ -542,6 +630,10 @@ }, "type": "array" }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema representation of this entity's schema" + }, "name": { "description": "The name of the entity type.", "type": "string" @@ -776,6 +868,10 @@ "description": "A brief description of the Field.", "type": "string" }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema of the field, applicable only if field is of type `STRUCT`" + }, "key": { "description": "The following boolean field specifies if the current Field acts as a primary key or id if the parent is of type entity.", "type": "boolean" @@ -952,6 +1048,10 @@ "description": "A brief description of the Parameter.", "type": "string" }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema of the parameter, applicable only if parameter is of type `STRUCT`" + }, "name": { "description": "Name of the Parameter.", "type": "string" @@ -963,6 +1063,210 @@ }, "type": "object" }, + "JsonSchema": { + "description": "JsonSchema representation of schema metadata", + "id": "JsonSchema", + "properties": { + "additionalDetails": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Additional details apart from standard json schema fields, this gives flexibility to store metadata about the schema", + "type": "object" + }, + "default": { + "description": "The default value of the field or object described by this schema.", + "type": "any" + }, + "description": { + "description": "A description of this schema.", + "type": "string" + }, + "enum": { + "description": "Possible values for an enumeration. This works in conjunction with `type` to represent types with a fixed set of legal values", + "items": { + "type": "any" + }, + "type": "array" + }, + "format": { + "description": "Format of the value as per https://json-schema.org/understanding-json-schema/reference/string.html#format", + "type": "string" + }, + "items": { + "$ref": "JsonSchema", + "description": "Schema that applies to array values, applicable only if this is of type `array`." + }, + "jdbcType": { + "description": "JDBC datatype of the field.", + "enum": [ + "DATA_TYPE_UNSPECIFIED", + "INT", + "SMALLINT", + "DOUBLE", + "DATE", + "DATETIME", + "TIME", + "STRING", + "LONG", + "BOOLEAN", + "DECIMAL", + "UUID", + "BLOB", + "BIT", + "TINYINT", + "INTEGER", + "BIGINT", + "FLOAT", + "REAL", + "NUMERIC", + "CHAR", + "VARCHAR", + "LONGVARCHAR", + "TIMESTAMP", + "NCHAR", + "NVARCHAR", + "LONGNVARCHAR", + "NULL", + "OTHER", + "JAVA_OBJECT", + "DISTINCT", + "STRUCT", + "ARRAY", + "CLOB", + "REF", + "DATALINK", + "ROWID", + "BINARY", + "VARBINARY", + "LONGVARBINARY", + "NCLOB", + "SQLXML", + "REF_CURSOR", + "TIME_WITH_TIMEZONE", + "TIMESTAMP_WITH_TIMEZONE" + ], + "enumDeprecated": [ + false, + true, + false, + false, + false, + true, + false, + true, + true, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Datatype unspecified.", + "Deprecated Int type, use INTEGER type instead.", + "Small int type.", + "Double type.", + "Date type.", + "Deprecated Datetime type.", + "Time type.", + "Deprecated string type, use VARCHAR type instead.", + "Deprecated Long type, use BIGINT type instead.", + "Boolean type.", + "Decimal type.", + "Deprecated UUID type, use VARCHAR instead.", + "Blob type.", + "Bit type.", + "Tiny int type.", + "Integer type.", + "Big int type.", + "Float type.", + "Real type.", + "Numeric type.", + "Char type.", + "Varchar type.", + "Long varchar type.", + "Timestamp type.", + "Nchar type.", + "Nvarchar type.", + "Long Nvarchar type.", + "Null type.", + "Other type.", + "Java object type.", + "Distinct type keyword.", + "Struct type.", + "Array type.", + "Clob type.", + "Ref type.", + "Datalink type.", + "Row ID type.", + "Binary type.", + "Varbinary type.", + "Long Varbinary type.", + "Nclob type.", + "SQLXML type.", + "Ref_cursor type.", + "Time with timezone type.", + "Timestamp with timezone type." + ], + "type": "string" + }, + "properties": { + "additionalProperties": { + "$ref": "JsonSchema" + }, + "description": "The child schemas, applicable only if this is of type `object`. The key is the name of the property and the value is the json schema that describes that property", + "type": "object" + }, + "required": { + "description": "Whether this property is required.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "JSON Schema Validation: A Vocabulary for Structural Validation of JSON", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListActionsResponse": { "description": "Response message for ActionService.ListActions", "id": "ListActionsResponse", @@ -1380,6 +1684,10 @@ "description": "A brief description of the metadata field.", "type": "string" }, + "jsonSchema": { + "$ref": "JsonSchema", + "description": "JsonSchema of the result, applicable only if parameter is of type `STRUCT`" + }, "name": { "description": "Name of the metadata field.", "type": "string" diff --git a/connectors/v2/connectors-gen.go b/connectors/v2/connectors-gen.go index f00a0c5230b..6e0750ad0e1 100644 --- a/connectors/v2/connectors-gen.go +++ b/connectors/v2/connectors-gen.go @@ -223,16 +223,28 @@ type ProjectsLocationsConnectionsEntityTypesEntitiesService struct { // Action: Action message contains metadata information about a single // action present in the external system. type Action struct { + // InputJsonSchema: JsonSchema representation of this actions's input + // schema + InputJsonSchema *JsonSchema `json:"inputJsonSchema,omitempty"` + // InputParameters: List containing input parameter metadata. InputParameters []*InputParameter `json:"inputParameters,omitempty"` // Name: Name of the action. Name string `json:"name,omitempty"` + // ResultJsonSchema: JsonSchema representation of this actions's result + // schema + ResultJsonSchema *JsonSchema `json:"resultJsonSchema,omitempty"` + // ResultMetadata: List containing the metadata of result fields. ResultMetadata []*ResultMetadata `json:"resultMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputParameters") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "InputJsonSchema") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -240,7 +252,7 @@ type Action struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputParameters") to + // NullFields is a list of field names (e.g. "InputJsonSchema") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -314,9 +326,16 @@ type EntityType struct { // entity type. Fields []*Field `json:"fields,omitempty"` + // JsonSchema: JsonSchema representation of this entity's schema + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Name: The name of the entity type. Name string `json:"name,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Fields") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -540,6 +559,10 @@ type Field struct { // Description: A brief description of the Field. Description string `json:"description,omitempty"` + // JsonSchema: JsonSchema of the field, applicable only if field is of + // type `STRUCT` + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Key: The following boolean field specifies if the current Field acts // as a primary key or id if the parent is of type entity. Key bool `json:"key,omitempty"` @@ -638,6 +661,10 @@ type InputParameter struct { // Description: A brief description of the Parameter. Description string `json:"description,omitempty"` + // JsonSchema: JsonSchema of the parameter, applicable only if parameter + // is of type `STRUCT` + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Name: Name of the Parameter. Name string `json:"name,omitempty"` @@ -667,6 +694,117 @@ func (s *InputParameter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JsonSchema: JsonSchema representation of schema metadata +type JsonSchema struct { + // AdditionalDetails: Additional details apart from standard json schema + // fields, this gives flexibility to store metadata about the schema + AdditionalDetails googleapi.RawMessage `json:"additionalDetails,omitempty"` + + // Default: The default value of the field or object described by this + // schema. + Default interface{} `json:"default,omitempty"` + + // Description: A description of this schema. + Description string `json:"description,omitempty"` + + // Enum: Possible values for an enumeration. This works in conjunction + // with `type` to represent types with a fixed set of legal values + Enum []interface{} `json:"enum,omitempty"` + + // Format: Format of the value as per + // https://json-schema.org/understanding-json-schema/reference/string.html#format + Format string `json:"format,omitempty"` + + // Items: Schema that applies to array values, applicable only if this + // is of type `array`. + Items *JsonSchema `json:"items,omitempty"` + + // JdbcType: JDBC datatype of the field. + // + // Possible values: + // "DATA_TYPE_UNSPECIFIED" - Datatype unspecified. + // "INT" - Deprecated Int type, use INTEGER type instead. + // "SMALLINT" - Small int type. + // "DOUBLE" - Double type. + // "DATE" - Date type. + // "DATETIME" - Deprecated Datetime type. + // "TIME" - Time type. + // "STRING" - Deprecated string type, use VARCHAR type instead. + // "LONG" - Deprecated Long type, use BIGINT type instead. + // "BOOLEAN" - Boolean type. + // "DECIMAL" - Decimal type. + // "UUID" - Deprecated UUID type, use VARCHAR instead. + // "BLOB" - Blob type. + // "BIT" - Bit type. + // "TINYINT" - Tiny int type. + // "INTEGER" - Integer type. + // "BIGINT" - Big int type. + // "FLOAT" - Float type. + // "REAL" - Real type. + // "NUMERIC" - Numeric type. + // "CHAR" - Char type. + // "VARCHAR" - Varchar type. + // "LONGVARCHAR" - Long varchar type. + // "TIMESTAMP" - Timestamp type. + // "NCHAR" - Nchar type. + // "NVARCHAR" - Nvarchar type. + // "LONGNVARCHAR" - Long Nvarchar type. + // "NULL" - Null type. + // "OTHER" - Other type. + // "JAVA_OBJECT" - Java object type. + // "DISTINCT" - Distinct type keyword. + // "STRUCT" - Struct type. + // "ARRAY" - Array type. + // "CLOB" - Clob type. + // "REF" - Ref type. + // "DATALINK" - Datalink type. + // "ROWID" - Row ID type. + // "BINARY" - Binary type. + // "VARBINARY" - Varbinary type. + // "LONGVARBINARY" - Long Varbinary type. + // "NCLOB" - Nclob type. + // "SQLXML" - SQLXML type. + // "REF_CURSOR" - Ref_cursor type. + // "TIME_WITH_TIMEZONE" - Time with timezone type. + // "TIMESTAMP_WITH_TIMEZONE" - Timestamp with timezone type. + JdbcType string `json:"jdbcType,omitempty"` + + // Properties: The child schemas, applicable only if this is of type + // `object`. The key is the name of the property and the value is the + // json schema that describes that property + Properties map[string]JsonSchema `json:"properties,omitempty"` + + // Required: Whether this property is required. + Required []string `json:"required,omitempty"` + + // Type: JSON Schema Validation: A Vocabulary for Structural Validation + // of JSON + Type []string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalDetails") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *JsonSchema) MarshalJSON() ([]byte, error) { + type NoMethod JsonSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListActionsResponse: Response message for ActionService.ListActions type ListActionsResponse struct { // Actions: List of action metadata. @@ -985,6 +1123,10 @@ type ResultMetadata struct { // Description: A brief description of the metadata field. Description string `json:"description,omitempty"` + // JsonSchema: JsonSchema of the result, applicable only if parameter is + // of type `STRUCT` + JsonSchema *JsonSchema `json:"jsonSchema,omitempty"` + // Name: Name of the metadata field. Name string `json:"name,omitempty"` @@ -1336,6 +1478,154 @@ func (c *ProjectsLocationsConnectionsActionsExecuteCall) Do(opts ...googleapi.Ca } +// method id "connectors.projects.locations.connections.actions.get": + +type ProjectsLocationsConnectionsActionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the schema of the given action. +// +// - name: Resource name of the Action. Format: +// projects/{project}/locations/{location}/connections/{connection}/act +// ions/{action}. +func (r *ProjectsLocationsConnectionsActionsService) Get(name string) *ProjectsLocationsConnectionsActionsGetCall { + c := &ProjectsLocationsConnectionsActionsGetCall{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 *ProjectsLocationsConnectionsActionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsActionsGetCall { + 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 *ProjectsLocationsConnectionsActionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsActionsGetCall { + 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 *ProjectsLocationsConnectionsActionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsActionsGetCall { + 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 *ProjectsLocationsConnectionsActionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsActionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "connectors.projects.locations.connections.actions.get" call. +// Exactly one of *Action or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Action.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 *ProjectsLocationsConnectionsActionsGetCall) Do(opts ...googleapi.CallOption) (*Action, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Action{ + 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 schema of the given action.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/actions/{actionsId}", + // "httpMethod": "GET", + // "id": "connectors.projects.locations.connections.actions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Action. Format: projects/{project}/locations/{location}/connections/{connection}/actions/{action}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/actions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Action" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "connectors.projects.locations.connections.actions.list": type ProjectsLocationsConnectionsActionsListCall struct { @@ -1373,6 +1663,22 @@ func (c *ProjectsLocationsConnectionsActionsListCall) PageToken(pageToken string return c } +// View sets the optional parameter "view": Specifies which fields of +// the Action are returned in the response. +// +// Possible values: +// +// "ACTION_VIEW_UNSPECIFIED" - VIEW_UNSPECIFIED. The unset value +// +// Defaults to FULL View. +// +// "ACTION_VIEW_BASIC" - Return only action names. +// "ACTION_VIEW_FULL" - Return actions with schema. +func (c *ProjectsLocationsConnectionsActionsListCall) View(view string) *ProjectsLocationsConnectionsActionsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1497,6 +1803,21 @@ func (c *ProjectsLocationsConnectionsActionsListCall) Do(opts ...googleapi.CallO // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "Specifies which fields of the Action are returned in the response.", + // "enum": [ + // "ACTION_VIEW_UNSPECIFIED", + // "ACTION_VIEW_BASIC", + // "ACTION_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "VIEW_UNSPECIFIED. The unset value Defaults to FULL View.", + // "Return only action names.", + // "Return actions with schema." + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+parent}/actions", @@ -1531,6 +1852,154 @@ func (c *ProjectsLocationsConnectionsActionsListCall) Pages(ctx context.Context, } } +// method id "connectors.projects.locations.connections.entityTypes.get": + +type ProjectsLocationsConnectionsEntityTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets metadata of given entity type +// +// - name: Resource name of the Entity Type. Format: +// projects/{project}/locations/{location}/connections/{connection}/ent +// ityTypes/{entityType}. +func (r *ProjectsLocationsConnectionsEntityTypesService) Get(name string) *ProjectsLocationsConnectionsEntityTypesGetCall { + c := &ProjectsLocationsConnectionsEntityTypesGetCall{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 *ProjectsLocationsConnectionsEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsEntityTypesGetCall { + 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 *ProjectsLocationsConnectionsEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsEntityTypesGetCall { + 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 *ProjectsLocationsConnectionsEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsEntityTypesGetCall { + 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 *ProjectsLocationsConnectionsEntityTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectionsEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "connectors.projects.locations.connections.entityTypes.get" call. +// Exactly one of *EntityType or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *EntityType.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 *ProjectsLocationsConnectionsEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*EntityType, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &EntityType{ + 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 metadata of given entity type", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/entityTypes/{entityTypesId}", + // "httpMethod": "GET", + // "id": "connectors.projects.locations.connections.entityTypes.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the Entity Type. Format: projects/{project}/locations/{location}/connections/{connection}/entityTypes/{entityType}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/entityTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "EntityType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "connectors.projects.locations.connections.entityTypes.list": type ProjectsLocationsConnectionsEntityTypesListCall struct { @@ -1569,6 +2038,22 @@ func (c *ProjectsLocationsConnectionsEntityTypesListCall) PageToken(pageToken st return c } +// View sets the optional parameter "view": Specifies which fields of +// the Entity Type are returned in the response. +// +// Possible values: +// +// "ENTITY_TYPE_VIEW_UNSPECIFIED" - VIEW_UNSPECIFIED. The unset value. +// +// Defaults to FULL View. +// +// "ENTITY_TYPE_VIEW_BASIC" - Return only entity type names. +// "ENTITY_TYPE_VIEW_FULL" - Return entity types with schema +func (c *ProjectsLocationsConnectionsEntityTypesListCall) View(view string) *ProjectsLocationsConnectionsEntityTypesListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -1693,6 +2178,21 @@ func (c *ProjectsLocationsConnectionsEntityTypesListCall) Do(opts ...googleapi.C // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "Specifies which fields of the Entity Type are returned in the response.", + // "enum": [ + // "ENTITY_TYPE_VIEW_UNSPECIFIED", + // "ENTITY_TYPE_VIEW_BASIC", + // "ENTITY_TYPE_VIEW_FULL" + // ], + // "enumDescriptions": [ + // "VIEW_UNSPECIFIED. The unset value. Defaults to FULL View.", + // "Return only entity type names.", + // "Return entity types with schema" + // ], + // "location": "query", + // "type": "string" // } // }, // "path": "v2/{+parent}/entityTypes", diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 63e96bd7ffb..761f6114f50 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -11,7 +11,7 @@ "basePath": "", "baseUrl": "https://dataform.googleapis.com/", "batchPath": "batch", - "description": "", + "description": "Service to develop, version control, and operationalize SQL pipelines in BigQuery.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/dataform/docs", "fullyEncodeReservedExpansion": true, @@ -1961,7 +1961,7 @@ } } }, - "revision": "20230812", + "revision": "20230909", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 2809422706e..e74da3ae744 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2686,7 +2686,7 @@ } } }, - "revision": "20230831", + "revision": "20230906", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptHubSpokeRequest": { @@ -2704,6 +2704,17 @@ }, "type": "object" }, + "AcceptHubSpokeResponse": { + "description": "The response for HubService.AcceptHubSpoke.", + "id": "AcceptHubSpokeResponse", + "properties": { + "spoke": { + "$ref": "Spoke", + "description": "The spoke that was operated on." + } + }, + "type": "object" + }, "AcceptSpokeRequest": { "description": "The request for HubService.AcceptSpoke.", "id": "AcceptSpokeRequest", @@ -4095,6 +4106,17 @@ }, "type": "object" }, + "RejectHubSpokeResponse": { + "description": "The response for HubService.RejectHubSpoke.", + "id": "RejectHubSpokeResponse", + "properties": { + "spoke": { + "$ref": "Spoke", + "description": "The spoke that was operated on." + } + }, + "type": "object" + }, "RejectSpokeRequest": { "description": "The request for HubService.RejectSpoke.", "id": "RejectSpokeRequest", diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 2ef37e8b873..f6573432287 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -370,6 +370,34 @@ func (s *AcceptHubSpokeRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AcceptHubSpokeResponse: The response for HubService.AcceptHubSpoke. +type AcceptHubSpokeResponse struct { + // Spoke: The spoke that was operated on. + Spoke *Spoke `json:"spoke,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Spoke") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Spoke") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcceptHubSpokeResponse) MarshalJSON() ([]byte, error) { + type NoMethod AcceptHubSpokeResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AcceptSpokeRequest: The request for HubService.AcceptSpoke. type AcceptSpokeRequest struct { // RequestId: Optional. A request ID to identify requests. Specify a @@ -2643,6 +2671,34 @@ func (s *RejectHubSpokeRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RejectHubSpokeResponse: The response for HubService.RejectHubSpoke. +type RejectHubSpokeResponse struct { + // Spoke: The spoke that was operated on. + Spoke *Spoke `json:"spoke,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Spoke") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Spoke") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RejectHubSpokeResponse) MarshalJSON() ([]byte, error) { + type NoMethod RejectHubSpokeResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RejectSpokeRequest: The request for HubService.RejectSpoke. type RejectSpokeRequest struct { // Details: Optional. Additional information provided by the hub diff --git a/transcoder/v1/transcoder-api.json b/transcoder/v1/transcoder-api.json index db0894124bb..9942f96183c 100644 --- a/transcoder/v1/transcoder-api.json +++ b/transcoder/v1/transcoder-api.json @@ -385,7 +385,7 @@ } } }, - "revision": "20230712", + "revision": "20230906", "rootUrl": "https://transcoder.googleapis.com/", "schemas": { "AdBreak": { @@ -850,6 +850,17 @@ "properties": {}, "type": "object" }, + "Fmp4Config": { + "description": "`fmp4` container configuration.", + "id": "Fmp4Config", + "properties": { + "codecTag": { + "description": "Optional. Specify the codec tag string that will be used in the media bitstream. When not specified, the codec appropriate value is used. Supported H265 codec tags: - `hvc1` (default) - `hev1`", + "type": "string" + } + }, + "type": "object" + }, "H264CodecSettings": { "description": "H264 codec settings.", "id": "H264CodecSettings", @@ -1415,6 +1426,10 @@ "description": "The name of the generated file. The default is MuxStream.key with the extension suffix corresponding to the MuxStream.container. Individual segments also have an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `mux_stream0000000123.ts`.", "type": "string" }, + "fmp4": { + "$ref": "Fmp4Config", + "description": "Optional. `fmp4` container configuration." + }, "key": { "description": "A unique key for this multiplexed stream.", "type": "string" diff --git a/transcoder/v1/transcoder-gen.go b/transcoder/v1/transcoder-gen.go index 6f16269edc5..70ea3ce5ed3 100644 --- a/transcoder/v1/transcoder-gen.go +++ b/transcoder/v1/transcoder-gen.go @@ -1061,6 +1061,36 @@ func (s *Encryption) MarshalJSON() ([]byte, error) { type Fairplay struct { } +// Fmp4Config: `fmp4` container configuration. +type Fmp4Config struct { + // CodecTag: Optional. Specify the codec tag string that will be used in + // the media bitstream. When not specified, the codec appropriate value + // is used. Supported H265 codec tags: - `hvc1` (default) - `hev1` + CodecTag string `json:"codecTag,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CodecTag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CodecTag") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Fmp4Config) MarshalJSON() ([]byte, error) { + type NoMethod Fmp4Config + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // H264CodecSettings: H264 codec settings. type H264CodecSettings struct { // AllowOpenGop: Specifies whether an open Group of Pictures (GOP) @@ -1887,6 +1917,9 @@ type MuxStream struct { // such as `mux_stream0000000123.ts`. FileName string `json:"fileName,omitempty"` + // Fmp4: Optional. `fmp4` container configuration. + Fmp4 *Fmp4Config `json:"fmp4,omitempty"` + // Key: A unique key for this multiplexed stream. Key string `json:"key,omitempty"` diff --git a/workflows/v1/workflows-api.json b/workflows/v1/workflows-api.json index b11f91d1f4d..5f28e77e676 100644 --- a/workflows/v1/workflows-api.json +++ b/workflows/v1/workflows-api.json @@ -408,6 +408,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listRevisions": { + "description": "Lists revisions for a given workflow.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:listRevisions", + "httpMethod": "GET", + "id": "workflows.projects.locations.workflows.listRevisions", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Workflow from which the revisions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of revisions to return per page. If a value is not specified, a default value of 20 is used. The maximum permitted value is 100 and values greater than 100 coerced down to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token, received from a previous ListWorkflowRevisions call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:listRevisions", + "response": { + "$ref": "ListWorkflowRevisionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "patch": { "description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow might be created as a result of a successful update operation. In that case, the new revision is used in new workflow executions.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", @@ -449,7 +485,7 @@ } } }, - "revision": "20230802", + "revision": "20230906", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -494,6 +530,24 @@ }, "type": "object" }, + "ListWorkflowRevisionsResponse": { + "description": "Response for the ListWorkflowRevisions method.", + "id": "ListWorkflowRevisionsResponse", + "properties": { + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "workflows": { + "description": "The revisions of the workflow, ordered in reverse chronological order.", + "items": { + "$ref": "Workflow" + }, + "type": "array" + } + }, + "type": "object" + }, "ListWorkflowsResponse": { "description": "Response for the ListWorkflows method.", "id": "ListWorkflowsResponse", diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 7ad0927c68f..9fcfe6143e5 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -281,6 +281,45 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListWorkflowRevisionsResponse: Response for the ListWorkflowRevisions +// method. +type ListWorkflowRevisionsResponse struct { + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Workflows: The revisions of the workflow, ordered in reverse + // chronological order. + Workflows []*Workflow `json:"workflows,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 *ListWorkflowRevisionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListWorkflowRevisionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListWorkflowsResponse: Response for the ListWorkflows method. type ListWorkflowsResponse struct { // NextPageToken: A token, which can be sent as `page_token` to retrieve @@ -2207,6 +2246,202 @@ func (c *ProjectsLocationsWorkflowsListCall) Pages(ctx context.Context, f func(* } } +// method id "workflows.projects.locations.workflows.listRevisions": + +type ProjectsLocationsWorkflowsListRevisionsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListRevisions: Lists revisions for a given workflow. +// +// - name: Workflow from which the revisions should be listed. Format: +// projects/{project}/locations/{location}/workflows/{workflow}. +func (r *ProjectsLocationsWorkflowsService) ListRevisions(name string) *ProjectsLocationsWorkflowsListRevisionsCall { + c := &ProjectsLocationsWorkflowsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of revisions to return per page. If a value is not specified, a +// default value of 20 is used. The maximum permitted value is 100 and +// values greater than 100 coerced down to 100. +func (c *ProjectsLocationsWorkflowsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowsListRevisionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token, +// received from a previous ListWorkflowRevisions call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsWorkflowsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsWorkflowsListRevisionsCall { + 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 *ProjectsLocationsWorkflowsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsListRevisionsCall { + 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 *ProjectsLocationsWorkflowsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowsListRevisionsCall { + 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 *ProjectsLocationsWorkflowsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsListRevisionsCall { + 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 *ProjectsLocationsWorkflowsListRevisionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkflowsListRevisionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions") + 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 "workflows.projects.locations.workflows.listRevisions" call. +// Exactly one of *ListWorkflowRevisionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListWorkflowRevisionsResponse.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 *ProjectsLocationsWorkflowsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListWorkflowRevisionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListWorkflowRevisionsResponse{ + 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 revisions for a given workflow.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:listRevisions", + // "httpMethod": "GET", + // "id": "workflows.projects.locations.workflows.listRevisions", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Workflow from which the revisions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of revisions to return per page. If a value is not specified, a default value of 20 is used. The maximum permitted value is 100 and values greater than 100 coerced down to 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The page token, received from a previous ListWorkflowRevisions call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}:listRevisions", + // "response": { + // "$ref": "ListWorkflowRevisionsResponse" + // }, + // "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 *ProjectsLocationsWorkflowsListRevisionsCall) Pages(ctx context.Context, f func(*ListWorkflowRevisionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "workflows.projects.locations.workflows.patch": type ProjectsLocationsWorkflowsPatchCall struct {