Skip to content

Commit

Permalink
feat: Automated regeneration of Integrations client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Sep 28, 2024
1 parent 110ad70 commit aa1c9af
Show file tree
Hide file tree
Showing 11 changed files with 388 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clients/integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_integrations, "~> 0.9"}]
[{:google_api_integrations, "~> 0.10"}]
end
```

Expand Down
162 changes: 160 additions & 2 deletions clients/integrations/lib/google_api/integrations/v1/api/projects.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2349,6 +2349,85 @@ defmodule GoogleApi.Integrations.V1.Api.Projects do
)
end

@doc """
Cancellation of an execution and associated sub-executions. This will not cancel an IN_PROCESS or completed(SUCCESSFUL, FAILED or CANCELLED) executions.
## Parameters
* `connection` (*type:* `GoogleApi.Integrations.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The execution resource name. Format: projects/{gcp_project_id}/locations/{location}/products/{product}/integrations/{integration_id}/executions/{execution_id}
* `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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse{}}` on success
* `{:error, info}` on failure
"""
@spec integrations_projects_locations_integrations_executions_cancel(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok,
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def integrations_projects_locations_integrations_executions_cancel(
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,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/{+name}:cancel", %{
"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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse{}
]
)
end

@doc """
Download the execution.
Expand Down Expand Up @@ -2615,6 +2694,85 @@ defmodule GoogleApi.Integrations.V1.Api.Projects do
)
end

@doc """
Re-execute an existing execution, with same request parameters and execution strategy
## Parameters
* `connection` (*type:* `GoogleApi.Integrations.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The execution resource name. Format: projects/{gcp_project_id}/locations/{location}/integrations/{integration}/executions/{execution_id}
* `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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaReplayExecutionRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaReplayExecutionResponse{}}` on success
* `{:error, info}` on failure
"""
@spec integrations_projects_locations_integrations_executions_replay(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok,
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaReplayExecutionResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def integrations_projects_locations_integrations_executions_replay(
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,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/{+name}:replay", %{
"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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaReplayExecutionResponse{}
]
)
end

@doc """
* Lifts suspension for the Suspension task. Fetch corresponding suspension with provided suspension Id, resolve suspension, and set up suspension result for the Suspension Task.
Expand Down Expand Up @@ -3269,7 +3427,7 @@ defmodule GoogleApi.Integrations.V1.Api.Projects do
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:fieldMask` (*type:* `String.t`) - The field mask which specifies the particular data to be returned.
* `:filter` (*type:* `String.t`) - Filter on fields of IntegrationVersion. Fields can be compared with literal values by use of ":" (containment), "=" (equality), ">" (greater), "<" (less than), >=" (greater than or equal to), "<=" (less than or equal to), and "!=" (inequality) operators. Negation, conjunction, and disjunction are written using NOT, AND, and OR keywords. For example, organization_id=\\"1\\" AND state=ACTIVE AND description:"test". Filtering cannot be performed on repeated fields like `task_config`.
* `:orderBy` (*type:* `String.t`) - The results would be returned in order you specified here. Currently supported sort keys are: Descending sort order for "last_modified_time", "created_time", "snapshot_number" Ascending sort order for "name".
* `:orderBy` (*type:* `String.t`) - The results would be returned in order you specified here. Currently supported sort keys are: Descending sort order for "last\\_modified\\_time", "created\\_time", and "snapshot\\_number". Ascending sort order for `name`.
* `:pageSize` (*type:* `integer()`) - The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 50 versions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
* `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListIntegrationVersions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListIntegrationVersions` must match the call that provided the page token.
* `opts` (*type:* `keyword()`) - Call options
Expand Down Expand Up @@ -6441,7 +6599,7 @@ defmodule GoogleApi.Integrations.V1.Api.Projects do
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:fieldMask` (*type:* `String.t`) - The field mask which specifies the particular data to be returned.
* `:filter` (*type:* `String.t`) - Filter on fields of IntegrationVersion. Fields can be compared with literal values by use of ":" (containment), "=" (equality), ">" (greater), "<" (less than), >=" (greater than or equal to), "<=" (less than or equal to), and "!=" (inequality) operators. Negation, conjunction, and disjunction are written using NOT, AND, and OR keywords. For example, organization_id=\\"1\\" AND state=ACTIVE AND description:"test". Filtering cannot be performed on repeated fields like `task_config`.
* `:orderBy` (*type:* `String.t`) - The results would be returned in order you specified here. Currently supported sort keys are: Descending sort order for "last_modified_time", "created_time", "snapshot_number" Ascending sort order for "name".
* `:orderBy` (*type:* `String.t`) - The results would be returned in order you specified here. Currently supported sort keys are: Descending sort order for "last\\_modified\\_time", "created\\_time", and "snapshot\\_number". Ascending sort order for `name`.
* `:pageSize` (*type:* `integer()`) - The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 50 versions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
* `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListIntegrationVersions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListIntegrationVersions` must match the call that provided the page token.
* `opts` (*type:* `keyword()`) - Call options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Integrations.V1 do
API client metadata for GoogleApi.Integrations.V1.
"""

