From ba401d55ace1f7dfc4d65846281845e0443657d4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 02:33:16 +0000 Subject: [PATCH] feat: Automated regeneration of MyBusinessBusinessInformation client --- .../README.md | 4 +- .../v1/api/locations.ex | 148 ------------------ .../v1/metadata.ex | 2 +- .../v1/model/associate_location_request.ex | 51 ------ .../clear_location_association_request.ex | 46 ------ .../v1/model/list_locations_response.ex | 2 +- .../v1/model/location.ex | 2 +- .../my_business_business_information/mix.exs | 4 +- 8 files changed, 7 insertions(+), 252 deletions(-) delete mode 100644 clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/associate_location_request.ex delete mode 100644 clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/clear_location_association_request.ex diff --git a/clients/my_business_business_information/README.md b/clients/my_business_business_information/README.md index d2a045613c..a10e58c086 100644 --- a/clients/my_business_business_information/README.md +++ b/clients/my_business_business_information/README.md @@ -2,7 +2,7 @@ My Business Business Information API client library. -The My Business Business Information API provides an interface for managing business information on Google. +The My Business Business Information API provides an interface for managing business information. Note - If you have a quota of 0 after enabling the API, please request for GBP API access. ## Installation @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_my_business_business_information, "~> 0.3"}] + [{:google_api_my_business_business_information, "~> 0.4"}] end ``` diff --git a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/api/locations.ex b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/api/locations.ex index fc12e78960..f3169f8824 100644 --- a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/api/locations.ex +++ b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/api/locations.ex @@ -25,154 +25,6 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1.Api.Locations do @library_version Mix.Project.config() |> Keyword.get(:version, "") - @doc """ - Associates a location to a place ID. Any previous association is overwritten. This operation is only valid if the location is unverified. The association must be valid, that is, it appears in the list of `SearchGoogleLocations`. - - ## Parameters - - * `connection` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The resource name of the location to associate. - * `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.MyBusinessBusinessInformation.V1.Model.AssociateLocationRequest.t`) - - * `opts` (*type:* `keyword()`) - Call options - - ## Returns - - * `{:ok, %GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty{}}` on success - * `{:error, info}` on failure - """ - @spec mybusinessbusinessinformation_locations_associate( - Tesla.Env.client(), - String.t(), - keyword(), - keyword() - ) :: - {:ok, GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty.t()} - | {:ok, Tesla.Env.t()} - | {:ok, list()} - | {:error, any()} - def mybusinessbusinessinformation_locations_associate( - 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(:post) - |> Request.url("/v1/{+name}:associate", %{ - "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.MyBusinessBusinessInformation.V1.Model.Empty{}] - ) - end - - @doc """ - Clears an association between a location and its place ID. This operation is only valid if the location is unverified. - - ## Parameters - - * `connection` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The resource name of the location to disassociate. - * `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.MyBusinessBusinessInformation.V1.Model.ClearLocationAssociationRequest.t`) - - * `opts` (*type:* `keyword()`) - Call options - - ## Returns - - * `{:ok, %GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty{}}` on success - * `{:error, info}` on failure - """ - @spec mybusinessbusinessinformation_locations_clear_location_association( - Tesla.Env.client(), - String.t(), - keyword(), - keyword() - ) :: - {:ok, GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty.t()} - | {:ok, Tesla.Env.t()} - | {:ok, list()} - | {:error, any()} - def mybusinessbusinessinformation_locations_clear_location_association( - 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(:post) - |> Request.url("/v1/{+name}:clearLocationAssociation", %{ - "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.MyBusinessBusinessInformation.V1.Model.Empty{}] - ) - end - @doc """ Deletes a location. If this location cannot be deleted using the API and it is marked so in the `google.mybusiness.businessinformation.v1.LocationState`, use the [Google Business Profile](https://business.google.com/manage/) website. diff --git a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/metadata.ex b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/metadata.ex index 1959d89edf..552ecc6c2b 100644 --- a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/metadata.ex +++ b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1 do API client metadata for GoogleApi.MyBusinessBusinessInformation.V1. """ - @discovery_revision "20220628" + @discovery_revision "20240310" def discovery_revision(), do: @discovery_revision end diff --git a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/associate_location_request.ex b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/associate_location_request.ex deleted file mode 100644 index a74cb5d781..0000000000 --- a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/associate_location_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.MyBusinessBusinessInformation.V1.Model.AssociateLocationRequest do - @moduledoc """ - Request message for Locations.AssociateLocationRequest. - - ## Attributes - - * `placeId` (*type:* `String.t`, *default:* `nil`) - The association to establish. If not set, it indicates no match. - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{ - :placeId => String.t() | nil - } - - field(:placeId) -end - -defimpl Poison.Decoder, - for: GoogleApi.MyBusinessBusinessInformation.V1.Model.AssociateLocationRequest do - def decode(value, options) do - GoogleApi.MyBusinessBusinessInformation.V1.Model.AssociateLocationRequest.decode( - value, - options - ) - end -end - -defimpl Poison.Encoder, - for: GoogleApi.MyBusinessBusinessInformation.V1.Model.AssociateLocationRequest do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/clear_location_association_request.ex b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/clear_location_association_request.ex deleted file mode 100644 index 769c0b3bb0..0000000000 --- a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/clear_location_association_request.ex +++ /dev/null @@ -1,46 +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.MyBusinessBusinessInformation.V1.Model.ClearLocationAssociationRequest do - @moduledoc """ - Request message for Locations.ClearLocationAssociationRequest. - - ## Attributes - - """ - - use GoogleApi.Gax.ModelBase - - @type t :: %__MODULE__{} -end - -defimpl Poison.Decoder, - for: GoogleApi.MyBusinessBusinessInformation.V1.Model.ClearLocationAssociationRequest do - def decode(value, options) do - GoogleApi.MyBusinessBusinessInformation.V1.Model.ClearLocationAssociationRequest.decode( - value, - options - ) - end -end - -defimpl Poison.Encoder, - for: GoogleApi.MyBusinessBusinessInformation.V1.Model.ClearLocationAssociationRequest do - def encode(value, options) do - GoogleApi.Gax.ModelBase.encode(value, options) - end -end diff --git a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/list_locations_response.ex b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/list_locations_response.ex index 2c2c8c94a7..a0214f134d 100644 --- a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/list_locations_response.ex +++ b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/list_locations_response.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1.Model.ListLocationsResponse * `locations` (*type:* `list(GoogleApi.MyBusinessBusinessInformation.V1.Model.Location.t)`, *default:* `nil`) - The locations. * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If the number of locations exceeded the requested page size, this field is populated with a token to fetch the next page of locations on a subsequent call to `ListLocations`. If there are no more locations, this field is not present in the response. - * `totalSize` (*type:* `integer()`, *default:* `nil`) - The approximate number of Locations in the list irrespective of pagination. + * `totalSize` (*type:* `integer()`, *default:* `nil`) - The approximate number of Locations in the list irrespective of pagination. This field will only be returned if `filter` is used as a query parameter. """ use GoogleApi.Gax.ModelBase diff --git a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/location.ex b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/location.ex index 68ddbcb344..c0dbd80a97 100644 --- a/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/location.ex +++ b/clients/my_business_business_information/lib/google_api/my_business_business_information/v1/model/location.ex @@ -38,7 +38,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1.Model.Location do * `serviceItems` (*type:* `list(GoogleApi.MyBusinessBusinessInformation.V1.Model.ServiceItem.t)`, *default:* `nil`) - Optional. List of services supported by merchants. A service can be haircut, install water heater, etc. Duplicated service items will be removed automatically. * `specialHours` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Model.SpecialHours.t`, *default:* `nil`) - Optional. Special hours for the business. This typically includes holiday hours, and other times outside of regular operating hours. These override regular business hours. This field cannot be set without regular hours. * `storeCode` (*type:* `String.t`, *default:* `nil`) - Optional. External identifier for this location, which must be unique within a given account. This is a means of associating the location with your own records. - * `storefrontAddress` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Model.PostalAddress.t`, *default:* `nil`) - Optional. 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. This field should only be set for businesses that have a storefront. This field should not be set for locations of type `CUSTOMER_LOCATION_ONLY`. + * `storefrontAddress` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Model.PostalAddress.t`, *default:* `nil`) - Optional. 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. This field should only be set for businesses that have a storefront. This field should not be set for locations of type `CUSTOMER_LOCATION_ONLY` but if set, any value provided will be discarded. * `title` (*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"). * `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. """ diff --git a/clients/my_business_business_information/mix.exs b/clients/my_business_business_information/mix.exs index cbf4b5dea2..e84d8b5fe0 100644 --- a/clients/my_business_business_information/mix.exs +++ b/clients/my_business_business_information/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.Mixfile do use Mix.Project - @version "0.3.3" + @version "0.4.0" def project() do [ @@ -48,7 +48,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.Mixfile do defp description() do """ - My Business Business Information API client library. The My Business Business Information API provides an interface for managing business information on Google. + My Business Business Information API client library. The My Business Business Information API provides an interface for managing business information. Note - If you have a quota of 0 after enabling the API, please request for GBP API access. """ end