From 588bd8e681dc7fed4c37e8ca29de73223bc8fad9 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 3 Apr 2024 06:14:16 -0700 Subject: [PATCH] feat: Automated regeneration of AdvisoryNotifications client (#11251) Auto-created at 2024-04-03 13:12:10 +0000 using the toys pull request generator. --- clients/advisory_notifications/README.md | 2 +- .../v1/api/organizations.ex | 6 +- .../advisory_notifications/v1/api/projects.ex | 158 +++++++++++++++++- .../advisory_notifications/v1/metadata.ex | 2 +- ...cloud_advisorynotifications_v1_settings.ex | 2 +- clients/advisory_notifications/mix.exs | 2 +- 6 files changed, 164 insertions(+), 8 deletions(-) diff --git a/clients/advisory_notifications/README.md b/clients/advisory_notifications/README.md index 105df92a0d..9e08c4940e 100644 --- a/clients/advisory_notifications/README.md +++ b/clients/advisory_notifications/README.md @@ -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 ``` diff --git a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/organizations.ex b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/organizations.ex index 5613963e3e..5e6c363b7c 100644 --- a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/organizations.ex +++ b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/organizations.ex @@ -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. @@ -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. @@ -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. diff --git a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/projects.ex b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/projects.ex index c9706a523f..548e30b4c4 100644 --- a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/projects.ex +++ b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/api/projects.ex @@ -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. @@ -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. diff --git a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/metadata.ex b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/metadata.ex index 84d504badb..d899edb3de 100644 --- a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/metadata.ex +++ b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/metadata.ex @@ -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 diff --git a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/model/google_cloud_advisorynotifications_v1_settings.ex b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/model/google_cloud_advisorynotifications_v1_settings.ex index 8827b2d620..f77ad228e4 100644 --- a/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/model/google_cloud_advisorynotifications_v1_settings.ex +++ b/clients/advisory_notifications/lib/google_api/advisory_notifications/v1/model/google_cloud_advisorynotifications_v1_settings.ex @@ -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. """ diff --git a/clients/advisory_notifications/mix.exs b/clients/advisory_notifications/mix.exs index 5d01191b6b..618499237c 100644 --- a/clients/advisory_notifications/mix.exs +++ b/clients/advisory_notifications/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.AdvisoryNotifications.Mixfile do use Mix.Project - @version "0.2.0" + @version "0.3.0" def project() do [