From bdccbbd980bb7db416385ce54e04e64f7b5787ad Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 02:29:41 +0000 Subject: [PATCH] feat: Automated regeneration of CloudTasks client --- .../google_api/cloud_tasks/v2/api/projects.ex | 222 +++++++++++++++++- .../lib/google_api/cloud_tasks/v2/metadata.ex | 2 +- .../cloud_tasks/v2/model/binding.ex | 4 +- .../v2/model/buffer_task_request.ex | 46 ++++ .../v2/model/buffer_task_response.ex | 46 ++++ .../cloud_tasks/v2/model/cmek_config.ex | 49 ++++ .../v2/model/create_task_request.ex | 2 +- .../google_api/cloud_tasks/v2/model/header.ex | 49 ++++ .../cloud_tasks/v2/model/header_override.ex | 46 ++++ .../cloud_tasks/v2/model/http_body.ex | 52 ++++ .../cloud_tasks/v2/model/http_target.ex | 58 +++++ .../cloud_tasks/v2/model/location.ex | 2 +- .../cloud_tasks/v2/model/path_override.ex | 46 ++++ .../google_api/cloud_tasks/v2/model/policy.ex | 2 +- .../cloud_tasks/v2/model/query_override.ex | 46 ++++ .../google_api/cloud_tasks/v2/model/queue.ex | 3 + .../cloud_tasks/v2/model/retry_config.ex | 6 +- .../google_api/cloud_tasks/v2/model/task.ex | 2 +- .../cloud_tasks/v2/model/uri_override.ex | 61 +++++ .../cloud_tasks/v2beta2/api/projects.ex | 148 +++++++++++- .../cloud_tasks/v2beta2/metadata.ex | 2 +- .../cloud_tasks/v2beta2/model/binding.ex | 4 +- .../cloud_tasks/v2beta2/model/cmek_config.ex | 49 ++++ .../v2beta2/model/create_task_request.ex | 2 +- .../v2beta2/model/header_override.ex | 2 +- .../cloud_tasks/v2beta2/model/http_request.ex | 2 +- .../cloud_tasks/v2beta2/model/http_target.ex | 6 +- .../cloud_tasks/v2beta2/model/location.ex | 2 +- .../v2beta2/model/path_override.ex | 46 ++++ .../cloud_tasks/v2beta2/model/policy.ex | 2 +- .../v2beta2/model/query_override.ex | 46 ++++ .../cloud_tasks/v2beta2/model/uri_override.ex | 20 +- 32 files changed, 1041 insertions(+), 34 deletions(-) create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_request.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_response.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/cmek_config.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header_override.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_body.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_target.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/path_override.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/query_override.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/uri_override.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/cmek_config.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/path_override.ex create mode 100644 clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/query_override.ex diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/api/projects.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/api/projects.ex index 849e5c7471..4dae5de79c 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/api/projects.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/api/projects.ex @@ -85,6 +85,76 @@ defmodule GoogleApi.CloudTasks.V2.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2.Model.Location{}]) end + @doc """ + Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured. + + ## Parameters + + * `connection` (*type:* `GoogleApi.CloudTasks.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The config. For example: projects/PROJECT_ID/locations/LOCATION_ID/CmekConfig` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.CloudTasks.V2.Model.CmekConfig{}}` on success + * `{:error, info}` on failure + """ + @spec cloudtasks_projects_locations_get_cmek_config( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.CloudTasks.V2.Model.CmekConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def cloudtasks_projects_locations_get_cmek_config( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2.Model.CmekConfig{}]) + end + @doc """ Lists information about the supported locations for this service. @@ -151,6 +221,80 @@ defmodule GoogleApi.CloudTasks.V2.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2.Model.ListLocationsResponse{}]) end + @doc """ + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.CloudTasks.V2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - 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` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - List of fields to be updated in this request. + * `:body` (*type:* `GoogleApi.CloudTasks.V2.Model.CmekConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.CloudTasks.V2.Model.CmekConfig{}}` on success + * `{:error, info}` on failure + """ + @spec cloudtasks_projects_locations_update_cmek_config( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.CloudTasks.V2.Model.CmekConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def cloudtasks_projects_locations_update_cmek_config( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2.Model.CmekConfig{}]) + end + @doc """ Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. 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. @@ -224,7 +368,7 @@ defmodule GoogleApi.CloudTasks.V2.Api.Projects do end @doc """ - 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. + 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. ## Parameters @@ -947,6 +1091,82 @@ defmodule GoogleApi.CloudTasks.V2.Api.Projects do ) end + @doc """ + Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.CloudTasks.V2.Connection.t`) - Connection to server + * `queue` (*type:* `String.t`) - Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. + * `task_id` (*type:* `String.t`) - Optional. Task ID for the task being created. If not provided, Cloud Tasks generates an ID for the task. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.CloudTasks.V2.Model.BufferTaskRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.CloudTasks.V2.Model.BufferTaskResponse{}}` on success + * `{:error, info}` on failure + """ + @spec cloudtasks_projects_locations_queues_tasks_buffer( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.CloudTasks.V2.Model.BufferTaskResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def cloudtasks_projects_locations_queues_tasks_buffer( + connection, + queue, + task_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v2/{+queue}/tasks/{taskId}:buffer", %{ + "queue" => URI.encode(queue, &URI.char_unreserved?/1), + "taskId" => URI.encode(task_id, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2.Model.BufferTaskResponse{}]) + end + @doc """ Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB. diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/metadata.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/metadata.ex index 47f12ba5de..b616439082 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/metadata.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.CloudTasks.V2 do API client metadata for GoogleApi.CloudTasks.V2. """ - @discovery_revision "20221025" + @discovery_revision "20240301" def discovery_revision(), do: @discovery_revision end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex index 889b5d3209..a6e397bd2e 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.CloudTasks.V2.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.CloudTasks.V2.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_request.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_request.ex new file mode 100644 index 0000000000..3bced039b4 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_request.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.BufferTaskRequest do + @moduledoc """ + Request message for BufferTask. + + ## Attributes + + * `body` (*type:* `GoogleApi.CloudTasks.V2.Model.HttpBody.t`, *default:* `nil`) - Optional. Body of the HTTP request. The body can take any generic value. The value is written to the HttpRequest of the [Task]. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :body => GoogleApi.CloudTasks.V2.Model.HttpBody.t() | nil + } + + field(:body, as: GoogleApi.CloudTasks.V2.Model.HttpBody) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.BufferTaskRequest do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.BufferTaskRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.BufferTaskRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_response.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_response.ex new file mode 100644 index 0000000000..f246ab206a --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/buffer_task_response.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.BufferTaskResponse do + @moduledoc """ + Response message for BufferTask. + + ## Attributes + + * `task` (*type:* `GoogleApi.CloudTasks.V2.Model.Task.t`, *default:* `nil`) - The created task. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :task => GoogleApi.CloudTasks.V2.Model.Task.t() | nil + } + + field(:task, as: GoogleApi.CloudTasks.V2.Model.Task) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.BufferTaskResponse do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.BufferTaskResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.BufferTaskResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/cmek_config.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/cmek_config.ex new file mode 100644 index 0000000000..adbe01160d --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/cmek_config.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.CmekConfig do + @moduledoc """ + Describes the customer-managed encryption key (CMEK) configuration associated with a project and location. + + ## Attributes + + * `kmsKey` (*type:* `String.t`, *default:* `nil`) - 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 & Tasks in the region. Setting this as blank will turn off CMEK encryption. + * `name` (*type:* `String.t`, *default:* `nil`) - 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` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :kmsKey => String.t() | nil, + :name => String.t() | nil + } + + field(:kmsKey) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.CmekConfig do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.CmekConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.CmekConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/create_task_request.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/create_task_request.ex index 3cff438d0e..c8b28a176a 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/create_task_request.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/create_task_request.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.CreateTaskRequest do ## Attributes * `responseView` (*type:* `String.t`, *default:* `nil`) - The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource. - * `task` (*type:* `GoogleApi.CloudTasks.V2.Model.Task.t`, *default:* `nil`) - Required. The task to add. Task names have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can optionally specify a task name. If a name is not specified then the system will generate a random unique task id, which will be set in the task returned in the response. If schedule_time is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with ALREADY_EXISTS. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these CreateTask calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. + * `task` (*type:* `GoogleApi.CloudTasks.V2.Model.Task.t`, *default:* `nil`) - Required. The task to add. Task names have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can optionally specify a task name. If a name is not specified then the system will generate a random unique task id, which will be set in the task returned in the response. If schedule_time is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with ALREADY_EXISTS. The IDs of deleted tasks are not immediately available for reuse. It can take up to 4 hours (or 9 days if the task's queue was created using a queue.yaml or queue.xml) for the task ID to be released and made available again. Because there is an extra lookup cost to identify duplicate task names, these CreateTask calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header.ex new file mode 100644 index 0000000000..31f6f480e7 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.Header do + @moduledoc """ + Defines a header message. A header can have a key and a value. + + ## Attributes + + * `key` (*type:* `String.t`, *default:* `nil`) - The Key of the header. + * `value` (*type:* `String.t`, *default:* `nil`) - The Value of the header. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :key => String.t() | nil, + :value => String.t() | nil + } + + field(:key) + field(:value) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.Header do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.Header.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.Header do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header_override.ex new file mode 100644 index 0000000000..109e25e986 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/header_override.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.HeaderOverride do + @moduledoc """ + Wraps the Header object. + + ## Attributes + + * `header` (*type:* `GoogleApi.CloudTasks.V2.Model.Header.t`, *default:* `nil`) - Header embodying a key and a value. Do not put business sensitive or personally identifying data in the HTTP Header Override Configuration or other similar fields in accordance with Section 12 (Resource Fields) of the [Service Specific Terms](https://cloud.google.com/terms/service-terms). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :header => GoogleApi.CloudTasks.V2.Model.Header.t() | nil + } + + field(:header, as: GoogleApi.CloudTasks.V2.Model.Header) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.HeaderOverride do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.HeaderOverride.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.HeaderOverride do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_body.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_body.ex new file mode 100644 index 0000000000..9553010281 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_body.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.HttpBody do + @moduledoc """ + Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + + ## Attributes + + * `contentType` (*type:* `String.t`, *default:* `nil`) - The HTTP Content-Type header value specifying the content type of the body. + * `data` (*type:* `String.t`, *default:* `nil`) - The HTTP request/response body as raw binary. + * `extensions` (*type:* `list(map())`, *default:* `nil`) - Application specific response metadata. Must be set in the first response for streaming APIs. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :contentType => String.t() | nil, + :data => String.t() | nil, + :extensions => list(map()) | nil + } + + field(:contentType) + field(:data) + field(:extensions, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.HttpBody do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.HttpBody.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.HttpBody do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_target.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_target.ex new file mode 100644 index 0000000000..31c50e3caa --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/http_target.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.HttpTarget do + @moduledoc """ + HTTP target. When specified as a Queue, all the tasks with [HttpRequest] will be overridden according to the target. + + ## Attributes + + * `headerOverrides` (*type:* `list(GoogleApi.CloudTasks.V2.Model.HeaderOverride.t)`, *default:* `nil`) - HTTP target headers. This map contains the header field names and values. Headers will be set when running the CreateTask and/or BufferTask. These headers represent a subset of the headers that will be configured for the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Several predefined headers, prefixed with "X-CloudTasks-", can be used to define properties of the task. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example,`Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. The default value is set to "application/json"`. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue. Do not put business sensitive or personally identifying data in the HTTP Header Override Configuration or other similar fields in accordance with Section 12 (Resource Fields) of the [Service Specific Terms](https://cloud.google.com/terms/service-terms). + * `httpMethod` (*type:* `String.t`, *default:* `nil`) - The HTTP method to use for the request. When specified, it overrides HttpRequest for the task. Note that if the value is set to HttpMethod the HttpRequest of the task will be ignored at execution time. + * `oauthToken` (*type:* `GoogleApi.CloudTasks.V2.Model.OAuthToken.t`, *default:* `nil`) - If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as the `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com. + * `oidcToken` (*type:* `GoogleApi.CloudTasks.V2.Model.OidcToken.t`, *default:* `nil`) - If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. + * `uriOverride` (*type:* `GoogleApi.CloudTasks.V2.Model.UriOverride.t`, *default:* `nil`) - URI override. When specified, overrides the execution URI for all the tasks in the queue. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :headerOverrides => list(GoogleApi.CloudTasks.V2.Model.HeaderOverride.t()) | nil, + :httpMethod => String.t() | nil, + :oauthToken => GoogleApi.CloudTasks.V2.Model.OAuthToken.t() | nil, + :oidcToken => GoogleApi.CloudTasks.V2.Model.OidcToken.t() | nil, + :uriOverride => GoogleApi.CloudTasks.V2.Model.UriOverride.t() | nil + } + + field(:headerOverrides, as: GoogleApi.CloudTasks.V2.Model.HeaderOverride, type: :list) + field(:httpMethod) + field(:oauthToken, as: GoogleApi.CloudTasks.V2.Model.OAuthToken) + field(:oidcToken, as: GoogleApi.CloudTasks.V2.Model.OidcToken) + field(:uriOverride, as: GoogleApi.CloudTasks.V2.Model.UriOverride) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.HttpTarget do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.HttpTarget.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.HttpTarget do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/location.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/location.ex index 17ea5ac337..0077879e08 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/location.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.Location do @moduledoc """ - A resource that represents Google Cloud Platform location. + A resource that represents a Google Cloud location. ## Attributes diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/path_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/path_override.ex new file mode 100644 index 0000000000..1594e30c7a --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/path_override.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.PathOverride do + @moduledoc """ + PathOverride. Path message defines path override for HTTP targets. + + ## Attributes + + * `path` (*type:* `String.t`, *default:* `nil`) - The URI path (e.g., /users/1234). Default is an empty string. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :path => String.t() | nil + } + + field(:path) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.PathOverride do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.PathOverride.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.PathOverride do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/policy.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/policy.ex index db5e205400..d67b631447 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/policy.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/query_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/query_override.ex new file mode 100644 index 0000000000..3a3c9f9364 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/query_override.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.QueryOverride do + @moduledoc """ + QueryOverride. Query message defines query override for HTTP targets. + + ## Attributes + + * `queryParams` (*type:* `String.t`, *default:* `nil`) - The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty string. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :queryParams => String.t() | nil + } + + field(:queryParams) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.QueryOverride do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.QueryOverride.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.QueryOverride do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/queue.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/queue.ex index ba7a734fb4..c6b0d5ec3f 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/queue.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/queue.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.Queue do ## Attributes * `appEngineRoutingOverride` (*type:* `GoogleApi.CloudTasks.V2.Model.AppEngineRouting.t`, *default:* `nil`) - Overrides for task-level app_engine_routing. These settings apply only to App Engine tasks in this queue. Http tasks are not affected. If set, `app_engine_routing_override` is used for all App Engine tasks in the queue, no matter what the setting is for the task-level app_engine_routing. + * `httpTarget` (*type:* `GoogleApi.CloudTasks.V2.Model.HttpTarget.t`, *default:* `nil`) - Modifies HTTP target for HTTP tasks. * `name` (*type:* `String.t`, *default:* `nil`) - Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. * `purgeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last time this queue was purged. All tasks that were created before this time were purged. A queue can be purged using PurgeQueue, the [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). Purge time will be truncated to the nearest microsecond. Purge time will be unset if the queue has never been purged. * `rateLimits` (*type:* `GoogleApi.CloudTasks.V2.Model.RateLimits.t`, *default:* `nil`) - Rate limits for task dispatches. rate_limits and retry_config are related because they both control task attempts. However they control task attempts in different ways: * rate_limits controls the total rate of dispatches from a queue (i.e. all traffic dispatched from the queue, regardless of whether the dispatch is from a first attempt or a retry). * retry_config controls what happens to particular a task after its first attempt fails. That is, retry_config controls task retries (the second attempt, third attempt, etc). The queue's actual dispatch rate is the result of: * Number of tasks in the queue * User-specified throttling: rate_limits, retry_config, and the queue's state. * System throttling due to `429` (Too Many Requests) or `503` (Service Unavailable) responses from the worker, high error rates, or to smooth sudden large traffic spikes. @@ -34,6 +35,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.Queue do @type t :: %__MODULE__{ :appEngineRoutingOverride => GoogleApi.CloudTasks.V2.Model.AppEngineRouting.t() | nil, + :httpTarget => GoogleApi.CloudTasks.V2.Model.HttpTarget.t() | nil, :name => String.t() | nil, :purgeTime => DateTime.t() | nil, :rateLimits => GoogleApi.CloudTasks.V2.Model.RateLimits.t() | nil, @@ -44,6 +46,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.Queue do } field(:appEngineRoutingOverride, as: GoogleApi.CloudTasks.V2.Model.AppEngineRouting) + field(:httpTarget, as: GoogleApi.CloudTasks.V2.Model.HttpTarget) field(:name) field(:purgeTime, as: DateTime) field(:rateLimits, as: GoogleApi.CloudTasks.V2.Model.RateLimits) diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/retry_config.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/retry_config.ex index 2a34904558..a319743256 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/retry_config.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/retry_config.ex @@ -22,10 +22,10 @@ defmodule GoogleApi.CloudTasks.V2.Model.RetryConfig do ## Attributes * `maxAttempts` (*type:* `integer()`, *default:* `nil`) - Number of attempts per task. Cloud Tasks will attempt the task `max_attempts` times (that is, if the first attempt fails, then there will be `max_attempts - 1` retries). Must be >= -1. If unspecified when the queue is created, Cloud Tasks will pick the default. -1 indicates unlimited attempts. This field has the same meaning as [task_retry_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * `maxBackoff` (*type:* `String.t`, *default:* `nil`) - 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). + * `maxBackoff` (*type:* `String.t`, *default:* `nil`) - 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). * `maxDoublings` (*type:* `integer()`, *default:* `nil`) - The time between retries will double `max_doublings` times. A task's retry interval starts at min_backoff, then doubles `max_doublings` times, then increases linearly, and finally retries at intervals of max_backoff up to max_attempts times. For example, if min_backoff is 10s, max_backoff is 300s, and `max_doublings` is 3, then the a task will first be retried in 10s. The retry interval will double three times, and then increase linearly by 2^3 * 10s. Finally, the task will retry at intervals of max_backoff until the task has been attempted max_attempts times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... If unspecified when the queue is created, Cloud Tasks will pick the default. This field has the same meaning as [max_doublings in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). - * `maxRetryDuration` (*type:* `String.t`, *default:* `nil`) - 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). - * `minBackoff` (*type:* `String.t`, *default:* `nil`) - 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). + * `maxRetryDuration` (*type:* `String.t`, *default:* `nil`) - 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). + * `minBackoff` (*type:* `String.t`, *default:* `nil`) - 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). """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/task.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/task.ex index 1e0562ab90..931f874ecb 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/task.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/task.ex @@ -24,7 +24,7 @@ defmodule GoogleApi.CloudTasks.V2.Model.Task do * `appEngineHttpRequest` (*type:* `GoogleApi.CloudTasks.V2.Model.AppEngineHttpRequest.t`, *default:* `nil`) - HTTP request that is sent to the App Engine app handler. An App Engine task is a task that has AppEngineHttpRequest set. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time that the task was created. `create_time` will be truncated to the nearest second. * `dispatchCount` (*type:* `integer()`, *default:* `nil`) - Output only. The number of attempts dispatched. This count includes attempts which have been dispatched but haven't received a response. - * `dispatchDeadline` (*type:* `String.t`, *default:* `nil`) - 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. + * `dispatchDeadline` (*type:* `String.t`, *default:* `nil`) - 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. * `firstAttempt` (*type:* `GoogleApi.CloudTasks.V2.Model.Attempt.t`, *default:* `nil`) - Output only. The status of the task's first attempt. Only dispatch_time will be set. The other Attempt information is not retained by Cloud Tasks. * `httpRequest` (*type:* `GoogleApi.CloudTasks.V2.Model.HttpRequest.t`, *default:* `nil`) - HTTP request that is sent to the worker. An HTTP task is a task that has HttpRequest set. * `lastAttempt` (*type:* `GoogleApi.CloudTasks.V2.Model.Attempt.t`, *default:* `nil`) - Output only. The status of the task's last attempt. diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/uri_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/uri_override.ex new file mode 100644 index 0000000000..38d5f6b0c4 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2/model/uri_override.ex @@ -0,0 +1,61 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2.Model.UriOverride do + @moduledoc """ + URI Override. When specified, all the HTTP tasks inside the queue will be partially or fully overridden depending on the configured values. + + ## Attributes + + * `host` (*type:* `String.t`, *default:* `nil`) - Host override. When specified, replaces the host part of the task URL. For example, if the task URL is "https://www.google.com," and host value is set to "example.net", the overridden URI will be changed to "https://example.net." Host value cannot be an empty string (INVALID_ARGUMENT). + * `pathOverride` (*type:* `GoogleApi.CloudTasks.V2.Model.PathOverride.t`, *default:* `nil`) - URI path. When specified, replaces the existing path of the task URL. Setting the path value to an empty string clears the URI path segment. + * `port` (*type:* `String.t`, *default:* `nil`) - Port override. When specified, replaces the port part of the task URI. For instance, for a URI http://www.google.com/foo and port=123, the overridden URI becomes http://www.google.com:123/foo. Note that the port value must be a positive integer. Setting the port to 0 (Zero) clears the URI port. + * `queryOverride` (*type:* `GoogleApi.CloudTasks.V2.Model.QueryOverride.t`, *default:* `nil`) - URI query. When specified, replaces the query part of the task URI. Setting the query value to an empty string clears the URI query segment. + * `scheme` (*type:* `String.t`, *default:* `nil`) - Scheme override. When specified, the task URI scheme is replaced by the provided value (HTTP or HTTPS). + * `uriOverrideEnforceMode` (*type:* `String.t`, *default:* `nil`) - URI Override Enforce Mode When specified, determines the Target UriOverride mode. If not specified, it defaults to ALWAYS. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :host => String.t() | nil, + :pathOverride => GoogleApi.CloudTasks.V2.Model.PathOverride.t() | nil, + :port => String.t() | nil, + :queryOverride => GoogleApi.CloudTasks.V2.Model.QueryOverride.t() | nil, + :scheme => String.t() | nil, + :uriOverrideEnforceMode => String.t() | nil + } + + field(:host) + field(:pathOverride, as: GoogleApi.CloudTasks.V2.Model.PathOverride) + field(:port) + field(:queryOverride, as: GoogleApi.CloudTasks.V2.Model.QueryOverride) + field(:scheme) + field(:uriOverrideEnforceMode) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2.Model.UriOverride do + def decode(value, options) do + GoogleApi.CloudTasks.V2.Model.UriOverride.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2.Model.UriOverride do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/api/projects.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/api/projects.ex index ab8d131a28..6bb37f2b83 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/api/projects.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/api/projects.ex @@ -85,6 +85,76 @@ defmodule GoogleApi.CloudTasks.V2beta2.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2beta2.Model.Location{}]) end + @doc """ + Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured. + + ## Parameters + + * `connection` (*type:* `GoogleApi.CloudTasks.V2beta2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. The config. For example: projects/PROJECT_ID/locations/LOCATION_ID/CmekConfig` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.CloudTasks.V2beta2.Model.CmekConfig{}}` on success + * `{:error, info}` on failure + """ + @spec cloudtasks_projects_locations_get_cmek_config( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.CloudTasks.V2beta2.Model.CmekConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def cloudtasks_projects_locations_get_cmek_config( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v2beta2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2beta2.Model.CmekConfig{}]) + end + @doc """ Lists information about the supported locations for this service. @@ -153,6 +223,80 @@ defmodule GoogleApi.CloudTasks.V2beta2.Api.Projects do ) end + @doc """ + 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. + + ## Parameters + + * `connection` (*type:* `GoogleApi.CloudTasks.V2beta2.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - 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` + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - List of fields to be updated in this request. + * `:body` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.CmekConfig.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.CloudTasks.V2beta2.Model.CmekConfig{}}` on success + * `{:error, info}` on failure + """ + @spec cloudtasks_projects_locations_update_cmek_config( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.CloudTasks.V2beta2.Model.CmekConfig.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def cloudtasks_projects_locations_update_cmek_config( + connection, + name, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url("/v2beta2/{+name}", %{ + "name" => URI.encode(name, &URI.char_unreserved?/1) + }) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.CloudTasks.V2beta2.Model.CmekConfig{}]) + end + @doc """ Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. 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. @@ -226,7 +370,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Api.Projects do end @doc """ - 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. + 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. ## Parameters @@ -1026,7 +1170,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Api.Projects do end @doc """ - Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the [Cloud Tasks BufferTask Experiment Signup form](https://forms.gle/X8Zr5hiXH5tTGFqh8). + Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. ## Parameters diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/metadata.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/metadata.ex index eb354e8297..570c71ba26 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/metadata.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.CloudTasks.V2beta2 do API client metadata for GoogleApi.CloudTasks.V2beta2. """ - @discovery_revision "20221025" + @discovery_revision "20240301" def discovery_revision(), do: @discovery_revision end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/binding.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/binding.ex index ad3811b42f..708ef52cde 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/binding.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/cmek_config.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/cmek_config.ex new file mode 100644 index 0000000000..047d84e38d --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/cmek_config.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2beta2.Model.CmekConfig do + @moduledoc """ + Describes the customer-managed encryption key (CMEK) configuration associated with a project and location. + + ## Attributes + + * `kmsKey` (*type:* `String.t`, *default:* `nil`) - 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 & Tasks in the region. Setting this as blank will turn off CMEK encryption. + * `name` (*type:* `String.t`, *default:* `nil`) - 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` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :kmsKey => String.t() | nil, + :name => String.t() | nil + } + + field(:kmsKey) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2beta2.Model.CmekConfig do + def decode(value, options) do + GoogleApi.CloudTasks.V2beta2.Model.CmekConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2beta2.Model.CmekConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/create_task_request.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/create_task_request.ex index a361184592..fd44fc4f3b 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/create_task_request.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/create_task_request.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.CreateTaskRequest do ## Attributes * `responseView` (*type:* `String.t`, *default:* `nil`) - The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource. - * `task` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.Task.t`, *default:* `nil`) - Required. The task to add. Task names have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can optionally specify a task name. If a name is not specified then the system will generate a random unique task id, which will be set in the task returned in the response. If schedule_time is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or completed recently then the call will fail with ALREADY_EXISTS. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1hour after the original task was deleted or completed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9days after the original task was deleted or completed. Because there is an extra lookup cost to identify duplicate task names, these CreateTask calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. + * `task` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.Task.t`, *default:* `nil`) - Required. The task to add. Task names have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can optionally specify a task name. If a name is not specified then the system will generate a random unique task id, which will be set in the task returned in the response. If schedule_time is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or completed recently then the call will fail with ALREADY_EXISTS. The IDs of deleted tasks are not immediately available for reuse. It can take up to 4 hours (or 9 days if the task's queue was created using a queue.yaml or queue.xml) for the task ID to be released and made available again. Because there is an extra lookup cost to identify duplicate task names, these CreateTask calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/header_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/header_override.ex index 5f3fe46036..cc25f573f5 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/header_override.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/header_override.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.HeaderOverride do ## Attributes - * `header` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.Header.t`, *default:* `nil`) - header embodying a key and a value. + * `header` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.Header.t`, *default:* `nil`) - Header embodying a key and a value. Do not put business sensitive or personally identifying data in the HTTP Header Override Configuration or other similar fields in accordance with Section 12 (Resource Fields) of the [Service Specific Terms](https://cloud.google.com/terms/service-terms). """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_request.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_request.ex index 39904366e9..2155ff8ff6 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_request.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_request.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.HttpRequest do ## Attributes * `body` (*type:* `String.t`, *default:* `nil`) - HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a task with an incompatible HttpMethod. - * `headers` (*type:* `map()`, *default:* `nil`) - HTTP request headers. This map contains the header field names and values. Headers can be set when running the task is created or task is created. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-Google-Cloud-Tasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. + * `headers` (*type:* `map()`, *default:* `nil`) - HTTP request headers. This map contains the header field names and values. Headers can be set when running the task is created or task is created. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. * `httpMethod` (*type:* `String.t`, *default:* `nil`) - The HTTP method to use for the request. The default is POST. * `oauthToken` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.OAuthToken.t`, *default:* `nil`) - If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com. * `oidcToken` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.OidcToken.t`, *default:* `nil`) - If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_target.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_target.ex index b29bce6262..5c6a0a2683 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_target.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/http_target.ex @@ -21,11 +21,11 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.HttpTarget do ## Attributes - * `headerOverrides` (*type:* `list(GoogleApi.CloudTasks.V2beta2.Model.HeaderOverride.t)`, *default:* `nil`) - HTTP target headers. This map contains the header field names and values. Headers will be set when running the task is created and/or task is created. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-Google-Cloud-Tasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-Cloud-Tasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue. - * `httpMethod` (*type:* `String.t`, *default:* `nil`) - The HTTP method to use for the request. When specified, it will override HttpRequest for the task. Note that if the value is set to HttpMethod the HttpRequest of the task will be ignored at execution time. + * `headerOverrides` (*type:* `list(GoogleApi.CloudTasks.V2beta2.Model.HeaderOverride.t)`, *default:* `nil`) - HTTP target headers. This map contains the header field names and values. Headers will be set when running the task is created and/or task is created. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with "X-CloudTasks-" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `"Google-CloudTasks"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example, `Content-Type` can be set to `"application/octet-stream"` or `"application/json"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue. Do not put business sensitive or personally identifying data in the HTTP Header Override Configuration or other similar fields in accordance with Section 12 (Resource Fields) of the [Service Specific Terms](https://cloud.google.com/terms/service-terms). + * `httpMethod` (*type:* `String.t`, *default:* `nil`) - The HTTP method to use for the request. When specified, it overrides HttpRequest for the task. Note that if the value is set to HttpMethod the HttpRequest of the task will be ignored at execution time. * `oauthToken` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.OAuthToken.t`, *default:* `nil`) - If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com. * `oidcToken` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.OidcToken.t`, *default:* `nil`) - If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. - * `uriOverride` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.UriOverride.t`, *default:* `nil`) - Uri override. When specified, modifies the execution Uri for all the tasks in the queue. + * `uriOverride` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.UriOverride.t`, *default:* `nil`) - Uri override. When specified, overrides the execution Uri for all the tasks in the queue. """ use GoogleApi.Gax.ModelBase diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/location.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/location.ex index 4cd2689eb8..165d18821b 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/location.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.Location do @moduledoc """ - A resource that represents Google Cloud Platform location. + A resource that represents a Google Cloud location. ## Attributes diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/path_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/path_override.ex new file mode 100644 index 0000000000..a27c5281c5 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/path_override.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2beta2.Model.PathOverride do + @moduledoc """ + PathOverride. Path message defines path override for HTTP targets. + + ## Attributes + + * `path` (*type:* `String.t`, *default:* `nil`) - The URI path (e.g., /users/1234). Default is an empty string. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :path => String.t() | nil + } + + field(:path) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2beta2.Model.PathOverride do + def decode(value, options) do + GoogleApi.CloudTasks.V2beta2.Model.PathOverride.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2beta2.Model.PathOverride do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/policy.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/policy.ex index 2a9adebb5d..879b78ff52 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/policy.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/query_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/query_override.ex new file mode 100644 index 0000000000..087e2acf24 --- /dev/null +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/query_override.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.CloudTasks.V2beta2.Model.QueryOverride do + @moduledoc """ + QueryOverride. Query message defines query override for HTTP targets. + + ## Attributes + + * `queryParams` (*type:* `String.t`, *default:* `nil`) - The query parameters (e.g., qparam1=123&qparam2=456). Default is an empty string. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :queryParams => String.t() | nil + } + + field(:queryParams) +end + +defimpl Poison.Decoder, for: GoogleApi.CloudTasks.V2beta2.Model.QueryOverride do + def decode(value, options) do + GoogleApi.CloudTasks.V2beta2.Model.QueryOverride.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.CloudTasks.V2beta2.Model.QueryOverride do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/uri_override.ex b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/uri_override.ex index ee3c955cf5..7576c11134 100644 --- a/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/uri_override.ex +++ b/clients/cloud_tasks/lib/google_api/cloud_tasks/v2beta2/model/uri_override.ex @@ -21,29 +21,29 @@ defmodule GoogleApi.CloudTasks.V2beta2.Model.UriOverride do ## Attributes - * `host` (*type:* `String.t`, *default:* `nil`) - Host override. When specified, the host part of url will be overridden. For example, if the original Uri is "https://www.google.com", and host is set to "example.net", the overridden Uri will be "https://example.net". - * `path` (*type:* `String.t`, *default:* `nil`) - Uri path. Will be used as the path for the current Uri (replaces any existing path of the task url). - * `port` (*type:* `String.t`, *default:* `nil`) - Port override. When specified, the port part of Uri will be replaced by the provided value. For instance, for a Uri http://www.google.com/foo and port=123 the overridden Uri becomes http://www.google.com:123/foo. - * `query` (*type:* `String.t`, *default:* `nil`) - Uri Query. Will replace the query part of the task uri. - * `scheme` (*type:* `String.t`, *default:* `nil`) - Scheme override. When specified, the Uri scheme is replaced by the provided value. - * `uriOverrideEnforceMode` (*type:* `String.t`, *default:* `nil`) - Uri Override Enforce Mode Determines the Target UriOverride mode. + * `host` (*type:* `String.t`, *default:* `nil`) - Host override. When specified, replaces the host part of the task URL. For example, if the task URL is "https://www.google.com," and host value is set to "example.net", the overridden URI will be changed to "https://example.net." Host value cannot be an empty string (INVALID_ARGUMENT). + * `pathOverride` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.PathOverride.t`, *default:* `nil`) - URI path. When specified, replaces the existing path of the task URL. Setting the path value to an empty string clears the URI path segment. + * `port` (*type:* `String.t`, *default:* `nil`) - Port override. When specified, replaces the port part of the task URI. For instance, for a URI http://www.google.com/foo and port=123, the overridden URI becomes http://www.google.com:123/foo. Note that the port value must be a positive integer. Setting the port to 0 (Zero) clears the URI port. + * `queryOverride` (*type:* `GoogleApi.CloudTasks.V2beta2.Model.QueryOverride.t`, *default:* `nil`) - URI Query. When specified, replaces the query part of the task URI. Setting the query value to an empty string clears the URI query segment. + * `scheme` (*type:* `String.t`, *default:* `nil`) - Scheme override. When specified, the task URI scheme is replaced by the provided value (HTTP or HTTPS). + * `uriOverrideEnforceMode` (*type:* `String.t`, *default:* `nil`) - URI Override Enforce Mode When specified, determines the Target UriOverride mode. If not specified, it defaults to ALWAYS. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :host => String.t() | nil, - :path => String.t() | nil, + :pathOverride => GoogleApi.CloudTasks.V2beta2.Model.PathOverride.t() | nil, :port => String.t() | nil, - :query => String.t() | nil, + :queryOverride => GoogleApi.CloudTasks.V2beta2.Model.QueryOverride.t() | nil, :scheme => String.t() | nil, :uriOverrideEnforceMode => String.t() | nil } field(:host) - field(:path) + field(:pathOverride, as: GoogleApi.CloudTasks.V2beta2.Model.PathOverride) field(:port) - field(:query) + field(:queryOverride, as: GoogleApi.CloudTasks.V2beta2.Model.QueryOverride) field(:scheme) field(:uriOverrideEnforceMode) end