diff --git a/clients/workflows/README.md b/clients/workflows/README.md index e103c4abac..9acfa512e7 100644 --- a/clients/workflows/README.md +++ b/clients/workflows/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_workflows, "~> 0.3"}] + [{:google_api_workflows, "~> 0.4"}] end ``` diff --git a/clients/workflows/lib/google_api/workflows/v1/api/projects.ex b/clients/workflows/lib/google_api/workflows/v1/api/projects.ex new file mode 100644 index 0000000000..55574f24b7 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/api/projects.ex @@ -0,0 +1,735 @@ +# 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.Workflows.V1.Api.Projects do + @moduledoc """ + API calls for all endpoints tagged `Projects`. + """ + + alias GoogleApi.Workflows.V1.Connection + alias GoogleApi.Gax.{Request, Response} + + @library_version Mix.Project.config() |> Keyword.get(:version, "") + + @doc """ + Gets information about a location. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Resource name for the location. + * `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.Workflows.V1.Model.Location{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_get(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.Workflows.V1.Model.Location.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_get(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("/v1/{+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.Workflows.V1.Model.Location{}]) + end + + @doc """ + Lists information about the supported locations for this service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The resource that owns the locations collection, if applicable. + * `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"). + * `:filter` (*type:* `String.t`) - A filter to narrow down results to a preferred subset. The filtering language accepts strings like "displayName=tokyo", and is documented in more detail in [AIP-160](https://google.aip.dev/160). + * `:pageSize` (*type:* `integer()`) - The maximum number of results to return. If not set, the service selects a default. + * `:pageToken` (*type:* `String.t`) - A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Workflows.V1.Model.ListLocationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.Workflows.V1.Model.ListLocationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_list(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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}/locations", %{ + "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.Workflows.V1.Model.ListLocationsResponse{}]) + end + + @doc """ + Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource to be deleted. + * `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.Workflows.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_operations_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_operations_delete( + 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(:delete) + |> Request.url("/v1/{+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.Workflows.V1.Model.Empty{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation resource. + * `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.Workflows.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_operations_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_operations_get( + 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("/v1/{+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.Workflows.V1.Model.Operation{}]) + end + + @doc """ + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The name of the operation's parent resource. + * `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"). + * `:filter` (*type:* `String.t`) - The standard list filter. + * `:pageSize` (*type:* `integer()`) - The standard list page size. + * `:pageToken` (*type:* `String.t`) - The standard list page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Workflows.V1.Model.ListOperationsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_operations_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.ListOperationsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_operations_list( + 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, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+name}/operations", %{ + "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.Workflows.V1.Model.ListOperationsResponse{}]) + end + + @doc """ + Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation will return ALREADY_EXISTS error. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Project and location in which the workflow should be created. Format: projects/{project}/locations/{location} + * `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"). + * `:workflowId` (*type:* `String.t`) - Required. The ID of the workflow to be created. It has to fulfill the following requirements: * Must contain only letters, numbers, underscores and hyphens. * Must start with a letter. * Must be between 1-64 characters. * Must end with a number or a letter. * Must be unique within the customer project and location. + * `:body` (*type:* `GoogleApi.Workflows.V1.Model.Workflow.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Workflows.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_workflows_create( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_workflows_create( + connection, + parent, + 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, + :workflowId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/{+parent}/workflows", %{ + "parent" => URI.encode(parent, &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.Workflows.V1.Model.Operation{}]) + end + + @doc """ + Deletes a workflow with the specified name. This method also cancels and deletes all running executions of the workflow. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Name of the workflow to be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow} + * `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.Workflows.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_workflows_delete( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_workflows_delete( + 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(:delete) + |> Request.url("/v1/{+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.Workflows.V1.Model.Operation{}]) + end + + @doc """ + Gets details of a single Workflow. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - Required. Name of the workflow which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow} + * `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.Workflows.V1.Model.Workflow{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_workflows_get( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.Workflow.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_workflows_get( + 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("/v1/{+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.Workflows.V1.Model.Workflow{}]) + end + + @doc """ + Lists Workflows in a given project and location. The default order is not specified. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `parent` (*type:* `String.t`) - Required. Project and location from which the workflows should be listed. Format: projects/{project}/locations/{location} + * `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"). + * `:filter` (*type:* `String.t`) - Filter to restrict results to specific workflows. + * `:orderBy` (*type:* `String.t`) - Comma-separated list of fields that that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a " desc" suffix. If not specified, the results will be returned in an unspecified order. + * `:pageSize` (*type:* `integer()`) - Maximum number of workflows to return per call. The service may return fewer than this value. If the value is not specified, a default value of 500 will be used. The maximum permitted value is 1000 and values greater than 1000 will be coerced down to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListWorkflows` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflows` must match the call that provided the page token. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Workflows.V1.Model.ListWorkflowsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_workflows_list( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.ListWorkflowsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_workflows_list( + connection, + parent, + 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, + :filter => :query, + :orderBy => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+parent}/workflows", %{ + "parent" => URI.encode(parent, &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.Workflows.V1.Model.ListWorkflowsResponse{}]) + end + + @doc """ + Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow may be created as a result of a successful update operation. In that case, such revision will be used in new workflow executions. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Workflows.V1.Connection.t`) - Connection to server + * `name` (*type:* `String.t`) - The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow} + * `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. If not present, the entire workflow will be updated. + * `:body` (*type:* `GoogleApi.Workflows.V1.Model.Workflow.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Workflows.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec workflows_projects_locations_workflows_patch( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Workflows.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def workflows_projects_locations_workflows_patch( + 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("/v1/{+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.Workflows.V1.Model.Operation{}]) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/connection.ex b/clients/workflows/lib/google_api/workflows/v1/connection.ex new file mode 100644 index 0000000000..efc0652b74 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/connection.ex @@ -0,0 +1,32 @@ +# 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.Workflows.V1.Connection do + @moduledoc """ + Handle Tesla connections for GoogleApi.Workflows.V1. + """ + + @type t :: Tesla.Env.client() + + use GoogleApi.Gax.Connection, + scopes: [ + # See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. + "https://www.googleapis.com/auth/cloud-platform" + ], + otp_app: :google_api_workflows, + base_url: "https://workflows.googleapis.com/" +end diff --git a/clients/workflows/lib/google_api/workflows/v1/metadata.ex b/clients/workflows/lib/google_api/workflows/v1/metadata.ex new file mode 100644 index 0000000000..086b56bdc9 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/metadata.ex @@ -0,0 +1,26 @@ +# Copyright 2020 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.Workflows.V1 do + @moduledoc """ + API client metadata for GoogleApi.Workflows.V1. + """ + + @discovery_revision "20211117" + + def discovery_revision(), do: @discovery_revision +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/empty.ex b/clients/workflows/lib/google_api/workflows/v1/model/empty.ex new file mode 100644 index 0000000000..bf8acc61a8 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/empty.ex @@ -0,0 +1,41 @@ +# 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.Workflows.V1.Model.Empty do + @moduledoc """ + A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.Empty do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.Empty.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.Empty do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/list_locations_response.ex b/clients/workflows/lib/google_api/workflows/v1/model/list_locations_response.ex new file mode 100644 index 0000000000..8816702679 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/list_locations_response.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.Workflows.V1.Model.ListLocationsResponse do + @moduledoc """ + The response message for Locations.ListLocations. + + ## Attributes + + * `locations` (*type:* `list(GoogleApi.Workflows.V1.Model.Location.t)`, *default:* `nil`) - A list of locations that matches the specified filter in the request. + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :locations => list(GoogleApi.Workflows.V1.Model.Location.t()) | nil, + :nextPageToken => String.t() | nil + } + + field(:locations, as: GoogleApi.Workflows.V1.Model.Location, type: :list) + field(:nextPageToken) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.ListLocationsResponse do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.ListLocationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.ListLocationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/list_operations_response.ex b/clients/workflows/lib/google_api/workflows/v1/model/list_operations_response.ex new file mode 100644 index 0000000000..ee6f43f798 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/list_operations_response.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.Workflows.V1.Model.ListOperationsResponse do + @moduledoc """ + The response message for Operations.ListOperations. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token. + * `operations` (*type:* `list(GoogleApi.Workflows.V1.Model.Operation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :operations => list(GoogleApi.Workflows.V1.Model.Operation.t()) | nil + } + + field(:nextPageToken) + field(:operations, as: GoogleApi.Workflows.V1.Model.Operation, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.ListOperationsResponse do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.ListOperationsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.ListOperationsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/list_workflows_response.ex b/clients/workflows/lib/google_api/workflows/v1/model/list_workflows_response.ex new file mode 100644 index 0000000000..1821eb12be --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/list_workflows_response.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.Workflows.V1.Model.ListWorkflowsResponse do + @moduledoc """ + Response for the ListWorkflows method. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `unreachable` (*type:* `list(String.t)`, *default:* `nil`) - Unreachable resources. + * `workflows` (*type:* `list(GoogleApi.Workflows.V1.Model.Workflow.t)`, *default:* `nil`) - The workflows which match the request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :unreachable => list(String.t()) | nil, + :workflows => list(GoogleApi.Workflows.V1.Model.Workflow.t()) | nil + } + + field(:nextPageToken) + field(:unreachable, type: :list) + field(:workflows, as: GoogleApi.Workflows.V1.Model.Workflow, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.ListWorkflowsResponse do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.ListWorkflowsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.ListWorkflowsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/location.ex b/clients/workflows/lib/google_api/workflows/v1/model/location.ex new file mode 100644 index 0000000000..32b661fb79 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/location.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.Workflows.V1.Model.Location do + @moduledoc """ + A resource that represents Google Cloud Platform location. + + ## Attributes + + * `displayName` (*type:* `String.t`, *default:* `nil`) - The friendly name for this location, typically a nearby city name. For example, "Tokyo". + * `labels` (*type:* `map()`, *default:* `nil`) - Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} + * `locationId` (*type:* `String.t`, *default:* `nil`) - The canonical id for this location. For example: `"us-east1"`. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata. For example the available capacity at the given location. + * `name` (*type:* `String.t`, *default:* `nil`) - Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :displayName => String.t() | nil, + :labels => map() | nil, + :locationId => String.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil + } + + field(:displayName) + field(:labels, type: :map) + field(:locationId) + field(:metadata, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.Location do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.Location.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.Location do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/operation.ex b/clients/workflows/lib/google_api/workflows/v1/model/operation.ex new file mode 100644 index 0000000000..a3689fa59a --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/operation.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.Workflows.V1.Model.Operation do + @moduledoc """ + This resource represents a long-running operation that is the result of a network API call. + + ## Attributes + + * `done` (*type:* `boolean()`, *default:* `nil`) - If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * `error` (*type:* `GoogleApi.Workflows.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. + * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :done => boolean() | nil, + :error => GoogleApi.Workflows.V1.Model.Status.t() | nil, + :metadata => map() | nil, + :name => String.t() | nil, + :response => map() | nil + } + + field(:done) + field(:error, as: GoogleApi.Workflows.V1.Model.Status) + field(:metadata, type: :map) + field(:name) + field(:response, type: :map) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.Operation do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.Operation.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.Operation do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/operation_metadata.ex b/clients/workflows/lib/google_api/workflows/v1/model/operation_metadata.ex new file mode 100644 index 0000000000..2e850886ab --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/operation_metadata.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.Workflows.V1.Model.OperationMetadata do + @moduledoc """ + Represents the metadata of the long-running operation. + + ## Attributes + + * `apiVersion` (*type:* `String.t`, *default:* `nil`) - API version used to start the operation. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the operation was created. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The time the operation finished running. + * `target` (*type:* `String.t`, *default:* `nil`) - Server-defined resource path for the target of the operation. + * `verb` (*type:* `String.t`, *default:* `nil`) - Name of the verb executed by the operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :apiVersion => String.t() | nil, + :createTime => DateTime.t() | nil, + :endTime => DateTime.t() | nil, + :target => String.t() | nil, + :verb => String.t() | nil + } + + field(:apiVersion) + field(:createTime, as: DateTime) + field(:endTime, as: DateTime) + field(:target) + field(:verb) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.OperationMetadata do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.OperationMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.OperationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/status.ex b/clients/workflows/lib/google_api/workflows/v1/model/status.ex new file mode 100644 index 0000000000..6a70d95760 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/status.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.Workflows.V1.Model.Status do + @moduledoc """ + The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + + ## Attributes + + * `code` (*type:* `integer()`, *default:* `nil`) - The status code, which should be an enum value of google.rpc.Code. + * `details` (*type:* `list(map())`, *default:* `nil`) - A list of messages that carry the error details. There is a common set of message types for APIs to use. + * `message` (*type:* `String.t`, *default:* `nil`) - A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :code => integer() | nil, + :details => list(map()) | nil, + :message => String.t() | nil + } + + field(:code) + field(:details, type: :list) + field(:message) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.Status do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.Status.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.Status do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1/model/workflow.ex b/clients/workflows/lib/google_api/workflows/v1/model/workflow.ex new file mode 100644 index 0000000000..b3ce77fe80 --- /dev/null +++ b/clients/workflows/lib/google_api/workflows/v1/model/workflow.ex @@ -0,0 +1,73 @@ +# 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.Workflows.V1.Model.Workflow do + @moduledoc """ + Workflow program to be executed by Workflows. + + ## Attributes + + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp of when the workflow was created. + * `description` (*type:* `String.t`, *default:* `nil`) - Description of the workflow provided by the user. Must be at most 1000 unicode characters long. + * `labels` (*type:* `map()`, *default:* `nil`) - Labels associated with this workflow. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores and dashes. Label keys must start with a letter. International characters are allowed. + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow} + * `revisionCreateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp that the latest revision of the workflow was created. + * `revisionId` (*type:* `String.t`, *default:* `nil`) - Output only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow: - Service account - Workflow code to be executed The format is "000001-a4d", where the first 6 characters define the zero-padded revision ordinal number. They are followed by a hyphen and 3 hexadecimal random characters. + * `serviceAccount` (*type:* `String.t`, *default:* `nil`) - The service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account} or {account} Using `-` as a wildcard for the `{project}` or not providing one at all will infer the project from the account. The `{account}` value can be the `email` address or the `unique_id` of the service account. If not provided, workflow will use the project's default service account. Modifying this field for an existing workflow results in a new workflow revision. + * `sourceContents` (*type:* `String.t`, *default:* `nil`) - Workflow code to be executed. The size limit is 128KB. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the workflow deployment. + * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The last update timestamp of the workflow. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :createTime => DateTime.t() | nil, + :description => String.t() | nil, + :labels => map() | nil, + :name => String.t() | nil, + :revisionCreateTime => DateTime.t() | nil, + :revisionId => String.t() | nil, + :serviceAccount => String.t() | nil, + :sourceContents => String.t() | nil, + :state => String.t() | nil, + :updateTime => DateTime.t() | nil + } + + field(:createTime, as: DateTime) + field(:description) + field(:labels, type: :map) + field(:name) + field(:revisionCreateTime, as: DateTime) + field(:revisionId) + field(:serviceAccount) + field(:sourceContents) + field(:state) + field(:updateTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.Workflows.V1.Model.Workflow do + def decode(value, options) do + GoogleApi.Workflows.V1.Model.Workflow.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Workflows.V1.Model.Workflow do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/workflows/lib/google_api/workflows/v1beta/metadata.ex b/clients/workflows/lib/google_api/workflows/v1beta/metadata.ex index 60f131a3e4..81616511bf 100644 --- a/clients/workflows/lib/google_api/workflows/v1beta/metadata.ex +++ b/clients/workflows/lib/google_api/workflows/v1beta/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Workflows.V1beta do API client metadata for GoogleApi.Workflows.V1beta. """ - @discovery_revision "20210728" + @discovery_revision "20211117" def discovery_revision(), do: @discovery_revision end diff --git a/clients/workflows/mix.exs b/clients/workflows/mix.exs index 66312367a4..7316d154b7 100644 --- a/clients/workflows/mix.exs +++ b/clients/workflows/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Workflows.Mixfile do use Mix.Project - @version "0.3.4" + @version "0.4.0" def project() do [ diff --git a/clients/workflows/synth.metadata b/clients/workflows/synth.metadata index 610623caf1..ef05cb9a76 100644 --- a/clients/workflows/synth.metadata +++ b/clients/workflows/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/elixir-google-api.git", - "sha": "1bd6f2c721b5cb3de22d7d82342c7a60b74cc273" + "sha": "7ba95e8058b5d76a24e84c40309df56e3c6d91ac" } } ]