Skip to content

Commit 980352b

Browse files
feat: Automated regeneration of Integrations client (googleapis#12667)
Auto-created at 2024-12-09 13:15:30 +0000 using the toys pull request generator.
1 parent a5f907d commit 980352b

File tree

7 files changed

+249
-3
lines changed

7 files changed

+249
-3
lines changed

clients/integrations/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_integrations, "~> 0.12"}]
14+
[{:google_api_integrations, "~> 0.13"}]
1515
end
1616
```
1717

clients/integrations/lib/google_api/integrations/v1/api/projects.ex

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,85 @@ defmodule GoogleApi.Integrations.V1.Api.Projects do
102102
)
103103
end
104104

105+
@doc """
106+
Generate OpenAPI spec for the requested integrations and api triggers
107+
108+
## Parameters
109+
110+
* `connection` (*type:* `GoogleApi.Integrations.V1.Connection.t`) - Connection to server
111+
* `name` (*type:* `String.t`) - Required. Project and location from which the integrations should be fetched. Format: projects/{project}/location/{location}
112+
* `optional_params` (*type:* `keyword()`) - Optional parameters
113+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
114+
* `:access_token` (*type:* `String.t`) - OAuth access token.
115+
* `:alt` (*type:* `String.t`) - Data format for response.
116+
* `:callback` (*type:* `String.t`) - JSONP
117+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
118+
* `: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.
119+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
120+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
121+
* `: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.
122+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
123+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
124+
* `:body` (*type:* `GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecRequest.t`) -
125+
* `opts` (*type:* `keyword()`) - Call options
126+
127+
## Returns
128+
129+
* `{:ok, %GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse{}}` on success
130+
* `{:error, info}` on failure
131+
"""
132+
@spec integrations_projects_locations_generate_open_api_spec(
133+
Tesla.Env.client(),
134+
String.t(),
135+
keyword(),
136+
keyword()
137+
) ::
138+
{:ok,
139+
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse.t()}
140+
| {:ok, Tesla.Env.t()}
141+
| {:ok, list()}
142+
| {:error, any()}
143+
def integrations_projects_locations_generate_open_api_spec(
144+
connection,
145+
name,
146+
optional_params \\ [],
147+
opts \\ []
148+
) do
149+
optional_params_config = %{
150+
:"$.xgafv" => :query,
151+
:access_token => :query,
152+
:alt => :query,
153+
:callback => :query,
154+
:fields => :query,
155+
:key => :query,
156+
:oauth_token => :query,
157+
:prettyPrint => :query,
158+
:quotaUser => :query,
159+
:uploadType => :query,
160+
:upload_protocol => :query,
161+
:body => :body
162+
}
163+
164+
request =
165+
Request.new()
166+
|> Request.method(:post)
167+
|> Request.url("/v1/{+name}:generateOpenApiSpec", %{
168+
"name" => URI.encode(name, &URI.char_unreserved?/1)
169+
})
170+
|> Request.add_optional_params(optional_params_config, optional_params)
171+
|> Request.library_version(@library_version)
172+
173+
connection
174+
|> Connection.execute(request)
175+
|> Response.decode(
176+
opts ++
177+
[
178+
struct:
179+
%GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse{}
180+
]
181+
)
182+
end
183+
105184
@doc """
106185
Gets the client configuration for the given project and location resource name
107186

clients/integrations/lib/google_api/integrations/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Integrations.V1 do
2020
API client metadata for GoogleApi.Integrations.V1.
2121
"""
2222

23-
@discovery_revision "20241201"
23+
@discovery_revision "20241207"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource do
19+
@moduledoc """
20+
List of API triggerID and their workflow resource name.
21+
22+
## Attributes
23+
24+
* `integrationResource` (*type:* `String.t`, *default:* `nil`) - Required. Integration where the API is published
25+
* `triggerId` (*type:* `list(String.t)`, *default:* `nil`) - Required. Trigger Id of the API trigger(s) in the integration
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:integrationResource => String.t() | nil,
32+
:triggerId => list(String.t()) | nil
33+
}
34+
35+
field(:integrationResource)
36+
field(:triggerId, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder,
40+
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource do
41+
def decode(value, options) do
42+
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource.decode(
43+
value,
44+
options
45+
)
46+
end
47+
end
48+
49+
defimpl Poison.Encoder,
50+
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource do
51+
def encode(value, options) do
52+
GoogleApi.Gax.ModelBase.encode(value, options)
53+
end
54+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecRequest do
19+
@moduledoc """
20+
Request for GenerateOpenApiSpec.
21+
22+
## Attributes
23+
24+
* `apiTriggerResources` (*type:* `list(GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource.t)`, *default:* `nil`) - Required. List of api triggers
25+
* `fileFormat` (*type:* `String.t`, *default:* `nil`) - Required. File format for generated spec.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:apiTriggerResources =>
32+
list(
33+
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource.t()
34+
)
35+
| nil,
36+
:fileFormat => String.t() | nil
37+
}
38+
39+
field(:apiTriggerResources,
40+
as: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaApiTriggerResource,
41+
type: :list
42+
)
43+
44+
field(:fileFormat)
45+
end
46+
47+
defimpl Poison.Decoder,
48+
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecRequest do
49+
def decode(value, options) do
50+
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecRequest.decode(
51+
value,
52+
options
53+
)
54+
end
55+
end
56+
57+
defimpl Poison.Encoder,
58+
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecRequest do
59+
def encode(value, options) do
60+
GoogleApi.Gax.ModelBase.encode(value, options)
61+
end
62+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse do
19+
@moduledoc """
20+
Response of the GenerateOpenApiSpec API.
21+
22+
## Attributes
23+
24+
* `openApiSpec` (*type:* `String.t`, *default:* `nil`) - Open API spec as per the required format
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:openApiSpec => String.t() | nil
31+
}
32+
33+
field(:openApiSpec)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse do
38+
def decode(value, options) do
39+
GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse.decode(
40+
value,
41+
options
42+
)
43+
end
44+
end
45+
46+
defimpl Poison.Encoder,
47+
for: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaGenerateOpenApiSpecResponse do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end

clients/integrations/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.Integrations.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.12.1"
21+
@version "0.13.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)