From c916d7dfa5fc07a61cb294aac2dc2bc854caced1 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Mon, 11 Mar 2024 20:12:25 -0700 Subject: [PATCH] feat: Automated regeneration of MyBusinessVerifications client (#10981) Auto-created at 2024-03-12 02:47:09 +0000 using the toys pull request generator. --- clients/my_business_verifications/README.md | 2 +- .../v1/api/verification_tokens.ex | 97 ------------------- .../my_business_verifications/v1/metadata.ex | 2 +- .../generate_verification_token_request.ex | 51 ---------- .../generate_verification_token_response.ex | 51 ---------- .../v1/model/location.ex | 58 ----------- .../v1/model/verification.ex | 3 + .../v1/model/verification_option.ex | 3 + clients/my_business_verifications/mix.exs | 2 +- 9 files changed, 9 insertions(+), 260 deletions(-) delete mode 100644 clients/my_business_verifications/lib/google_api/my_business_verifications/v1/api/verification_tokens.ex delete mode 100644 clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_request.ex delete mode 100644 clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_response.ex delete mode 100644 clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/location.ex diff --git a/clients/my_business_verifications/README.md b/clients/my_business_verifications/README.md index 23fd65204e..a244e17239 100644 --- a/clients/my_business_verifications/README.md +++ b/clients/my_business_verifications/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_my_business_verifications, "~> 0.3"}] + [{:google_api_my_business_verifications, "~> 0.4"}] end ``` diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/api/verification_tokens.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/api/verification_tokens.ex deleted file mode 100644 index 7226f4ddb0..0000000000 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/api/verification_tokens.ex +++ /dev/null @@ -1,97 +0,0 @@ -# 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.MyBusinessVerifications.V1.Api.VerificationTokens do - @moduledoc """ - API calls for all endpoints tagged `VerificationTokens`. - """ - - alias GoogleApi.MyBusinessVerifications.V1.Connection - alias GoogleApi.Gax.{Request, Response} - - @library_version Mix.Project.config() |> Keyword.get(:version, "") - - @doc """ - Generates a token for the provided location data as a vetted [partner](https://support.google.com/business/answer/7674102). Throws PERMISSION_DENIED if the caller is not a vetted partner account. Throws FAILED_PRECONDITION if the caller's VettedStatus is INVALID. - - ## Parameters - - * `connection` (*type:* `GoogleApi.MyBusinessVerifications.V1.Connection.t`) - Connection to server - * `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.MyBusinessVerifications.V1.Model.GenerateVerificationTokenRequest.t`) - - * `opts` (*type:* `keyword()`) - Call options - - ## Returns - - * `{:ok, %GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse{}}` on success - * `{:error, info}` on failure - """ - @spec mybusinessverifications_verification_tokens_generate( - Tesla.Env.client(), - keyword(), - keyword() - ) :: - {:ok, GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse.t()} - | {:ok, Tesla.Env.t()} - | {:ok, list()} - | {:error, any()} - def mybusinessverifications_verification_tokens_generate( - connection, - 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(:post) - |> Request.url("/v1/verificationTokens:generate", %{}) - |> Request.add_optional_params(optional_params_config, optional_params) - |> Request.library_version(@library_version) - - connection - |> Connection.execute(request) - |> Response.decode( - opts ++ - [struct: %GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse{}] - ) - end -end diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/metadata.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/metadata.ex index 1cb4255cc7..ccca738f3a 100644 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/metadata.ex +++ b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.MyBusinessVerifications.V1 do API client metadata for GoogleApi.MyBusinessVerifications.V1. """ - @discovery_revision "20220815" + @discovery_revision "20240310" def discovery_revision(), do: @discovery_revision end diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_request.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_request.ex deleted file mode 100644 index c9ab269829..0000000000 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_request.ex +++ /dev/null @@ -1,51 +0,0 @@ -# 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.MyBusinessVerifications.V1.Model.GenerateVerificationTokenRequest do - @moduledoc """ - Request message for Verifications.GenerateVerificationToken. - - ## Attributes - - * `location` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.Location.t`, *default:* `nil`) - Required. The target location. Note: The location information should exactly match the target Location, otherwise the generated verification token won't be able to verify the target Location. - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{ - :location => GoogleApi.MyBusinessVerifications.V1.Model.Location.t() | nil - } - - field(:location, as: GoogleApi.MyBusinessVerifications.V1.Model.Location) -end - -defimpl Poison.Decoder, - for: GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenRequest do - def decode(value, options) do - GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenRequest.decode( - value, - options - ) - end -end - -defimpl Poison.Encoder, - for: GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenRequest do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_response.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_response.ex deleted file mode 100644 index 3ff9084ecd..0000000000 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/generate_verification_token_response.ex +++ /dev/null @@ -1,51 +0,0 @@ -# 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.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse do - @moduledoc """ - Response message for Verifications.GenerateVerificationToken. - - ## Attributes - - * `token` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.VerificationToken.t`, *default:* `nil`) - The generated token to verify the location. - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{ - :token => GoogleApi.MyBusinessVerifications.V1.Model.VerificationToken.t() | nil - } - - field(:token, as: GoogleApi.MyBusinessVerifications.V1.Model.VerificationToken) -end - -defimpl Poison.Decoder, - for: GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse do - def decode(value, options) do - GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse.decode( - value, - options - ) - end -end - -defimpl Poison.Encoder, - for: GoogleApi.MyBusinessVerifications.V1.Model.GenerateVerificationTokenResponse do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/location.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/location.ex deleted file mode 100644 index 1f8d94628e..0000000000 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/location.ex +++ /dev/null @@ -1,58 +0,0 @@ -# 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.MyBusinessVerifications.V1.Model.Location do - @moduledoc """ - A subset of location info. See the [help center article] (https://support.google.com/business/answer/3038177) for a detailed description of these fields, or the [category endpoint](/my-business/reference/rest/v4/categories) for a list of valid business categories. - - ## Attributes - - * `address` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.PostalAddress.t`, *default:* `nil`) - Required. A precise, accurate address to describe your business location. PO boxes or mailboxes located at remote locations are not acceptable. At this time, you can specify a maximum of five `address_lines` values in the address. - * `name` (*type:* `String.t`, *default:* `nil`) - Required. Location name should reflect your business's real-world name, as used consistently on your storefront, website, and stationery, and as known to customers. Any additional information, when relevant, can be included in other fields of the resource (for example, `Address`, `Categories`). Don't add unnecessary information to your name (for example, prefer "Google" over "Google Inc. - Mountain View Corporate Headquarters"). Don't include marketing taglines, store codes, special characters, hours or closed/open status, phone numbers, website URLs, service/product information, location/address or directions, or containment information (for example, "Chase ATM in Duane Reade"). - * `primaryCategoryId` (*type:* `String.t`, *default:* `nil`) - Required. Id of the category that best describes the core business this location engages in. e.g. gcid:bakery. - * `primaryPhone` (*type:* `String.t`, *default:* `nil`) - Optional. A phone number that connects to your individual business location as directly as possible. Use a local phone number instead of a central, call center helpline number whenever possible. - * `websiteUri` (*type:* `String.t`, *default:* `nil`) - Optional. A URL for this business. If possible, use a URL that represents this individual business location instead of a generic website/URL that represents all locations, or the brand. - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{ - :address => GoogleApi.MyBusinessVerifications.V1.Model.PostalAddress.t() | nil, - :name => String.t() | nil, - :primaryCategoryId => String.t() | nil, - :primaryPhone => String.t() | nil, - :websiteUri => String.t() | nil - } - - field(:address, as: GoogleApi.MyBusinessVerifications.V1.Model.PostalAddress) - field(:name) - field(:primaryCategoryId) - field(:primaryPhone) - field(:websiteUri) -end - -defimpl Poison.Decoder, for: GoogleApi.MyBusinessVerifications.V1.Model.Location do - def decode(value, options) do - GoogleApi.MyBusinessVerifications.V1.Model.Location.decode(value, options) - end -end - -defimpl Poison.Encoder, for: GoogleApi.MyBusinessVerifications.V1.Model.Location do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification.ex index 14bf20bad3..e6cdb644f4 100644 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification.ex +++ b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.MyBusinessVerifications.V1.Model.Verification do ## Attributes + * `announcement` (*type:* `String.t`, *default:* `nil`) - Optional. Response announcement set only if the method is VETTED_PARTNER. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp when the verification is requested. * `method` (*type:* `String.t`, *default:* `nil`) - The method of the verification. * `name` (*type:* `String.t`, *default:* `nil`) - Resource name of the verification. @@ -30,12 +31,14 @@ defmodule GoogleApi.MyBusinessVerifications.V1.Model.Verification do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :announcement => String.t() | nil, :createTime => DateTime.t() | nil, :method => String.t() | nil, :name => String.t() | nil, :state => String.t() | nil } + field(:announcement) field(:createTime, as: DateTime) field(:method) field(:name) diff --git a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification_option.ex b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification_option.ex index 2c5717b4ca..7b5039c214 100644 --- a/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification_option.ex +++ b/clients/my_business_verifications/lib/google_api/my_business_verifications/v1/model/verification_option.ex @@ -22,6 +22,7 @@ defmodule GoogleApi.MyBusinessVerifications.V1.Model.VerificationOption do ## Attributes * `addressData` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.AddressVerificationData.t`, *default:* `nil`) - Set only if the method is MAIL. + * `announcement` (*type:* `String.t`, *default:* `nil`) - Set only if the method is VETTED_PARTNER. * `emailData` (*type:* `GoogleApi.MyBusinessVerifications.V1.Model.EmailVerificationData.t`, *default:* `nil`) - Set only if the method is EMAIL. * `phoneNumber` (*type:* `String.t`, *default:* `nil`) - Set only if the method is PHONE_CALL or SMS. Phone number that the PIN will be sent to. * `verificationMethod` (*type:* `String.t`, *default:* `nil`) - Method to verify the location. @@ -32,6 +33,7 @@ defmodule GoogleApi.MyBusinessVerifications.V1.Model.VerificationOption do @type t :: %__MODULE__{ :addressData => GoogleApi.MyBusinessVerifications.V1.Model.AddressVerificationData.t() | nil, + :announcement => String.t() | nil, :emailData => GoogleApi.MyBusinessVerifications.V1.Model.EmailVerificationData.t() | nil, :phoneNumber => String.t() | nil, @@ -39,6 +41,7 @@ defmodule GoogleApi.MyBusinessVerifications.V1.Model.VerificationOption do } field(:addressData, as: GoogleApi.MyBusinessVerifications.V1.Model.AddressVerificationData) + field(:announcement) field(:emailData, as: GoogleApi.MyBusinessVerifications.V1.Model.EmailVerificationData) field(:phoneNumber) field(:verificationMethod) diff --git a/clients/my_business_verifications/mix.exs b/clients/my_business_verifications/mix.exs index 91a5e32087..7c962df9f9 100644 --- a/clients/my_business_verifications/mix.exs +++ b/clients/my_business_verifications/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.MyBusinessVerifications.Mixfile do use Mix.Project - @version "0.3.1" + @version "0.4.0" def project() do [