Skip to content

Commit 2217c4b

Browse files
feat: Automated regeneration of WorkloadManager client (googleapis#13028)
Auto-created at 2025-02-24 13:16:51 +0000 using the toys pull request generator.
1 parent bd9bcf4 commit 2217c4b

27 files changed

+1594
-1
lines changed

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

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,226 @@ defmodule GoogleApi.WorkloadManager.V1.Api.Projects do
163163
)
164164
end
165165

166+
@doc """
167+
Gets details of a discovered workload profile.
168+
169+
## Parameters
170+
171+
* `connection` (*type:* `GoogleApi.WorkloadManager.V1.Connection.t`) - Connection to server
172+
* `name` (*type:* `String.t`) - Required. Name of the resource
173+
* `optional_params` (*type:* `keyword()`) - Optional parameters
174+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
175+
* `:access_token` (*type:* `String.t`) - OAuth access token.
176+
* `:alt` (*type:* `String.t`) - Data format for response.
177+
* `:callback` (*type:* `String.t`) - JSONP
178+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
179+
* `: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.
180+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
181+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
182+
* `: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.
183+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
184+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
185+
* `opts` (*type:* `keyword()`) - Call options
186+
187+
## Returns
188+
189+
* `{:ok, %GoogleApi.WorkloadManager.V1.Model.WorkloadProfile{}}` on success
190+
* `{:error, info}` on failure
191+
"""
192+
@spec workloadmanager_projects_locations_discoveredprofiles_get(
193+
Tesla.Env.client(),
194+
String.t(),
195+
keyword(),
196+
keyword()
197+
) ::
198+
{:ok, GoogleApi.WorkloadManager.V1.Model.WorkloadProfile.t()}
199+
| {:ok, Tesla.Env.t()}
200+
| {:ok, list()}
201+
| {:error, any()}
202+
def workloadmanager_projects_locations_discoveredprofiles_get(
203+
connection,
204+
name,
205+
optional_params \\ [],
206+
opts \\ []
207+
) do
208+
optional_params_config = %{
209+
:"$.xgafv" => :query,
210+
:access_token => :query,
211+
:alt => :query,
212+
:callback => :query,
213+
:fields => :query,
214+
:key => :query,
215+
:oauth_token => :query,
216+
:prettyPrint => :query,
217+
:quotaUser => :query,
218+
:uploadType => :query,
219+
:upload_protocol => :query
220+
}
221+
222+
request =
223+
Request.new()
224+
|> Request.method(:get)
225+
|> Request.url("/v1/{+name}", %{
226+
"name" => URI.encode(name, &URI.char_unreserved?/1)
227+
})
228+
|> Request.add_optional_params(optional_params_config, optional_params)
229+
|> Request.library_version(@library_version)
230+
231+
connection
232+
|> Connection.execute(request)
233+
|> Response.decode(opts ++ [struct: %GoogleApi.WorkloadManager.V1.Model.WorkloadProfile{}])
234+
end
235+
236+
@doc """
237+
List discovered workload profiles
238+
239+
## Parameters
240+
241+
* `connection` (*type:* `GoogleApi.WorkloadManager.V1.Connection.t`) - Connection to server
242+
* `parent` (*type:* `String.t`) - Required. Parent value for ListDiscoveredProfilesRequest
243+
* `optional_params` (*type:* `keyword()`) - Optional parameters
244+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
245+
* `:access_token` (*type:* `String.t`) - OAuth access token.
246+
* `:alt` (*type:* `String.t`) - Data format for response.
247+
* `:callback` (*type:* `String.t`) - JSONP
248+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
249+
* `: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.
250+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
251+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
252+
* `: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.
253+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
254+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
255+
* `:filter` (*type:* `String.t`) - Optional. Filtering results
256+
* `:pageSize` (*type:* `integer()`) - Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
257+
* `:pageToken` (*type:* `String.t`) - Optional. A token identifying a page of results the server should return.
258+
* `opts` (*type:* `keyword()`) - Call options
259+
260+
## Returns
261+
262+
* `{:ok, %GoogleApi.WorkloadManager.V1.Model.ListDiscoveredProfilesResponse{}}` on success
263+
* `{:error, info}` on failure
264+
"""
265+
@spec workloadmanager_projects_locations_discoveredprofiles_list(
266+
Tesla.Env.client(),
267+
String.t(),
268+
keyword(),
269+
keyword()
270+
) ::
271+
{:ok, GoogleApi.WorkloadManager.V1.Model.ListDiscoveredProfilesResponse.t()}
272+
| {:ok, Tesla.Env.t()}
273+
| {:ok, list()}
274+
| {:error, any()}
275+
def workloadmanager_projects_locations_discoveredprofiles_list(
276+
connection,
277+
parent,
278+
optional_params \\ [],
279+
opts \\ []
280+
) do
281+
optional_params_config = %{
282+
:"$.xgafv" => :query,
283+
:access_token => :query,
284+
:alt => :query,
285+
:callback => :query,
286+
:fields => :query,
287+
:key => :query,
288+
:oauth_token => :query,
289+
:prettyPrint => :query,
290+
:quotaUser => :query,
291+
:uploadType => :query,
292+
:upload_protocol => :query,
293+
:filter => :query,
294+
:pageSize => :query,
295+
:pageToken => :query
296+
}
297+
298+
request =
299+
Request.new()
300+
|> Request.method(:get)
301+
|> Request.url("/v1/{+parent}/discoveredprofiles", %{
302+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
303+
})
304+
|> Request.add_optional_params(optional_params_config, optional_params)
305+
|> Request.library_version(@library_version)
306+
307+
connection
308+
|> Connection.execute(request)
309+
|> Response.decode(
310+
opts ++ [struct: %GoogleApi.WorkloadManager.V1.Model.ListDiscoveredProfilesResponse{}]
311+
)
312+
end
313+
314+
@doc """
315+
Get the health of a discovered workload profile.
316+
317+
## Parameters
318+
319+
* `connection` (*type:* `GoogleApi.WorkloadManager.V1.Connection.t`) - Connection to server
320+
* `name` (*type:* `String.t`) - Required. The resource name
321+
* `optional_params` (*type:* `keyword()`) - Optional parameters
322+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
323+
* `:access_token` (*type:* `String.t`) - OAuth access token.
324+
* `:alt` (*type:* `String.t`) - Data format for response.
325+
* `:callback` (*type:* `String.t`) - JSONP
326+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
327+
* `: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.
328+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
329+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
330+
* `: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.
331+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
332+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
333+
* `opts` (*type:* `keyword()`) - Call options
334+
335+
## Returns
336+
337+
* `{:ok, %GoogleApi.WorkloadManager.V1.Model.WorkloadProfileHealth{}}` on success
338+
* `{:error, info}` on failure
339+
"""
340+
@spec workloadmanager_projects_locations_discoveredprofiles_healthes_get(
341+
Tesla.Env.client(),
342+
String.t(),
343+
keyword(),
344+
keyword()
345+
) ::
346+
{:ok, GoogleApi.WorkloadManager.V1.Model.WorkloadProfileHealth.t()}
347+
| {:ok, Tesla.Env.t()}
348+
| {:ok, list()}
349+
| {:error, any()}
350+
def workloadmanager_projects_locations_discoveredprofiles_healthes_get(
351+
connection,
352+
name,
353+
optional_params \\ [],
354+
opts \\ []
355+
) do
356+
optional_params_config = %{
357+
:"$.xgafv" => :query,
358+
:access_token => :query,
359+
:alt => :query,
360+
:callback => :query,
361+
:fields => :query,
362+
:key => :query,
363+
:oauth_token => :query,
364+
:prettyPrint => :query,
365+
:quotaUser => :query,
366+
:uploadType => :query,
367+
:upload_protocol => :query
368+
}
369+
370+
request =
371+
Request.new()
372+
|> Request.method(:get)
373+
|> Request.url("/v1/{+name}", %{
374+
"name" => URI.encode(name, &URI.char_unreserved?/1)
375+
})
376+
|> Request.add_optional_params(optional_params_config, optional_params)
377+
|> Request.library_version(@library_version)
378+
379+
connection
380+
|> Connection.execute(request)
381+
|> Response.decode(
382+
opts ++ [struct: %GoogleApi.WorkloadManager.V1.Model.WorkloadProfileHealth{}]
383+
)
384+
end
385+
166386
@doc """
167387
Creates a new Evaluation in a given project and location.
168388

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

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

23-
@discovery_revision "20250205"
23+
@discovery_revision "20250219"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.WorkloadManager.V1.Model.APILayerServer do
19+
@moduledoc """
20+
The API layer server
21+
22+
## Attributes
23+
24+
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The api layer name
25+
* `osVersion` (*type:* `String.t`, *default:* `nil`) - Output only. OS information
26+
* `resources` (*type:* `list(GoogleApi.WorkloadManager.V1.Model.CloudResource.t)`, *default:* `nil`) - Output only. resources in the component
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:name => String.t() | nil,
33+
:osVersion => String.t() | nil,
34+
:resources => list(GoogleApi.WorkloadManager.V1.Model.CloudResource.t()) | nil
35+
}
36+
37+
field(:name)
38+
field(:osVersion)
39+
field(:resources, as: GoogleApi.WorkloadManager.V1.Model.CloudResource, type: :list)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.WorkloadManager.V1.Model.APILayerServer do
43+
def decode(value, options) do
44+
GoogleApi.WorkloadManager.V1.Model.APILayerServer.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.WorkloadManager.V1.Model.APILayerServer do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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.WorkloadManager.V1.Model.AvailabilityGroup do
19+
@moduledoc """
20+
The availability groups for sqlserver
21+
22+
## Attributes
23+
24+
* `databases` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The databases
25+
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The availability group name
26+
* `primaryServer` (*type:* `String.t`, *default:* `nil`) - Output only. The primary server
27+
* `secondaryServers` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The secondary servers
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:databases => list(String.t()) | nil,
34+
:name => String.t() | nil,
35+
:primaryServer => String.t() | nil,
36+
:secondaryServers => list(String.t()) | nil
37+
}
38+
39+
field(:databases, type: :list)
40+
field(:name)
41+
field(:primaryServer)
42+
field(:secondaryServers, type: :list)
43+
end
44+
45+
defimpl Poison.Decoder, for: GoogleApi.WorkloadManager.V1.Model.AvailabilityGroup do
46+
def decode(value, options) do
47+
GoogleApi.WorkloadManager.V1.Model.AvailabilityGroup.decode(value, options)
48+
end
49+
end
50+
51+
defimpl Poison.Encoder, for: GoogleApi.WorkloadManager.V1.Model.AvailabilityGroup do
52+
def encode(value, options) do
53+
GoogleApi.Gax.ModelBase.encode(value, options)
54+
end
55+
end

0 commit comments

Comments
 (0)