Skip to content

Commit 9bc01b3

Browse files
feat: Automated regeneration of Retail client (googleapis#12786)
Auto-created at 2025-01-08 13:16:04 +0000 using the toys pull request generator.
1 parent a197341 commit 9bc01b3

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

clients/retail/lib/google_api/retail/v2/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Retail.V2 do
2020
API client metadata for GoogleApi.Retail.V2.
2121
"""
2222

23-
@discovery_revision "20241231"
23+
@discovery_revision "20250107"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/retail/lib/google_api/retail/v2/model/google_cloud_retail_v2_rule.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2Rule do
2828
* `forceReturnFacetAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleForceReturnFacetAction.t`, *default:* `nil`) - Force returns an attribute as a facet in the request.
2929
* `ignoreAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleIgnoreAction.t`, *default:* `nil`) - Ignores specific terms from query during search.
3030
* `onewaySynonymsAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleOnewaySynonymsAction.t`, *default:* `nil`) - Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term.
31+
* `pinAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction.t`, *default:* `nil`) - Pins one or more specified products to a specific position in the results.
3132
* `redirectAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleRedirectAction.t`, *default:* `nil`) - Redirects a shopper to a specific page.
3233
* `removeFacetAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleRemoveFacetAction.t`, *default:* `nil`) - Remove an attribute as a facet in the request (if present).
3334
* `replacementAction` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleReplacementAction.t`, *default:* `nil`) - Replaces specific terms in the query.
@@ -49,6 +50,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2Rule do
4950
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleIgnoreAction.t() | nil,
5051
:onewaySynonymsAction =>
5152
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleOnewaySynonymsAction.t() | nil,
53+
:pinAction => GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction.t() | nil,
5254
:redirectAction =>
5355
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleRedirectAction.t() | nil,
5456
:removeFacetAction =>
@@ -78,6 +80,7 @@ defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2Rule do
7880
as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleOnewaySynonymsAction
7981
)
8082

83+
field(:pinAction, as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction)
8184
field(:redirectAction, as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleRedirectAction)
8285

8386
field(:removeFacetAction, as: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RuleRemoveFacetAction)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction do
19+
@moduledoc """
20+
Pins one or more specified products to a specific position in the results. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: mapping of `[pin_position, product_id]` pairs (pin position uses 1-based indexing). * Action Result: Will pin products with matching ids to the position specified in the final result order. Example: Suppose the query is `shoes`, the Condition.query_terms is `shoes` and the pin_map has `{1, "pid1"}`, then product with `pid1` will be pinned to the top position in the final results. If multiple PinActions are matched to a single request the actions will be processed from most to least recently updated. Pins to positions larger than the max allowed page size of 120 are not allowed.
21+
22+
## Attributes
23+
24+
* `pinMap` (*type:* `map()`, *default:* `nil`) - Required. A map of positions to product_ids. Partial matches per action are allowed, if a certain position in the map is already filled that `[position, product_id]` pair will be ignored but the rest may still be applied. This case will only occur if multiple pin actions are matched to a single request, as the map guarantees that pin positions are unique within the same action. Duplicate product_ids are not permitted within a single pin map. The max size of this map is 120, equivalent to the max [request page size](https://cloud.google.com/retail/docs/reference/rest/v2/projects.locations.catalogs.placements/search#request-body).
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:pinMap => map() | nil
31+
}
32+
33+
field(:pinMap, type: :map)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction do
37+
def decode(value, options) do
38+
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2RulePinAction do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end

0 commit comments

Comments
 (0)