@discovery_revision "20240926"
@discovery_revision "20240927"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoTriggerConfig do
@moduledoc """
Configuration detail of a trigger. Next available id: 20
Configuration detail of a trigger. Next available id: 22
## Attributes
Expand All @@ -26,8 +26,10 @@ defmodule GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoTri
* `description` (*type:* `String.t`, *default:* `nil`) - User-provided description intended to give more business context about the task.
* `enabledClients` (*type:* `list(String.t)`, *default:* `nil`) - Required. The list of client ids which are enabled to execute the workflow using this trigger. In other words, these clients have the workflow execution privledges for this trigger. For API trigger, the client id in the incoming request is validated against the list of enabled clients. For non-API triggers, one workflow execution is triggered on behalf of each enabled client.
* `errorCatcherId` (*type:* `String.t`, *default:* `nil`) - Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task
* `inputVariables` (*type:* `list(String.t)`, *default:* `nil`) - Optional. List of input variables for the api trigger.
* `label` (*type:* `String.t`, *default:* `nil`) - The user created label for a particular trigger.
* `nextTasksExecutionPolicy` (*type:* `String.t`, *default:* `nil`) - Dictates how next tasks will be executed.
* `outputVariables` (*type:* `list(String.t)`, *default:* `nil`) - Optional. List of output variables for the api trigger.
* `pauseWorkflowExecutions` (*type:* `boolean()`, *default:* `nil`) - Optional. If set to true, any upcoming requests for this trigger config will be paused and the executions will be resumed later when the flag is reset. The workflow to which this trigger config belongs has to be in ACTIVE status for the executions to be paused or resumed.
* `position` (*type:* `GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoCoordinate.t`, *default:* `nil`) - Optional. Informs the front-end application where to draw this trigger config on the UI.
* `properties` (*type:* `map()`, *default:* `nil`) - Configurable properties of the trigger, not to be confused with workflow parameters. E.g. "name" is a property for API triggers and "subscription" is a property for Cloud Pubsub triggers.
Expand All @@ -53,8 +55,10 @@ defmodule GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoTri
:description => String.t() | nil,
:enabledClients => list(String.t()) | nil,
:errorCatcherId => String.t() | nil,
:inputVariables => list(String.t()) | nil,
:label => String.t() | nil,
:nextTasksExecutionPolicy => String.t() | nil,
:outputVariables => list(String.t()) | nil,
:pauseWorkflowExecutions => boolean() | nil,
:position =>
GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoCoordinate.t() | nil,
Expand All @@ -81,8 +85,10 @@ defmodule GoogleApi.Integrations.V1.Model.EnterpriseCrmFrontendsEventbusProtoTri
field(:description)
field(:enabledClients, type: :list)
field(:errorCatcherId)
field(:inputVariables, type: :list)
field(:label)
field(:nextTasksExecutionPolicy)
field(:outputVariables, type: :list)
field(:pauseWorkflowExecutions)
field(:position, as: GoogleApi.Integrations.V1.Model.EnterpriseCrmEventbusProtoCoordinate)
field(:properties, type: :map)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionRequest do
@moduledoc """
Request for cancelling an execution.
## Attributes
* `cancelReason` (*type:* `String.t`, *default:* `nil`) - Optional. Reason for cancelling the execution This is provided by the client requesting the cancellation Platform will not use this field
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:cancelReason => String.t() | nil
}

field(:cancelReason)
end

defimpl Poison.Decoder,
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionRequest do
def decode(value, options) do
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionRequest.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionRequest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse do
@moduledoc """
Response for cancelling an execution.
## Attributes
* `isCanceled` (*type:* `boolean()`, *default:* `nil`) - True if cancellation performed successfully
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:isCanceled => boolean() | nil
}

field(:isCanceled)
end

defimpl Poison.Decoder,
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse do
def decode(value, options) do
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse.decode(
value,
options
)
end
end

defimpl Poison.Encoder,
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCancelExecutionResponse do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading

0 comments on commit aa1c9af

Please sign in to comment.