From cd442ed5064de82ab487fd32ad9be10b84925db4 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:28:53 -0700 Subject: [PATCH] feat: Automated regeneration of Retail client (#12434) Auto-created at 2024-10-30 13:13:05 +0000 using the toys pull request generator. --- clients/retail/README.md | 2 +- .../lib/google_api/retail/v2/metadata.ex | 2 +- ...le_cloud_retail_v2_pin_control_metadata.ex | 66 +++++++++++++++++++ ...il_v2_pin_control_metadata_product_pins.ex | 51 ++++++++++++++ .../google_cloud_retail_v2_search_response.ex | 4 ++ clients/retail/mix.exs | 2 +- 6 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata.ex create mode 100644 clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata_product_pins.ex diff --git a/clients/retail/README.md b/clients/retail/README.md index 53ee385ece..e9c787ce48 100644 --- a/clients/retail/README.md +++ b/clients/retail/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_retail, "~> 0.17"}] + [{:google_api_retail, "~> 0.18"}] end ``` diff --git a/clients/retail/lib/google_api/retail/v2/metadata.ex b/clients/retail/lib/google_api/retail/v2/metadata.ex index 2147bb95e3..2ed91ed080 100644 --- a/clients/retail/lib/google_api/retail/v2/metadata.ex +++ b/clients/retail/lib/google_api/retail/v2/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Retail.V2 do API client metadata for GoogleApi.Retail.V2. """ - @discovery_revision "20241017" + @discovery_revision "20241024" def discovery_revision(), do: @discovery_revision end diff --git a/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata.ex b/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata.ex new file mode 100644 index 0000000000..f661442f02 --- /dev/null +++ b/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata.ex @@ -0,0 +1,66 @@ +# 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.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata do + @moduledoc """ + Metadata for pinning to be returned in the response. This is used for distinguishing between applied vs dropped pins. + + ## Attributes + + * `allMatchedPins` (*type:* `%{optional(String.t) => GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t}`, *default:* `nil`) - Map of all matched pins, keyed by pin position. + * `droppedPins` (*type:* `%{optional(String.t) => GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t}`, *default:* `nil`) - Map of pins that were dropped due to overlap with other matching pins, keyed by pin position. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :allMatchedPins => + %{ + optional(String.t()) => + GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t() + } + | nil, + :droppedPins => + %{ + optional(String.t()) => + GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.t() + } + | nil + } + + field(:allMatchedPins, + as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins, + type: :map + ) + + field(:droppedPins, + as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins, + type: :map + ) +end + +defimpl Poison.Decoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata do + def decode(value, options) do + GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata_product_pins.ex b/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata_product_pins.ex new file mode 100644 index 0000000000..f6a03e752a --- /dev/null +++ b/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_pin_control_metadata_product_pins.ex @@ -0,0 +1,51 @@ +# 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.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins do + @moduledoc """ + List of product ids which have associated pins. + + ## Attributes + + * `productId` (*type:* `list(String.t)`, *default:* `nil`) - List of product ids which have associated pins. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :productId => list(String.t()) | nil + } + + field(:productId, type: :list) +end + +defimpl Poison.Decoder, + for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins do + def decode(value, options) do + GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadataProductPins do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_search_response.ex b/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_search_response.ex index 248d2bac16..43c0b7393c 100644 --- a/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_search_response.ex +++ b/clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_search_response.ex @@ -29,6 +29,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponse do * `facets` (*type:* `list(GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseFacet.t)`, *default:* `nil`) - Results of facets requested by user. * `invalidConditionBoostSpecs` (*type:* `list(GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec.t)`, *default:* `nil`) - The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving. * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `pinControlMetadata` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata.t`, *default:* `nil`) - Metadata for pin controls which were applicable to the request. This contains two map fields, one for all matched pins and one for pins which were matched but not applied. The two maps are keyed by pin position, and the values are the product ids which were matched to that pin. * `queryExpansionInfo` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseQueryExpansionInfo.t`, *default:* `nil`) - Query expansion information for the returned results. * `redirectUri` (*type:* `String.t`, *default:* `nil`) - The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. * `results` (*type:* `list(GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseSearchResult.t)`, *default:* `nil`) - A list of matched items. The order represents the ranking. @@ -55,6 +56,8 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponse do ) | nil, :nextPageToken => String.t() | nil, + :pinControlMetadata => + GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata.t() | nil, :queryExpansionInfo => GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseQueryExpansionInfo.t() | nil, @@ -90,6 +93,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponse do ) field(:nextPageToken) + field(:pinControlMetadata, as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2PinControlMetadata) field(:queryExpansionInfo, as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2SearchResponseQueryExpansionInfo diff --git a/clients/retail/mix.exs b/clients/retail/mix.exs index 03e30f4546..fd6c85771f 100644 --- a/clients/retail/mix.exs +++ b/clients/retail/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.Retail.Mixfile do use Mix.Project - @version "0.17.0" + @version "0.18.0" def project() do [