Skip to content

Commit

Permalink
feat: Automated regeneration of AdvisoryNotifications client (#11251)
Browse files Browse the repository at this point in the history
Auto-created at 2024-04-03 13:12:10 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Apr 3, 2024
1 parent b8bff8d commit 588bd8e
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clients/advisory_notifications/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_advisory_notifications, "~> 0.2"}]
[{:google_api_advisory_notifications, "~> 0.3"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule GoogleApi.AdvisoryNotifications.V1.Api.Organizations do
## Parameters
* `connection` (*type:* `GoogleApi.AdvisoryNotifications.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.
* `name` (*type:* `String.t`) - Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -108,7 +108,7 @@ defmodule GoogleApi.AdvisoryNotifications.V1.Api.Organizations do
## Parameters
* `connection` (*type:* `GoogleApi.AdvisoryNotifications.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.
* `name` (*type:* `String.t`) - Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down Expand Up @@ -266,7 +266,7 @@ defmodule GoogleApi.AdvisoryNotifications.V1.Api.Organizations do
## Parameters
* `connection` (*type:* `GoogleApi.AdvisoryNotifications.V1.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}"
* `parent` (*type:* `String.t`) - Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}".
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,162 @@ defmodule GoogleApi.AdvisoryNotifications.V1.Api.Projects do

@library_version Mix.Project.config() |> Keyword.get(:version, "")

@doc """
Get notification settings.
## Parameters
* `connection` (*type:* `GoogleApi.AdvisoryNotifications.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.
* `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.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings{}}` on success
* `{:error, info}` on failure
"""
@spec advisorynotifications_projects_locations_get_settings(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok,
GoogleApi.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def advisorynotifications_projects_locations_get_settings(
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.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings{}
]
)
end

@doc """
Update notification settings.
## Parameters
* `connection` (*type:* `GoogleApi.AdvisoryNotifications.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.
* `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.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings.t`) -
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings{}}` on success
* `{:error, info}` on failure
"""
@spec advisorynotifications_projects_locations_update_settings(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok,
GoogleApi.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def advisorynotifications_projects_locations_update_settings(
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(:patch)
|> 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.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1Settings{}
]
)
end

@doc """
Gets a notification.
Expand Down Expand Up @@ -110,7 +266,7 @@ defmodule GoogleApi.AdvisoryNotifications.V1.Api.Projects do
## Parameters
* `connection` (*type:* `GoogleApi.AdvisoryNotifications.V1.Connection.t`) - Connection to server
* `parent` (*type:* `String.t`) - Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}"
* `parent` (*type:* `String.t`) - Required. The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}".
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.AdvisoryNotifications.V1 do
API client metadata for GoogleApi.AdvisoryNotifications.V1.
"""

@discovery_revision "20240303"
@discovery_revision "20240331"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule GoogleApi.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificati
## Attributes
* `etag` (*type:* `String.t`, *default:* `nil`) - Required. Fingerprint for optimistic concurrency returned in Get requests. Must be provided for Update requests. If the value provided does not match the value known to the server, ABORTED will be thrown, and the client should retry the read-modify-write cycle.
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings or projects/{projects}/locations/{location}/settings.
* `notificationSettings` (*type:* `%{optional(String.t) => GoogleApi.AdvisoryNotifications.V1.Model.GoogleCloudAdvisorynotificationsV1NotificationSettings.t}`, *default:* `nil`) - Required. Map of each notification type and its settings to get/set all settings at once. The server will validate the value for each notification type.
"""

Expand Down
2 changes: 1 addition & 1 deletion clients/advisory_notifications/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.AdvisoryNotifications.Mixfile do
use Mix.Project

@version "0.2.0"
@version "0.3.0"

def project() do
[
Expand Down

0 comments on commit 588bd8e

Please sign in to comment.