Skip to content

Commit

Permalink
feat: Automated regeneration of WorkloadManager client (#13028)
Browse files Browse the repository at this point in the history
Auto-created at 2025-02-24 13:16:51 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Feb 24, 2025
1 parent bd9bcf4 commit 2217c4b
Show file tree
Hide file tree
Showing 27 changed files with 1,594 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,226 @@ defmodule GoogleApi.WorkloadManager.V1.Api.Projects do
)
end

@doc """
Gets details of a discovered workload profile.
## Parameters
* `connection` (*type:* `GoogleApi.WorkloadManager.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. Name of the 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.WorkloadManager.V1.Model.WorkloadProfile{}}` on success
* `{:error, info}` on failure
"""
@spec workloadmanager_projects_locations_discoveredprofiles_get(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.WorkloadManager.V1.Model.WorkloadProfile.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def workloadmanager_projects_locations_discoveredprofiles_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.WorkloadManager.V1.Model.WorkloadProfile{}])
end

@doc """
List discovered workload profiles
## Parameters
* `connection` (*type:* `GoogleApi.WorkloadManager.V1.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. Parent value for ListDiscoveredProfilesRequest
* `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`) - Optional. Filtering results
* `:pageSize` (*type:* `integer()`) - Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
* `:pageToken` (*type:* `String.t`) - Optional. A token identifying a page of results the server should return.
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.WorkloadManager.V1.Model.ListDiscoveredProfilesResponse{}}` on success
* `{:error, info}` on failure
"""
@spec workloadmanager_projects_locations_discoveredprofiles_list(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.WorkloadManager.V1.Model.ListDiscoveredProfilesResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def workloadmanager_projects_locations_discoveredprofiles_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,
:pageSize => :query,
:pageToken => :query
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/{+parent}/discoveredprofiles", %{
"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.WorkloadManager.V1.Model.ListDiscoveredProfilesResponse{}]
)
end

@doc """
Get the health of a discovered workload profile.
## Parameters
* `connection` (*type:* `GoogleApi.WorkloadManager.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The resource name
* `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.WorkloadManager.V1.Model.WorkloadProfileHealth{}}` on success
* `{:error, info}` on failure
"""
@spec workloadmanager_projects_locations_discoveredprofiles_healthes_get(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.WorkloadManager.V1.Model.WorkloadProfileHealth.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def workloadmanager_projects_locations_discoveredprofiles_healthes_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.WorkloadManager.V1.Model.WorkloadProfileHealth{}]
)
end

@doc """
Creates a new Evaluation in a given project and location.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.WorkloadManager.V1 do
API client metadata for GoogleApi.WorkloadManager.V1.
"""

@discovery_revision "20250205"
@discovery_revision "20250219"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -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.WorkloadManager.V1.Model.APILayerServer do
@moduledoc """
The API layer server
## Attributes
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The api layer name
* `osVersion` (*type:* `String.t`, *default:* `nil`) - Output only. OS information
* `resources` (*type:* `list(GoogleApi.WorkloadManager.V1.Model.CloudResource.t)`, *default:* `nil`) - Output only. resources in the component
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:name => String.t() | nil,
:osVersion => String.t() | nil,
:resources => list(GoogleApi.WorkloadManager.V1.Model.CloudResource.t()) | nil
}

field(:name)
field(:osVersion)
field(:resources, as: GoogleApi.WorkloadManager.V1.Model.CloudResource, type: :list)
end

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

defimpl Poison.Encoder, for: GoogleApi.WorkloadManager.V1.Model.APILayerServer 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,55 @@
# 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.WorkloadManager.V1.Model.AvailabilityGroup do
@moduledoc """
The availability groups for sqlserver
## Attributes
* `databases` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The databases
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The availability group name
* `primaryServer` (*type:* `String.t`, *default:* `nil`) - Output only. The primary server
* `secondaryServers` (*type:* `list(String.t)`, *default:* `nil`) - Output only. The secondary servers
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:databases => list(String.t()) | nil,
:name => String.t() | nil,
:primaryServer => String.t() | nil,
:secondaryServers => list(String.t()) | nil
}

field(:databases, type: :list)
field(:name)
field(:primaryServer)
field(:secondaryServers, type: :list)
end

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

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

0 comments on commit 2217c4b

Please sign in to comment.