Skip to content

Commit 51a4643

Browse files
feat: Automated regeneration of CloudScheduler client (googleapis#12208)
Auto-created at 2024-09-25 13:18:53 +0000 using the toys pull request generator.
1 parent 168898a commit 51a4643

File tree

8 files changed

+493
-4
lines changed

8 files changed

+493
-4
lines changed

clients/cloud_scheduler/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_cloud_scheduler, "~> 0.7"}]
14+
[{:google_api_cloud_scheduler, "~> 0.8"}]
1515
end
1616
```
1717

Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
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.CloudScheduler.V1.Api.Operations do
19+
@moduledoc """
20+
API calls for all endpoints tagged `Operations`.
21+
"""
22+
23+
alias GoogleApi.CloudScheduler.V1.Connection
24+
alias GoogleApi.Gax.{Request, Response}
25+
26+
@library_version Mix.Project.config() |> Keyword.get(:version, "")
27+
28+
@doc """
29+
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.CloudScheduler.V1.Connection.t`) - Connection to server
34+
* `name` (*type:* `String.t`) - The name of the operation resource to be cancelled.
35+
* `optional_params` (*type:* `keyword()`) - Optional parameters
36+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
37+
* `:access_token` (*type:* `String.t`) - OAuth access token.
38+
* `:alt` (*type:* `String.t`) - Data format for response.
39+
* `:callback` (*type:* `String.t`) - JSONP
40+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
41+
* `: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.
42+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
43+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
44+
* `: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.
45+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
46+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
47+
* `:body` (*type:* `GoogleApi.CloudScheduler.V1.Model.CancelOperationRequest.t`) -
48+
* `opts` (*type:* `keyword()`) - Call options
49+
50+
## Returns
51+
52+
* `{:ok, %GoogleApi.CloudScheduler.V1.Model.Empty{}}` on success
53+
* `{:error, info}` on failure
54+
"""
55+
@spec cloudscheduler_operations_cancel(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
56+
{:ok, GoogleApi.CloudScheduler.V1.Model.Empty.t()}
57+
| {:ok, Tesla.Env.t()}
58+
| {:ok, list()}
59+
| {:error, any()}
60+
def cloudscheduler_operations_cancel(connection, name, optional_params \\ [], opts \\ []) do
61+
optional_params_config = %{
62+
:"$.xgafv" => :query,
63+
:access_token => :query,
64+
:alt => :query,
65+
:callback => :query,
66+
:fields => :query,
67+
:key => :query,
68+
:oauth_token => :query,
69+
:prettyPrint => :query,
70+
:quotaUser => :query,
71+
:uploadType => :query,
72+
:upload_protocol => :query,
73+
:body => :body
74+
}
75+
76+
request =
77+
Request.new()
78+
|> Request.method(:post)
79+
|> Request.url("/v1/{+name}:cancel", %{
80+
"name" => URI.encode(name, &URI.char_unreserved?/1)
81+
})
82+
|> Request.add_optional_params(optional_params_config, optional_params)
83+
|> Request.library_version(@library_version)
84+
85+
connection
86+
|> Connection.execute(request)
87+
|> Response.decode(opts ++ [struct: %GoogleApi.CloudScheduler.V1.Model.Empty{}])
88+
end
89+
90+
@doc """
91+
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`.
92+
93+
## Parameters
94+
95+
* `connection` (*type:* `GoogleApi.CloudScheduler.V1.Connection.t`) - Connection to server
96+
* `name` (*type:* `String.t`) - The name of the operation resource to be deleted.
97+
* `optional_params` (*type:* `keyword()`) - Optional parameters
98+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
99+
* `:access_token` (*type:* `String.t`) - OAuth access token.
100+
* `:alt` (*type:* `String.t`) - Data format for response.
101+
* `:callback` (*type:* `String.t`) - JSONP
102+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
103+
* `: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.
104+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
105+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
106+
* `: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.
107+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
108+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
109+
* `opts` (*type:* `keyword()`) - Call options
110+
111+
## Returns
112+
113+
* `{:ok, %GoogleApi.CloudScheduler.V1.Model.Empty{}}` on success
114+
* `{:error, info}` on failure
115+
"""
116+
@spec cloudscheduler_operations_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
117+
{:ok, GoogleApi.CloudScheduler.V1.Model.Empty.t()}
118+
| {:ok, Tesla.Env.t()}
119+
| {:ok, list()}
120+
| {:error, any()}
121+
def cloudscheduler_operations_delete(connection, name, optional_params \\ [], opts \\ []) do
122+
optional_params_config = %{
123+
:"$.xgafv" => :query,
124+
:access_token => :query,
125+
:alt => :query,
126+
:callback => :query,
127+
:fields => :query,
128+
:key => :query,
129+
:oauth_token => :query,
130+
:prettyPrint => :query,
131+
:quotaUser => :query,
132+
:uploadType => :query,
133+
:upload_protocol => :query
134+
}
135+
136+
request =
137+
Request.new()
138+
|> Request.method(:delete)
139+
|> Request.url("/v1/{+name}", %{
140+
"name" => URI.encode(name, &URI.char_unreserved?/1)
141+
})
142+
|> Request.add_optional_params(optional_params_config, optional_params)
143+
|> Request.library_version(@library_version)
144+
145+
connection
146+
|> Connection.execute(request)
147+
|> Response.decode(opts ++ [struct: %GoogleApi.CloudScheduler.V1.Model.Empty{}])
148+
end
149+
150+
@doc """
151+
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.
152+
153+
## Parameters
154+
155+
* `connection` (*type:* `GoogleApi.CloudScheduler.V1.Connection.t`) - Connection to server
156+
* `name` (*type:* `String.t`) - The name of the operation resource.
157+
* `optional_params` (*type:* `keyword()`) - Optional parameters
158+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
159+
* `:access_token` (*type:* `String.t`) - OAuth access token.
160+
* `:alt` (*type:* `String.t`) - Data format for response.
161+
* `:callback` (*type:* `String.t`) - JSONP
162+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
163+
* `: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.
164+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
165+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
166+
* `: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.
167+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
168+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
169+
* `opts` (*type:* `keyword()`) - Call options
170+
171+
## Returns
172+
173+
* `{:ok, %GoogleApi.CloudScheduler.V1.Model.Operation{}}` on success
174+
* `{:error, info}` on failure
175+
"""
176+
@spec cloudscheduler_operations_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
177+
{:ok, GoogleApi.CloudScheduler.V1.Model.Operation.t()}
178+
| {:ok, Tesla.Env.t()}
179+
| {:ok, list()}
180+
| {:error, any()}
181+
def cloudscheduler_operations_get(connection, name, optional_params \\ [], opts \\ []) do
182+
optional_params_config = %{
183+
:"$.xgafv" => :query,
184+
:access_token => :query,
185+
:alt => :query,
186+
:callback => :query,
187+
:fields => :query,
188+
:key => :query,
189+
:oauth_token => :query,
190+
:prettyPrint => :query,
191+
:quotaUser => :query,
192+
:uploadType => :query,
193+
:upload_protocol => :query
194+
}
195+
196+
request =
197+
Request.new()
198+
|> Request.method(:get)
199+
|> Request.url("/v1/{+name}", %{
200+
"name" => URI.encode(name, &URI.char_unreserved?/1)
201+
})
202+
|> Request.add_optional_params(optional_params_config, optional_params)
203+
|> Request.library_version(@library_version)
204+
205+
connection
206+
|> Connection.execute(request)
207+
|> Response.decode(opts ++ [struct: %GoogleApi.CloudScheduler.V1.Model.Operation{}])
208+
end
209+
210+
@doc """
211+
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
212+
213+
## Parameters
214+
215+
* `connection` (*type:* `GoogleApi.CloudScheduler.V1.Connection.t`) - Connection to server
216+
* `name` (*type:* `String.t`) - The name of the operation's parent resource.
217+
* `optional_params` (*type:* `keyword()`) - Optional parameters
218+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
219+
* `:access_token` (*type:* `String.t`) - OAuth access token.
220+
* `:alt` (*type:* `String.t`) - Data format for response.
221+
* `:callback` (*type:* `String.t`) - JSONP
222+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
223+
* `: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.
224+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
225+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
226+
* `: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.
227+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
228+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
229+
* `:filter` (*type:* `String.t`) - The standard list filter.
230+
* `:pageSize` (*type:* `integer()`) - The standard list page size.
231+
* `:pageToken` (*type:* `String.t`) - The standard list page token.
232+
* `opts` (*type:* `keyword()`) - Call options
233+
234+
## Returns
235+
236+
* `{:ok, %GoogleApi.CloudScheduler.V1.Model.ListOperationsResponse{}}` on success
237+
* `{:error, info}` on failure
238+
"""
239+
@spec cloudscheduler_operations_list(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
240+
{:ok, GoogleApi.CloudScheduler.V1.Model.ListOperationsResponse.t()}
241+
| {:ok, Tesla.Env.t()}
242+
| {:ok, list()}
243+
| {:error, any()}
244+
def cloudscheduler_operations_list(connection, name, optional_params \\ [], opts \\ []) do
245+
optional_params_config = %{
246+
:"$.xgafv" => :query,
247+
:access_token => :query,
248+
:alt => :query,
249+
:callback => :query,
250+
:fields => :query,
251+
:key => :query,
252+
:oauth_token => :query,
253+
:prettyPrint => :query,
254+
:quotaUser => :query,
255+
:uploadType => :query,
256+
:upload_protocol => :query,
257+
:filter => :query,
258+
:pageSize => :query,
259+
:pageToken => :query
260+
}
261+
262+
request =
263+
Request.new()
264+
|> Request.method(:get)
265+
|> Request.url("/v1/{+name}", %{
266+
"name" => URI.encode(name, &URI.char_unreserved?/1)
267+
})
268+
|> Request.add_optional_params(optional_params_config, optional_params)
269+
|> Request.library_version(@library_version)
270+
271+
connection
272+
|> Connection.execute(request)
273+
|> Response.decode(
274+
opts ++ [struct: %GoogleApi.CloudScheduler.V1.Model.ListOperationsResponse{}]
275+
)
276+
end
277+
end

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

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

23-
@discovery_revision "20240301"
23+
@discovery_revision "20240917"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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.CloudScheduler.V1.Model.CancelOperationRequest do
19+
@moduledoc """
20+
The request message for Operations.CancelOperation.
21+
22+
## Attributes
23+
24+
"""
25+
26+
use GoogleApi.Gax.ModelBase
27+
28+
@type t :: %__MODULE__{}
29+
end
30+
31+
defimpl Poison.Decoder, for: GoogleApi.CloudScheduler.V1.Model.CancelOperationRequest do
32+
def decode(value, options) do
33+
GoogleApi.CloudScheduler.V1.Model.CancelOperationRequest.decode(value, options)
34+
end
35+
end
36+
37+
defimpl Poison.Encoder, for: GoogleApi.CloudScheduler.V1.Model.CancelOperationRequest do
38+
def encode(value, options) do
39+
GoogleApi.Gax.ModelBase.encode(value, options)
40+
end
41+
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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.CloudScheduler.V1.Model.ListOperationsResponse do
19+
@moduledoc """
20+
The response message for Operations.ListOperations.
21+
22+
## Attributes
23+
24+
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The standard List next-page token.
25+
* `operations` (*type:* `list(GoogleApi.CloudScheduler.V1.Model.Operation.t)`, *default:* `nil`) - A list of operations that matches the specified filter in the request.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:nextPageToken => String.t() | nil,
32+
:operations => list(GoogleApi.CloudScheduler.V1.Model.Operation.t()) | nil
33+
}
34+
35+
field(:nextPageToken)
36+
field(:operations, as: GoogleApi.CloudScheduler.V1.Model.Operation, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.CloudScheduler.V1.Model.ListOperationsResponse do
40+
def decode(value, options) do
41+
GoogleApi.CloudScheduler.V1.Model.ListOperationsResponse.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.CloudScheduler.V1.Model.ListOperationsResponse do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

0 commit comments

Comments
 (0)