google-apis-retail_v2beta 0.24.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -1090,35 +1090,6 @@ module Google
|
|
1090
1090
|
end
|
1091
1091
|
end
|
1092
1092
|
|
1093
|
-
# Metadata related to the progress of the SetLocalInventories operation.
|
1094
|
-
# Currently empty because there is no meaningful metadata populated from the
|
1095
|
-
# SetLocalInventories method.
|
1096
|
-
class GoogleCloudRetailV2alphaSetLocalInventoriesMetadata
|
1097
|
-
include Google::Apis::Core::Hashable
|
1098
|
-
|
1099
|
-
def initialize(**args)
|
1100
|
-
update!(**args)
|
1101
|
-
end
|
1102
|
-
|
1103
|
-
# Update properties of this object
|
1104
|
-
def update!(**args)
|
1105
|
-
end
|
1106
|
-
end
|
1107
|
-
|
1108
|
-
# Response of the SetLocalInventories API. Currently empty because there is no
|
1109
|
-
# meaningful response populated from the SetLocalInventories method.
|
1110
|
-
class GoogleCloudRetailV2alphaSetLocalInventoriesResponse
|
1111
|
-
include Google::Apis::Core::Hashable
|
1112
|
-
|
1113
|
-
def initialize(**args)
|
1114
|
-
update!(**args)
|
1115
|
-
end
|
1116
|
-
|
1117
|
-
# Update properties of this object
|
1118
|
-
def update!(**args)
|
1119
|
-
end
|
1120
|
-
end
|
1121
|
-
|
1122
1093
|
# A summary of import result. The UserEventImportSummary summarizes the import
|
1123
1094
|
# status for user events.
|
1124
1095
|
class GoogleCloudRetailV2alphaUserEventImportSummary
|
@@ -1146,6 +1117,26 @@ module Google
|
|
1146
1117
|
end
|
1147
1118
|
end
|
1148
1119
|
|
1120
|
+
# Request for AddControl method.
|
1121
|
+
class GoogleCloudRetailV2betaAddControlRequest
|
1122
|
+
include Google::Apis::Core::Hashable
|
1123
|
+
|
1124
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog as
|
1125
|
+
# the serving config - if id is not found a NOT_FOUND error is returned.
|
1126
|
+
# Corresponds to the JSON property `controlId`
|
1127
|
+
# @return [String]
|
1128
|
+
attr_accessor :control_id
|
1129
|
+
|
1130
|
+
def initialize(**args)
|
1131
|
+
update!(**args)
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# Update properties of this object
|
1135
|
+
def update!(**args)
|
1136
|
+
@control_id = args[:control_id] if args.key?(:control_id)
|
1137
|
+
end
|
1138
|
+
end
|
1139
|
+
|
1149
1140
|
# Metadata related to the progress of the AddFulfillmentPlaces operation.
|
1150
1141
|
# Currently empty because there is no meaningful metadata populated from the
|
1151
1142
|
# AddFulfillmentPlaces method.
|
@@ -1279,7 +1270,11 @@ module Google
|
|
1279
1270
|
# Importing catalog data from Merchant Center](https://cloud.google.com/retail/
|
1280
1271
|
# recommendations-ai/docs/upload-catalog#mc). Supported values for user events
|
1281
1272
|
# imports: * `user_event` (default): One JSON UserEvent per line. * `
|
1282
|
-
# user_event_ga360`:
|
1273
|
+
# user_event_ga360`: The schema is available here: https://support.google.com/
|
1274
|
+
# analytics/answer/3437719. * `user_event_ga4`: This feature is in private
|
1275
|
+
# preview. Please contact the support team for importing Google Analytics 4
|
1276
|
+
# events. The schema is available here: https://support.google.com/analytics/
|
1277
|
+
# answer/7029846.
|
1283
1278
|
# Corresponds to the JSON property `dataSchema`
|
1284
1279
|
# @return [String]
|
1285
1280
|
attr_accessor :data_schema
|
@@ -1301,10 +1296,10 @@ module Google
|
|
1301
1296
|
# day and time zone are either specified elsewhere or are insignificant. The
|
1302
1297
|
# date is relative to the Gregorian Calendar. This can represent one of the
|
1303
1298
|
# following: * A full date, with non-zero year, month, and day values * A month
|
1304
|
-
# and day
|
1305
|
-
#
|
1306
|
-
#
|
1307
|
-
# google.protobuf.Timestamp
|
1299
|
+
# and day, with a zero year (e.g., an anniversary) * A year on its own, with a
|
1300
|
+
# zero month and a zero day * A year and month, with a zero day (e.g., a credit
|
1301
|
+
# card expiration date) Related types: * google.type.TimeOfDay * google.type.
|
1302
|
+
# DateTime * google.protobuf.Timestamp
|
1308
1303
|
# Corresponds to the JSON property `partitionDate`
|
1309
1304
|
# @return [Google::Apis::RetailV2beta::GoogleTypeDate]
|
1310
1305
|
attr_accessor :partition_date
|
@@ -1549,14 +1544,163 @@ module Google
|
|
1549
1544
|
end
|
1550
1545
|
end
|
1551
1546
|
|
1547
|
+
# Metadata that is used to define a condition that triggers an action. A valid
|
1548
|
+
# condition must specify at least one of 'query_terms' or 'products_filter'. If
|
1549
|
+
# multiple fields are specified, the condition is met if all the fields are
|
1550
|
+
# satisfied e.g. if a set of query terms and product_filter are set, then only
|
1551
|
+
# items matching the product_filter for requests with a query matching the query
|
1552
|
+
# terms wil get boosted.
|
1553
|
+
class GoogleCloudRetailV2betaCondition
|
1554
|
+
include Google::Apis::Core::Hashable
|
1555
|
+
|
1556
|
+
# Range of time(s) specifying when Condition is active. Condition true if any
|
1557
|
+
# time range matches.
|
1558
|
+
# Corresponds to the JSON property `activeTimeRange`
|
1559
|
+
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConditionTimeRange>]
|
1560
|
+
attr_accessor :active_time_range
|
1561
|
+
|
1562
|
+
# A list (up to 10 entries) of terms to match the query on. If not specified,
|
1563
|
+
# match all queries. If many query terms are specified, the condition is matched
|
1564
|
+
# if any of the terms is a match (i.e. using the OR operator).
|
1565
|
+
# Corresponds to the JSON property `queryTerms`
|
1566
|
+
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaConditionQueryTerm>]
|
1567
|
+
attr_accessor :query_terms
|
1568
|
+
|
1569
|
+
def initialize(**args)
|
1570
|
+
update!(**args)
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
# Update properties of this object
|
1574
|
+
def update!(**args)
|
1575
|
+
@active_time_range = args[:active_time_range] if args.key?(:active_time_range)
|
1576
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
1577
|
+
end
|
1578
|
+
end
|
1579
|
+
|
1580
|
+
# Query terms that we want to match on.
|
1581
|
+
class GoogleCloudRetailV2betaConditionQueryTerm
|
1582
|
+
include Google::Apis::Core::Hashable
|
1583
|
+
|
1584
|
+
# Whether this is supposed to be a full or partial match.
|
1585
|
+
# Corresponds to the JSON property `fullMatch`
|
1586
|
+
# @return [Boolean]
|
1587
|
+
attr_accessor :full_match
|
1588
|
+
alias_method :full_match?, :full_match
|
1589
|
+
|
1590
|
+
# The value of the term to match on. Value cannot be empty. Value can have at
|
1591
|
+
# most 3 terms if specified as a partial match. Each space separated string is
|
1592
|
+
# considered as one term. Example) "a b c" is 3 terms and allowed, " a b c d" is
|
1593
|
+
# 4 terms and not allowed for partial match.
|
1594
|
+
# Corresponds to the JSON property `value`
|
1595
|
+
# @return [String]
|
1596
|
+
attr_accessor :value
|
1597
|
+
|
1598
|
+
def initialize(**args)
|
1599
|
+
update!(**args)
|
1600
|
+
end
|
1601
|
+
|
1602
|
+
# Update properties of this object
|
1603
|
+
def update!(**args)
|
1604
|
+
@full_match = args[:full_match] if args.key?(:full_match)
|
1605
|
+
@value = args[:value] if args.key?(:value)
|
1606
|
+
end
|
1607
|
+
end
|
1608
|
+
|
1609
|
+
# Used for time-dependent conditions. Example: Want to have rule applied for
|
1610
|
+
# week long sale.
|
1611
|
+
class GoogleCloudRetailV2betaConditionTimeRange
|
1612
|
+
include Google::Apis::Core::Hashable
|
1613
|
+
|
1614
|
+
# End of time range. Range is inclusive.
|
1615
|
+
# Corresponds to the JSON property `endTime`
|
1616
|
+
# @return [String]
|
1617
|
+
attr_accessor :end_time
|
1618
|
+
|
1619
|
+
# Start of time range. Range is inclusive.
|
1620
|
+
# Corresponds to the JSON property `startTime`
|
1621
|
+
# @return [String]
|
1622
|
+
attr_accessor :start_time
|
1623
|
+
|
1624
|
+
def initialize(**args)
|
1625
|
+
update!(**args)
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
# Update properties of this object
|
1629
|
+
def update!(**args)
|
1630
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1631
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1632
|
+
end
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
# Configures dynamic serving time metadata that is used to pre and post process
|
1636
|
+
# search/recommendation model results.
|
1637
|
+
class GoogleCloudRetailV2betaControl
|
1638
|
+
include Google::Apis::Core::Hashable
|
1639
|
+
|
1640
|
+
# Output only. List of serving configuration ids that that are associated with
|
1641
|
+
# this control. Note the association is managed via the ServingConfig, this is
|
1642
|
+
# an output only denormalizeed view. Assumed to be in the same catalog.
|
1643
|
+
# Corresponds to the JSON property `associatedServingConfigIds`
|
1644
|
+
# @return [Array<String>]
|
1645
|
+
attr_accessor :associated_serving_config_ids
|
1646
|
+
|
1647
|
+
# Required. The human readable control display name. Used in Retail UI. This
|
1648
|
+
# field must be a UTF-8 encoded string with a length limit of 128 characters.
|
1649
|
+
# Otherwise, an INVALID_ARGUMENT error is thrown.
|
1650
|
+
# Corresponds to the JSON property `displayName`
|
1651
|
+
# @return [String]
|
1652
|
+
attr_accessor :display_name
|
1653
|
+
|
1654
|
+
# A facet specification to perform faceted search.
|
1655
|
+
# Corresponds to the JSON property `facetSpec`
|
1656
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestFacetSpec]
|
1657
|
+
attr_accessor :facet_spec
|
1658
|
+
|
1659
|
+
# Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
|
1660
|
+
# controls/*
|
1661
|
+
# Corresponds to the JSON property `name`
|
1662
|
+
# @return [String]
|
1663
|
+
attr_accessor :name
|
1664
|
+
|
1665
|
+
# A rule is a condition-action pair * A condition defines when a rule is to be
|
1666
|
+
# triggered. * An action specifies what occurs on that trigger. Currently only
|
1667
|
+
# boost rules are supported. Currently only supported by the search endpoint.
|
1668
|
+
# Corresponds to the JSON property `rule`
|
1669
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRule]
|
1670
|
+
attr_accessor :rule
|
1671
|
+
|
1672
|
+
# Required. Immutable. The solution types that the serving config is used for.
|
1673
|
+
# Currently we support setting only one type of solution at creation time. Only `
|
1674
|
+
# SOLUTION_TYPE_SEARCH` value is supported at the moment.
|
1675
|
+
# Corresponds to the JSON property `solutionTypes`
|
1676
|
+
# @return [Array<String>]
|
1677
|
+
attr_accessor :solution_types
|
1678
|
+
|
1679
|
+
def initialize(**args)
|
1680
|
+
update!(**args)
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
# Update properties of this object
|
1684
|
+
def update!(**args)
|
1685
|
+
@associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids)
|
1686
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1687
|
+
@facet_spec = args[:facet_spec] if args.key?(:facet_spec)
|
1688
|
+
@name = args[:name] if args.key?(:name)
|
1689
|
+
@rule = args[:rule] if args.key?(:rule)
|
1690
|
+
@solution_types = args[:solution_types] if args.key?(:solution_types)
|
1691
|
+
end
|
1692
|
+
end
|
1693
|
+
|
1552
1694
|
# A custom attribute that is not explicitly modeled in Product.
|
1553
1695
|
class GoogleCloudRetailV2betaCustomAttribute
|
1554
1696
|
include Google::Apis::Core::Hashable
|
1555
1697
|
|
1556
|
-
#
|
1557
|
-
#
|
1558
|
-
#
|
1559
|
-
#
|
1698
|
+
# This field will only be used when AttributesConfig.attribute_config_level of
|
1699
|
+
# the Catalog is 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute
|
1700
|
+
# values are indexed, so that it can be filtered, faceted or boosted in
|
1701
|
+
# SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.
|
1702
|
+
# filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more
|
1703
|
+
# details.
|
1560
1704
|
# Corresponds to the JSON property `indexable`
|
1561
1705
|
# @return [Boolean]
|
1562
1706
|
attr_accessor :indexable
|
@@ -1569,9 +1713,11 @@ module Google
|
|
1569
1713
|
# @return [Array<Float>]
|
1570
1714
|
attr_accessor :numbers
|
1571
1715
|
|
1572
|
-
#
|
1573
|
-
#
|
1574
|
-
# text
|
1716
|
+
# This field will only be used when AttributesConfig.attribute_config_level of
|
1717
|
+
# the Catalog is 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute
|
1718
|
+
# values are searchable by text queries in SearchService.Search. This field is
|
1719
|
+
# ignored in a UserEvent. Only set if type text is set. Otherwise, a
|
1720
|
+
# INVALID_ARGUMENT error is returned.
|
1575
1721
|
# Corresponds to the JSON property `searchable`
|
1576
1722
|
# @return [Boolean]
|
1577
1723
|
attr_accessor :searchable
|
@@ -1747,7 +1893,8 @@ module Google
|
|
1747
1893
|
# imports: * `user_event` (default): One JSON UserEvent per line. * `
|
1748
1894
|
# user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
|
1749
1895
|
# Supported values for control imports: * 'control' (default): One JSON Control
|
1750
|
-
# per line.
|
1896
|
+
# per line. Supported values for catalog attribute imports: * 'catalog_attribute'
|
1897
|
+
# (default): One CSV CatalogAttribute per line.
|
1751
1898
|
# Corresponds to the JSON property `dataSchema`
|
1752
1899
|
# @return [String]
|
1753
1900
|
attr_accessor :data_schema
|
@@ -2176,6 +2323,31 @@ module Google
|
|
2176
2323
|
end
|
2177
2324
|
end
|
2178
2325
|
|
2326
|
+
# Response for ListControls method.
|
2327
|
+
class GoogleCloudRetailV2betaListControlsResponse
|
2328
|
+
include Google::Apis::Core::Hashable
|
2329
|
+
|
2330
|
+
# All the Controls for a given catalog.
|
2331
|
+
# Corresponds to the JSON property `controls`
|
2332
|
+
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaControl>]
|
2333
|
+
attr_accessor :controls
|
2334
|
+
|
2335
|
+
# Pagination token, if not returned indicates the last page.
|
2336
|
+
# Corresponds to the JSON property `nextPageToken`
|
2337
|
+
# @return [String]
|
2338
|
+
attr_accessor :next_page_token
|
2339
|
+
|
2340
|
+
def initialize(**args)
|
2341
|
+
update!(**args)
|
2342
|
+
end
|
2343
|
+
|
2344
|
+
# Update properties of this object
|
2345
|
+
def update!(**args)
|
2346
|
+
@controls = args[:controls] if args.key?(:controls)
|
2347
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2348
|
+
end
|
2349
|
+
end
|
2350
|
+
|
2179
2351
|
# Response message for ProductService.ListProducts method.
|
2180
2352
|
class GoogleCloudRetailV2betaListProductsResponse
|
2181
2353
|
include Google::Apis::Core::Hashable
|
@@ -2202,6 +2374,31 @@ module Google
|
|
2202
2374
|
end
|
2203
2375
|
end
|
2204
2376
|
|
2377
|
+
# Response for ListServingConfigs method.
|
2378
|
+
class GoogleCloudRetailV2betaListServingConfigsResponse
|
2379
|
+
include Google::Apis::Core::Hashable
|
2380
|
+
|
2381
|
+
# Pagination token, if not returned indicates the last page.
|
2382
|
+
# Corresponds to the JSON property `nextPageToken`
|
2383
|
+
# @return [String]
|
2384
|
+
attr_accessor :next_page_token
|
2385
|
+
|
2386
|
+
# All the ServingConfigs for a given catalog.
|
2387
|
+
# Corresponds to the JSON property `servingConfigs`
|
2388
|
+
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaServingConfig>]
|
2389
|
+
attr_accessor :serving_configs
|
2390
|
+
|
2391
|
+
def initialize(**args)
|
2392
|
+
update!(**args)
|
2393
|
+
end
|
2394
|
+
|
2395
|
+
# Update properties of this object
|
2396
|
+
def update!(**args)
|
2397
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
2398
|
+
@serving_configs = args[:serving_configs] if args.key?(:serving_configs)
|
2399
|
+
end
|
2400
|
+
end
|
2401
|
+
|
2205
2402
|
# Request message for Predict method.
|
2206
2403
|
class GoogleCloudRetailV2betaPredictRequest
|
2207
2404
|
include Google::Apis::Core::Hashable
|
@@ -2550,7 +2747,9 @@ module Google
|
|
2550
2747
|
# @return [Array<String>]
|
2551
2748
|
attr_accessor :categories
|
2552
2749
|
|
2553
|
-
# The id of the collection members when type is Type.COLLECTION.
|
2750
|
+
# The id of the collection members when type is Type.COLLECTION. Non-existent
|
2751
|
+
# product ids are allowed. The type of the members must be either Type.PRIMARY
|
2752
|
+
# or Type.VARIANT otherwise and INVALID_ARGUMENT error is thrown. Should not set
|
2554
2753
|
# it for other types. A maximum of 1000 values are allowed. Otherwise, an
|
2555
2754
|
# INVALID_ARGUMENT error is return.
|
2556
2755
|
# Corresponds to the JSON property `collectionMemberIds`
|
@@ -2563,12 +2762,12 @@ module Google
|
|
2563
2762
|
attr_accessor :color_info
|
2564
2763
|
|
2565
2764
|
# The condition of the product. Strongly encouraged to use the standard values: "
|
2566
|
-
# new", "refurbished", "used". A maximum of
|
2567
|
-
#
|
2568
|
-
#
|
2569
|
-
#
|
2570
|
-
#
|
2571
|
-
#
|
2765
|
+
# new", "refurbished", "used". A maximum of 1 value is allowed per Product. Each
|
2766
|
+
# value must be a UTF-8 encoded string with a length limit of 128 characters.
|
2767
|
+
# Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties:
|
2768
|
+
# Google Merchant Center property [condition](https://support.google.com/
|
2769
|
+
# merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://
|
2770
|
+
# schema.org/itemCondition).
|
2572
2771
|
# Corresponds to the JSON property `conditions`
|
2573
2772
|
# @return [Array<String>]
|
2574
2773
|
attr_accessor :conditions
|
@@ -2646,7 +2845,7 @@ module Google
|
|
2646
2845
|
|
2647
2846
|
# The material of the product. For example, "leather", "wooden". A maximum of 20
|
2648
2847
|
# values are allowed. Each value must be a UTF-8 encoded string with a length
|
2649
|
-
# limit of
|
2848
|
+
# limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
2650
2849
|
# Corresponding properties: Google Merchant Center property [material](https://
|
2651
2850
|
# support.google.com/merchants/answer/6324410). Schema.org property [Product.
|
2652
2851
|
# material](https://schema.org/material).
|
@@ -2689,7 +2888,8 @@ module Google
|
|
2689
2888
|
attr_accessor :primary_product_id
|
2690
2889
|
|
2691
2890
|
# The promotions applied to the product. A maximum of 10 values are allowed per
|
2692
|
-
# Product.
|
2891
|
+
# Product. Only Promotion.promotion_id will be used, other fields will be
|
2892
|
+
# ignored if set.
|
2693
2893
|
# Corresponds to the JSON property `promotions`
|
2694
2894
|
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaPromotion>]
|
2695
2895
|
attr_accessor :promotions
|
@@ -2968,7 +3168,7 @@ module Google
|
|
2968
3168
|
class GoogleCloudRetailV2betaPromotion
|
2969
3169
|
include Google::Apis::Core::Hashable
|
2970
3170
|
|
2971
|
-
# ID of the promotion. For example, "free gift". The value
|
3171
|
+
# ID of the promotion. For example, "free gift". The value must be a UTF-8
|
2972
3172
|
# encoded string with a length limit of 128 characters, and match the pattern: `
|
2973
3173
|
# a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an
|
2974
3174
|
# INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion]
|
@@ -3199,6 +3399,26 @@ module Google
|
|
3199
3399
|
end
|
3200
3400
|
end
|
3201
3401
|
|
3402
|
+
# Request for RemoveControl method.
|
3403
|
+
class GoogleCloudRetailV2betaRemoveControlRequest
|
3404
|
+
include Google::Apis::Core::Hashable
|
3405
|
+
|
3406
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog as
|
3407
|
+
# the serving config.
|
3408
|
+
# Corresponds to the JSON property `controlId`
|
3409
|
+
# @return [String]
|
3410
|
+
attr_accessor :control_id
|
3411
|
+
|
3412
|
+
def initialize(**args)
|
3413
|
+
update!(**args)
|
3414
|
+
end
|
3415
|
+
|
3416
|
+
# Update properties of this object
|
3417
|
+
def update!(**args)
|
3418
|
+
@control_id = args[:control_id] if args.key?(:control_id)
|
3419
|
+
end
|
3420
|
+
end
|
3421
|
+
|
3202
3422
|
# Metadata related to the progress of the RemoveFulfillmentPlaces operation.
|
3203
3423
|
# Currently empty because there is no meaningful metadata populated from the
|
3204
3424
|
# RemoveFulfillmentPlaces method.
|
@@ -3282,6 +3502,333 @@ module Google
|
|
3282
3502
|
end
|
3283
3503
|
end
|
3284
3504
|
|
3505
|
+
# A rule is a condition-action pair * A condition defines when a rule is to be
|
3506
|
+
# triggered. * An action specifies what occurs on that trigger. Currently only
|
3507
|
+
# boost rules are supported. Currently only supported by the search endpoint.
|
3508
|
+
class GoogleCloudRetailV2betaRule
|
3509
|
+
include Google::Apis::Core::Hashable
|
3510
|
+
|
3511
|
+
# A boost action to apply to results matching condition specified above.
|
3512
|
+
# Corresponds to the JSON property `boostAction`
|
3513
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleBoostAction]
|
3514
|
+
attr_accessor :boost_action
|
3515
|
+
|
3516
|
+
# Metadata that is used to define a condition that triggers an action. A valid
|
3517
|
+
# condition must specify at least one of 'query_terms' or 'products_filter'. If
|
3518
|
+
# multiple fields are specified, the condition is met if all the fields are
|
3519
|
+
# satisfied e.g. if a set of query terms and product_filter are set, then only
|
3520
|
+
# items matching the product_filter for requests with a query matching the query
|
3521
|
+
# terms wil get boosted.
|
3522
|
+
# Corresponds to the JSON property `condition`
|
3523
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCondition]
|
3524
|
+
attr_accessor :condition
|
3525
|
+
|
3526
|
+
# Prevents `query_term` from being associated with specified terms during search.
|
3527
|
+
# Example: Don't associate "gShoe" and "cheap".
|
3528
|
+
# Corresponds to the JSON property `doNotAssociateAction`
|
3529
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleDoNotAssociateAction]
|
3530
|
+
attr_accessor :do_not_associate_action
|
3531
|
+
|
3532
|
+
# * Rule Condition: - No Condition provided is a global match. - 1 or more
|
3533
|
+
# Condition provided is combined with OR operator. * Action Input: The request
|
3534
|
+
# query and filter that will be applied to the retrieved products, in addition
|
3535
|
+
# to any filters already provided with the SearchRequest. The AND operator is
|
3536
|
+
# used to combine the query's existing filters with the filter rule(s). NOTE:
|
3537
|
+
# May result in 0 results when filters conflict. * Action Result: Filters the
|
3538
|
+
# returned objects to be ONLY those that passed the filter.
|
3539
|
+
# Corresponds to the JSON property `filterAction`
|
3540
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleFilterAction]
|
3541
|
+
attr_accessor :filter_action
|
3542
|
+
|
3543
|
+
# Prevents a term in the query from being used in search. Example: Don't search
|
3544
|
+
# for "shoddy".
|
3545
|
+
# Corresponds to the JSON property `ignoreAction`
|
3546
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleIgnoreAction]
|
3547
|
+
attr_accessor :ignore_action
|
3548
|
+
|
3549
|
+
# Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
|
3550
|
+
# synonyms of each query term only. `query_terms` will not be treated as
|
3551
|
+
# synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
|
3552
|
+
# shoes" will not use a synonym of "sneakers".
|
3553
|
+
# Corresponds to the JSON property `onewaySynonymsAction`
|
3554
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleOnewaySynonymsAction]
|
3555
|
+
attr_accessor :oneway_synonyms_action
|
3556
|
+
|
3557
|
+
# Redirects a shopper to a specific page. * Rule Condition: - Must specify
|
3558
|
+
# Condition. * Action Input: Request Query * Action Result: Redirects shopper to
|
3559
|
+
# provided uri.
|
3560
|
+
# Corresponds to the JSON property `redirectAction`
|
3561
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleRedirectAction]
|
3562
|
+
attr_accessor :redirect_action
|
3563
|
+
|
3564
|
+
# Replaces a term in the query. Multiple replacement candidates can be specified.
|
3565
|
+
# All `query_terms` will be replaced with the replacement term. Example:
|
3566
|
+
# Replace "gShoe" with "google shoe".
|
3567
|
+
# Corresponds to the JSON property `replacementAction`
|
3568
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleReplacementAction]
|
3569
|
+
attr_accessor :replacement_action
|
3570
|
+
|
3571
|
+
# Creates a set of terms that will be treated as synonyms of each other. Example:
|
3572
|
+
# synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
|
3573
|
+
# . * "shoes" will use a synonym of "sneakers".
|
3574
|
+
# Corresponds to the JSON property `twowaySynonymsAction`
|
3575
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaRuleTwowaySynonymsAction]
|
3576
|
+
attr_accessor :twoway_synonyms_action
|
3577
|
+
|
3578
|
+
def initialize(**args)
|
3579
|
+
update!(**args)
|
3580
|
+
end
|
3581
|
+
|
3582
|
+
# Update properties of this object
|
3583
|
+
def update!(**args)
|
3584
|
+
@boost_action = args[:boost_action] if args.key?(:boost_action)
|
3585
|
+
@condition = args[:condition] if args.key?(:condition)
|
3586
|
+
@do_not_associate_action = args[:do_not_associate_action] if args.key?(:do_not_associate_action)
|
3587
|
+
@filter_action = args[:filter_action] if args.key?(:filter_action)
|
3588
|
+
@ignore_action = args[:ignore_action] if args.key?(:ignore_action)
|
3589
|
+
@oneway_synonyms_action = args[:oneway_synonyms_action] if args.key?(:oneway_synonyms_action)
|
3590
|
+
@redirect_action = args[:redirect_action] if args.key?(:redirect_action)
|
3591
|
+
@replacement_action = args[:replacement_action] if args.key?(:replacement_action)
|
3592
|
+
@twoway_synonyms_action = args[:twoway_synonyms_action] if args.key?(:twoway_synonyms_action)
|
3593
|
+
end
|
3594
|
+
end
|
3595
|
+
|
3596
|
+
# A boost action to apply to results matching condition specified above.
|
3597
|
+
class GoogleCloudRetailV2betaRuleBoostAction
|
3598
|
+
include Google::Apis::Core::Hashable
|
3599
|
+
|
3600
|
+
# Strength of the condition boost, which must be in [-1, 1]. Negative boost
|
3601
|
+
# means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
|
3602
|
+
# However, it does not necessarily mean that the boosted item will be the top
|
3603
|
+
# result at all times, nor that other items will be excluded. Results could
|
3604
|
+
# still be shown even when none of them matches the condition. And results that
|
3605
|
+
# are significantly more relevant to the search query can still trump your
|
3606
|
+
# heavily favored but irrelevant items. Setting to -1.0 gives the item a big
|
3607
|
+
# demotion. However, results that are deeply relevant might still be shown. The
|
3608
|
+
# item will have an upstream battle to get a fairly high ranking, but it is not
|
3609
|
+
# blocked out completely. Setting to 0.0 means no boost applied. The boosting
|
3610
|
+
# condition is ignored.
|
3611
|
+
# Corresponds to the JSON property `boost`
|
3612
|
+
# @return [Float]
|
3613
|
+
attr_accessor :boost
|
3614
|
+
|
3615
|
+
# The filter can have a max size of 5000 characters. An expression which
|
3616
|
+
# specifies which products to apply an action to. The syntax and supported
|
3617
|
+
# fields are the same as a filter expression. See SearchRequest.filter for
|
3618
|
+
# detail syntax and limitations. Examples: * To boost products with product ID "
|
3619
|
+
# product_1" or "product_2", and color "Red" or "Blue": *(id: ANY("product_1", "
|
3620
|
+
# product_2")) * *AND * *(colorFamilies: ANY("Red", "Blue")) *
|
3621
|
+
# Corresponds to the JSON property `productsFilter`
|
3622
|
+
# @return [String]
|
3623
|
+
attr_accessor :products_filter
|
3624
|
+
|
3625
|
+
def initialize(**args)
|
3626
|
+
update!(**args)
|
3627
|
+
end
|
3628
|
+
|
3629
|
+
# Update properties of this object
|
3630
|
+
def update!(**args)
|
3631
|
+
@boost = args[:boost] if args.key?(:boost)
|
3632
|
+
@products_filter = args[:products_filter] if args.key?(:products_filter)
|
3633
|
+
end
|
3634
|
+
end
|
3635
|
+
|
3636
|
+
# Prevents `query_term` from being associated with specified terms during search.
|
3637
|
+
# Example: Don't associate "gShoe" and "cheap".
|
3638
|
+
class GoogleCloudRetailV2betaRuleDoNotAssociateAction
|
3639
|
+
include Google::Apis::Core::Hashable
|
3640
|
+
|
3641
|
+
# Cannot contain duplicates or the query term. Can specify up to 100 terms.
|
3642
|
+
# Corresponds to the JSON property `doNotAssociateTerms`
|
3643
|
+
# @return [Array<String>]
|
3644
|
+
attr_accessor :do_not_associate_terms
|
3645
|
+
|
3646
|
+
# Terms from the search query. Will not consider do_not_associate_terms for
|
3647
|
+
# search if in search query. Can specify up to 100 terms.
|
3648
|
+
# Corresponds to the JSON property `queryTerms`
|
3649
|
+
# @return [Array<String>]
|
3650
|
+
attr_accessor :query_terms
|
3651
|
+
|
3652
|
+
# Will be [deprecated = true] post migration;
|
3653
|
+
# Corresponds to the JSON property `terms`
|
3654
|
+
# @return [Array<String>]
|
3655
|
+
attr_accessor :terms
|
3656
|
+
|
3657
|
+
def initialize(**args)
|
3658
|
+
update!(**args)
|
3659
|
+
end
|
3660
|
+
|
3661
|
+
# Update properties of this object
|
3662
|
+
def update!(**args)
|
3663
|
+
@do_not_associate_terms = args[:do_not_associate_terms] if args.key?(:do_not_associate_terms)
|
3664
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3665
|
+
@terms = args[:terms] if args.key?(:terms)
|
3666
|
+
end
|
3667
|
+
end
|
3668
|
+
|
3669
|
+
# * Rule Condition: - No Condition provided is a global match. - 1 or more
|
3670
|
+
# Condition provided is combined with OR operator. * Action Input: The request
|
3671
|
+
# query and filter that will be applied to the retrieved products, in addition
|
3672
|
+
# to any filters already provided with the SearchRequest. The AND operator is
|
3673
|
+
# used to combine the query's existing filters with the filter rule(s). NOTE:
|
3674
|
+
# May result in 0 results when filters conflict. * Action Result: Filters the
|
3675
|
+
# returned objects to be ONLY those that passed the filter.
|
3676
|
+
class GoogleCloudRetailV2betaRuleFilterAction
|
3677
|
+
include Google::Apis::Core::Hashable
|
3678
|
+
|
3679
|
+
# A filter to apply on the matching condition results. Supported features: *
|
3680
|
+
# filter must be set. * Filter syntax is identical to SearchRequest.filter. See
|
3681
|
+
# more details at the Retail Search [user guide](/retail/search/docs/filter-and-
|
3682
|
+
# order#filter). * To filter products with product ID "product_1" or "product_2",
|
3683
|
+
# and color "Red" or "Blue": *(id: ANY("product_1", "product_2")) * *AND * *(
|
3684
|
+
# colorFamilies: ANY("Red", "Blue")) *
|
3685
|
+
# Corresponds to the JSON property `filter`
|
3686
|
+
# @return [String]
|
3687
|
+
attr_accessor :filter
|
3688
|
+
|
3689
|
+
def initialize(**args)
|
3690
|
+
update!(**args)
|
3691
|
+
end
|
3692
|
+
|
3693
|
+
# Update properties of this object
|
3694
|
+
def update!(**args)
|
3695
|
+
@filter = args[:filter] if args.key?(:filter)
|
3696
|
+
end
|
3697
|
+
end
|
3698
|
+
|
3699
|
+
# Prevents a term in the query from being used in search. Example: Don't search
|
3700
|
+
# for "shoddy".
|
3701
|
+
class GoogleCloudRetailV2betaRuleIgnoreAction
|
3702
|
+
include Google::Apis::Core::Hashable
|
3703
|
+
|
3704
|
+
# Terms to ignore in the search query.
|
3705
|
+
# Corresponds to the JSON property `ignoreTerms`
|
3706
|
+
# @return [Array<String>]
|
3707
|
+
attr_accessor :ignore_terms
|
3708
|
+
|
3709
|
+
def initialize(**args)
|
3710
|
+
update!(**args)
|
3711
|
+
end
|
3712
|
+
|
3713
|
+
# Update properties of this object
|
3714
|
+
def update!(**args)
|
3715
|
+
@ignore_terms = args[:ignore_terms] if args.key?(:ignore_terms)
|
3716
|
+
end
|
3717
|
+
end
|
3718
|
+
|
3719
|
+
# Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
|
3720
|
+
# synonyms of each query term only. `query_terms` will not be treated as
|
3721
|
+
# synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
|
3722
|
+
# shoes" will not use a synonym of "sneakers".
|
3723
|
+
class GoogleCloudRetailV2betaRuleOnewaySynonymsAction
|
3724
|
+
include Google::Apis::Core::Hashable
|
3725
|
+
|
3726
|
+
# Will be [deprecated = true] post migration;
|
3727
|
+
# Corresponds to the JSON property `onewayTerms`
|
3728
|
+
# @return [Array<String>]
|
3729
|
+
attr_accessor :oneway_terms
|
3730
|
+
|
3731
|
+
# Terms from the search query. Will treat synonyms as their synonyms. Not
|
3732
|
+
# themselves synonyms of the synonyms. Can specify up to 100 terms.
|
3733
|
+
# Corresponds to the JSON property `queryTerms`
|
3734
|
+
# @return [Array<String>]
|
3735
|
+
attr_accessor :query_terms
|
3736
|
+
|
3737
|
+
# Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100
|
3738
|
+
# synonyms.
|
3739
|
+
# Corresponds to the JSON property `synonyms`
|
3740
|
+
# @return [Array<String>]
|
3741
|
+
attr_accessor :synonyms
|
3742
|
+
|
3743
|
+
def initialize(**args)
|
3744
|
+
update!(**args)
|
3745
|
+
end
|
3746
|
+
|
3747
|
+
# Update properties of this object
|
3748
|
+
def update!(**args)
|
3749
|
+
@oneway_terms = args[:oneway_terms] if args.key?(:oneway_terms)
|
3750
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3751
|
+
@synonyms = args[:synonyms] if args.key?(:synonyms)
|
3752
|
+
end
|
3753
|
+
end
|
3754
|
+
|
3755
|
+
# Redirects a shopper to a specific page. * Rule Condition: - Must specify
|
3756
|
+
# Condition. * Action Input: Request Query * Action Result: Redirects shopper to
|
3757
|
+
# provided uri.
|
3758
|
+
class GoogleCloudRetailV2betaRuleRedirectAction
|
3759
|
+
include Google::Apis::Core::Hashable
|
3760
|
+
|
3761
|
+
# URL must have length equal or less than 2000 characters.
|
3762
|
+
# Corresponds to the JSON property `redirectUri`
|
3763
|
+
# @return [String]
|
3764
|
+
attr_accessor :redirect_uri
|
3765
|
+
|
3766
|
+
def initialize(**args)
|
3767
|
+
update!(**args)
|
3768
|
+
end
|
3769
|
+
|
3770
|
+
# Update properties of this object
|
3771
|
+
def update!(**args)
|
3772
|
+
@redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
|
3773
|
+
end
|
3774
|
+
end
|
3775
|
+
|
3776
|
+
# Replaces a term in the query. Multiple replacement candidates can be specified.
|
3777
|
+
# All `query_terms` will be replaced with the replacement term. Example:
|
3778
|
+
# Replace "gShoe" with "google shoe".
|
3779
|
+
class GoogleCloudRetailV2betaRuleReplacementAction
|
3780
|
+
include Google::Apis::Core::Hashable
|
3781
|
+
|
3782
|
+
# Terms from the search query. Will be replaced by replacement term. Can specify
|
3783
|
+
# up to 100 terms.
|
3784
|
+
# Corresponds to the JSON property `queryTerms`
|
3785
|
+
# @return [Array<String>]
|
3786
|
+
attr_accessor :query_terms
|
3787
|
+
|
3788
|
+
# Term that will be used for replacement.
|
3789
|
+
# Corresponds to the JSON property `replacementTerm`
|
3790
|
+
# @return [String]
|
3791
|
+
attr_accessor :replacement_term
|
3792
|
+
|
3793
|
+
# Will be [deprecated = true] post migration;
|
3794
|
+
# Corresponds to the JSON property `term`
|
3795
|
+
# @return [String]
|
3796
|
+
attr_accessor :term
|
3797
|
+
|
3798
|
+
def initialize(**args)
|
3799
|
+
update!(**args)
|
3800
|
+
end
|
3801
|
+
|
3802
|
+
# Update properties of this object
|
3803
|
+
def update!(**args)
|
3804
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3805
|
+
@replacement_term = args[:replacement_term] if args.key?(:replacement_term)
|
3806
|
+
@term = args[:term] if args.key?(:term)
|
3807
|
+
end
|
3808
|
+
end
|
3809
|
+
|
3810
|
+
# Creates a set of terms that will be treated as synonyms of each other. Example:
|
3811
|
+
# synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
|
3812
|
+
# . * "shoes" will use a synonym of "sneakers".
|
3813
|
+
class GoogleCloudRetailV2betaRuleTwowaySynonymsAction
|
3814
|
+
include Google::Apis::Core::Hashable
|
3815
|
+
|
3816
|
+
# Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at
|
3817
|
+
# least 2 synonyms.
|
3818
|
+
# Corresponds to the JSON property `synonyms`
|
3819
|
+
# @return [Array<String>]
|
3820
|
+
attr_accessor :synonyms
|
3821
|
+
|
3822
|
+
def initialize(**args)
|
3823
|
+
update!(**args)
|
3824
|
+
end
|
3825
|
+
|
3826
|
+
# Update properties of this object
|
3827
|
+
def update!(**args)
|
3828
|
+
@synonyms = args[:synonyms] if args.key?(:synonyms)
|
3829
|
+
end
|
3830
|
+
end
|
3831
|
+
|
3285
3832
|
# Request message for SearchService.Search method.
|
3286
3833
|
class GoogleCloudRetailV2betaSearchRequest
|
3287
3834
|
include Google::Apis::Core::Hashable
|
@@ -3373,6 +3920,11 @@ module Google
|
|
3373
3920
|
# @return [String]
|
3374
3921
|
attr_accessor :page_token
|
3375
3922
|
|
3923
|
+
# The specification for personalization.
|
3924
|
+
# Corresponds to the JSON property `personalizationSpec`
|
3925
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestPersonalizationSpec]
|
3926
|
+
attr_accessor :personalization_spec
|
3927
|
+
|
3376
3928
|
# Raw search query.
|
3377
3929
|
# Corresponds to the JSON property `query`
|
3378
3930
|
# @return [String]
|
@@ -3451,6 +4003,7 @@ module Google
|
|
3451
4003
|
@page_categories = args[:page_categories] if args.key?(:page_categories)
|
3452
4004
|
@page_size = args[:page_size] if args.key?(:page_size)
|
3453
4005
|
@page_token = args[:page_token] if args.key?(:page_token)
|
4006
|
+
@personalization_spec = args[:personalization_spec] if args.key?(:personalization_spec)
|
3454
4007
|
@query = args[:query] if args.key?(:query)
|
3455
4008
|
@query_expansion_spec = args[:query_expansion_spec] if args.key?(:query_expansion_spec)
|
3456
4009
|
@search_mode = args[:search_mode] if args.key?(:search_mode)
|
@@ -3471,6 +4024,14 @@ module Google
|
|
3471
4024
|
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec>]
|
3472
4025
|
attr_accessor :condition_boost_specs
|
3473
4026
|
|
4027
|
+
# Whether to skip boostspec validation. If this field is set to true, invalid
|
4028
|
+
# BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.
|
4029
|
+
# condition_boost_specs will still be applied.
|
4030
|
+
# Corresponds to the JSON property `skipBoostSpecValidation`
|
4031
|
+
# @return [Boolean]
|
4032
|
+
attr_accessor :skip_boost_spec_validation
|
4033
|
+
alias_method :skip_boost_spec_validation?, :skip_boost_spec_validation
|
4034
|
+
|
3474
4035
|
def initialize(**args)
|
3475
4036
|
update!(**args)
|
3476
4037
|
end
|
@@ -3478,6 +4039,7 @@ module Google
|
|
3478
4039
|
# Update properties of this object
|
3479
4040
|
def update!(**args)
|
3480
4041
|
@condition_boost_specs = args[:condition_boost_specs] if args.key?(:condition_boost_specs)
|
4042
|
+
@skip_boost_spec_validation = args[:skip_boost_spec_validation] if args.key?(:skip_boost_spec_validation)
|
3481
4043
|
end
|
3482
4044
|
end
|
3483
4045
|
|
@@ -3700,6 +4262,25 @@ module Google
|
|
3700
4262
|
end
|
3701
4263
|
end
|
3702
4264
|
|
4265
|
+
# The specification for personalization.
|
4266
|
+
class GoogleCloudRetailV2betaSearchRequestPersonalizationSpec
|
4267
|
+
include Google::Apis::Core::Hashable
|
4268
|
+
|
4269
|
+
# Defaults to Mode.AUTO.
|
4270
|
+
# Corresponds to the JSON property `mode`
|
4271
|
+
# @return [String]
|
4272
|
+
attr_accessor :mode
|
4273
|
+
|
4274
|
+
def initialize(**args)
|
4275
|
+
update!(**args)
|
4276
|
+
end
|
4277
|
+
|
4278
|
+
# Update properties of this object
|
4279
|
+
def update!(**args)
|
4280
|
+
@mode = args[:mode] if args.key?(:mode)
|
4281
|
+
end
|
4282
|
+
end
|
4283
|
+
|
3703
4284
|
# Specification to determine under which conditions query expansion should occur.
|
3704
4285
|
class GoogleCloudRetailV2betaSearchRequestQueryExpansionSpec
|
3705
4286
|
include Google::Apis::Core::Hashable
|
@@ -3756,6 +4337,12 @@ module Google
|
|
3756
4337
|
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponseFacet>]
|
3757
4338
|
attr_accessor :facets
|
3758
4339
|
|
4340
|
+
# The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied
|
4341
|
+
# during serving.
|
4342
|
+
# Corresponds to the JSON property `invalidConditionBoostSpecs`
|
4343
|
+
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec>]
|
4344
|
+
attr_accessor :invalid_condition_boost_specs
|
4345
|
+
|
3759
4346
|
# A token that can be sent as SearchRequest.page_token to retrieve the next page.
|
3760
4347
|
# If this field is omitted, there are no subsequent pages.
|
3761
4348
|
# Corresponds to the JSON property `nextPageToken`
|
@@ -3797,6 +4384,7 @@ module Google
|
|
3797
4384
|
@attribution_token = args[:attribution_token] if args.key?(:attribution_token)
|
3798
4385
|
@corrected_query = args[:corrected_query] if args.key?(:corrected_query)
|
3799
4386
|
@facets = args[:facets] if args.key?(:facets)
|
4387
|
+
@invalid_condition_boost_specs = args[:invalid_condition_boost_specs] if args.key?(:invalid_condition_boost_specs)
|
3800
4388
|
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
3801
4389
|
@query_expansion_info = args[:query_expansion_info] if args.key?(:query_expansion_info)
|
3802
4390
|
@redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
|
@@ -3956,6 +4544,183 @@ module Google
|
|
3956
4544
|
end
|
3957
4545
|
end
|
3958
4546
|
|
4547
|
+
# Configures metadata that is used to generate serving time results (e.g. search
|
4548
|
+
# results or recommendation predictions). The ServingConfig is passed in the
|
4549
|
+
# search and predict request and together with the Catalog.default_branch,
|
4550
|
+
# generates results.
|
4551
|
+
class GoogleCloudRetailV2betaServingConfig
|
4552
|
+
include Google::Apis::Core::Hashable
|
4553
|
+
|
4554
|
+
# Condition boost specifications. If a product matches multiple conditions in
|
4555
|
+
# the specifications, boost scores from these specifications are all applied and
|
4556
|
+
# combined in a non-linear way. Maximum number of specifications is 10. Notice
|
4557
|
+
# that if both ServingConfig.boost_control_ids and [SearchRequest.boost_spec]
|
4558
|
+
# are set, the boost conditions from both places are evaluated. If a search
|
4559
|
+
# request matches multiple boost conditions, the final boost score is equal to
|
4560
|
+
# the sum of the boost scores from all matched boost conditions. Can only be set
|
4561
|
+
# if solution_types is SOLUTION_TYPE_SEARCH.
|
4562
|
+
# Corresponds to the JSON property `boostControlIds`
|
4563
|
+
# @return [Array<String>]
|
4564
|
+
attr_accessor :boost_control_ids
|
4565
|
+
|
4566
|
+
# Required. The human readable serving config display name. Used in Retail UI.
|
4567
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
4568
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
4569
|
+
# Corresponds to the JSON property `displayName`
|
4570
|
+
# @return [String]
|
4571
|
+
attr_accessor :display_name
|
4572
|
+
|
4573
|
+
# How much diversity to use in recommendation model results e.g. 'medium-
|
4574
|
+
# diversity' or 'high-diversity'. Currently supported values: * 'no-diversity' *
|
4575
|
+
# 'low-diversity' * 'medium-diversity' * 'high-diversity' * 'auto-diversity' If
|
4576
|
+
# not specified, we choose default based on recommendation model type. Default
|
4577
|
+
# value: 'no-diversity'. Can only be set if solution_types is
|
4578
|
+
# SOLUTION_TYPE_RECOMMENDATION.
|
4579
|
+
# Corresponds to the JSON property `diversityLevel`
|
4580
|
+
# @return [String]
|
4581
|
+
attr_accessor :diversity_level
|
4582
|
+
|
4583
|
+
# Condition do not associate specifications. If multiple do not associate
|
4584
|
+
# conditions match, all matching do not associate controls in the list will
|
4585
|
+
# execute. - Order does not matter. - Maximum number of specifications is 100.
|
4586
|
+
# Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4587
|
+
# Corresponds to the JSON property `doNotAssociateControlIds`
|
4588
|
+
# @return [Array<String>]
|
4589
|
+
attr_accessor :do_not_associate_control_ids
|
4590
|
+
|
4591
|
+
# The specifications of dynamically generated facets.
|
4592
|
+
# Corresponds to the JSON property `dynamicFacetSpec`
|
4593
|
+
# @return [Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec]
|
4594
|
+
attr_accessor :dynamic_facet_spec
|
4595
|
+
|
4596
|
+
# Whether to add additional category filters on the 'similar-items' model. If
|
4597
|
+
# not specified, we enable it by default. Allowed values are: * 'no-category-
|
4598
|
+
# match': No additional filtering of original results from the model and the
|
4599
|
+
# customer's filters. * 'relaxed-category-match': Only keep results with
|
4600
|
+
# categories that match at least one item categories in the PredictRequests's
|
4601
|
+
# context item. * If customer also sends filters in the PredictRequest, then the
|
4602
|
+
# results will satisfy both conditions (user given and category match). Can only
|
4603
|
+
# be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
|
4604
|
+
# Corresponds to the JSON property `enableCategoryFilterLevel`
|
4605
|
+
# @return [String]
|
4606
|
+
attr_accessor :enable_category_filter_level
|
4607
|
+
|
4608
|
+
# Facet specifications for faceted search. If empty, no facets are returned. The
|
4609
|
+
# ids refer to the ids of Control resources with only the Facet control set.
|
4610
|
+
# These controls are assumed to be in the same Catalog as the ServingConfig. A
|
4611
|
+
# maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
|
4612
|
+
# returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4613
|
+
# Corresponds to the JSON property `facetControlIds`
|
4614
|
+
# @return [Array<String>]
|
4615
|
+
attr_accessor :facet_control_ids
|
4616
|
+
|
4617
|
+
# Condition filter specifications. If a product matches multiple conditions in
|
4618
|
+
# the specifications, filters from these specifications are all applied and
|
4619
|
+
# combined via the AND operator. Maximum number of specifications is 100. Can
|
4620
|
+
# only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4621
|
+
# Corresponds to the JSON property `filterControlIds`
|
4622
|
+
# @return [Array<String>]
|
4623
|
+
attr_accessor :filter_control_ids
|
4624
|
+
|
4625
|
+
# Condition ignore specifications. If multiple ignore conditions match, all
|
4626
|
+
# matching ignore controls in the list will execute. - Order does not matter. -
|
4627
|
+
# Maximum number of specifications is 100. Can only be set if solution_types is
|
4628
|
+
# SOLUTION_TYPE_SEARCH.
|
4629
|
+
# Corresponds to the JSON property `ignoreControlIds`
|
4630
|
+
# @return [Array<String>]
|
4631
|
+
attr_accessor :ignore_control_ids
|
4632
|
+
|
4633
|
+
# The id of the model to use at serving time. Currently only
|
4634
|
+
# RecommendationModels are supported: https://cloud.google.com/retail/
|
4635
|
+
# recommendations-ai/docs/create-models Can be changed but only to a compatible
|
4636
|
+
# model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
|
4637
|
+
# solution_types is SOLUTION_TYPE_RECOMMENDATION.
|
4638
|
+
# Corresponds to the JSON property `modelId`
|
4639
|
+
# @return [String]
|
4640
|
+
attr_accessor :model_id
|
4641
|
+
|
4642
|
+
# Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
|
4643
|
+
# servingConfig/*
|
4644
|
+
# Corresponds to the JSON property `name`
|
4645
|
+
# @return [String]
|
4646
|
+
attr_accessor :name
|
4647
|
+
|
4648
|
+
# Condition oneway synonyms specifications. If multiple oneway synonyms
|
4649
|
+
# conditions match, all matching oneway synonyms controls in the list will
|
4650
|
+
# execute. Order of controls in the list will not matter. Maximum number of
|
4651
|
+
# specifications is 100. Can only be set if solution_types is
|
4652
|
+
# SOLUTION_TYPE_SEARCH.
|
4653
|
+
# Corresponds to the JSON property `onewaySynonymsControlIds`
|
4654
|
+
# @return [Array<String>]
|
4655
|
+
attr_accessor :oneway_synonyms_control_ids
|
4656
|
+
|
4657
|
+
# How much price ranking we want in serving results. Price reranking causes
|
4658
|
+
# product items with a similar recommendation probability to be ordered by price,
|
4659
|
+
# with the highest-priced items first. This setting could result in a decrease
|
4660
|
+
# in click-through and conversion rates. Allowed values are: * 'no-price-
|
4661
|
+
# reranking' * 'low-price-raranking' * 'medium-price-reranking' * 'high-price-
|
4662
|
+
# reranking' If not specified, we choose default based on model type. Default
|
4663
|
+
# value: 'no-price-reranking'. Can only be set if solution_types is
|
4664
|
+
# SOLUTION_TYPE_RECOMMENDATION.
|
4665
|
+
# Corresponds to the JSON property `priceRerankingLevel`
|
4666
|
+
# @return [String]
|
4667
|
+
attr_accessor :price_reranking_level
|
4668
|
+
|
4669
|
+
# Condition redirect specifications. Only the first triggered redirect action is
|
4670
|
+
# applied, even if multiple apply. Maximum number of specifications is 100. Can
|
4671
|
+
# only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4672
|
+
# Corresponds to the JSON property `redirectControlIds`
|
4673
|
+
# @return [Array<String>]
|
4674
|
+
attr_accessor :redirect_control_ids
|
4675
|
+
|
4676
|
+
# Condition replacement specifications. - Applied according to the order in the
|
4677
|
+
# list. - A previously replaced term can not be re-replaced. - Maximum number of
|
4678
|
+
# specifications is 100. Can only be set if solution_types is
|
4679
|
+
# SOLUTION_TYPE_SEARCH.
|
4680
|
+
# Corresponds to the JSON property `replacementControlIds`
|
4681
|
+
# @return [Array<String>]
|
4682
|
+
attr_accessor :replacement_control_ids
|
4683
|
+
|
4684
|
+
# Required. Immutable. Specifies the solution types that a serving config can be
|
4685
|
+
# associated with. Currently we support setting only one type of solution.
|
4686
|
+
# Corresponds to the JSON property `solutionTypes`
|
4687
|
+
# @return [Array<String>]
|
4688
|
+
attr_accessor :solution_types
|
4689
|
+
|
4690
|
+
# Condition synonyms specifications. If multiple syonyms conditions match, all
|
4691
|
+
# matching synonyms control in the list will execute. Order of controls in the
|
4692
|
+
# list will not matter. Maximum number of specifications is 100. Can only be set
|
4693
|
+
# if solution_types is SOLUTION_TYPE_SEARCH.
|
4694
|
+
# Corresponds to the JSON property `twowaySynonymsControlIds`
|
4695
|
+
# @return [Array<String>]
|
4696
|
+
attr_accessor :twoway_synonyms_control_ids
|
4697
|
+
|
4698
|
+
def initialize(**args)
|
4699
|
+
update!(**args)
|
4700
|
+
end
|
4701
|
+
|
4702
|
+
# Update properties of this object
|
4703
|
+
def update!(**args)
|
4704
|
+
@boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
|
4705
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
4706
|
+
@diversity_level = args[:diversity_level] if args.key?(:diversity_level)
|
4707
|
+
@do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids)
|
4708
|
+
@dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
|
4709
|
+
@enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level)
|
4710
|
+
@facet_control_ids = args[:facet_control_ids] if args.key?(:facet_control_ids)
|
4711
|
+
@filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
|
4712
|
+
@ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
|
4713
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
4714
|
+
@name = args[:name] if args.key?(:name)
|
4715
|
+
@oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
|
4716
|
+
@price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level)
|
4717
|
+
@redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
|
4718
|
+
@replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
|
4719
|
+
@solution_types = args[:solution_types] if args.key?(:solution_types)
|
4720
|
+
@twoway_synonyms_control_ids = args[:twoway_synonyms_control_ids] if args.key?(:twoway_synonyms_control_ids)
|
4721
|
+
end
|
4722
|
+
end
|
4723
|
+
|
3959
4724
|
# Request message to set a specified branch as new default_branch.
|
3960
4725
|
class GoogleCloudRetailV2betaSetDefaultBranchRequest
|
3961
4726
|
include Google::Apis::Core::Hashable
|
@@ -4186,12 +4951,12 @@ module Google
|
|
4186
4951
|
|
4187
4952
|
# The main product details related to the event. This field is required for the
|
4188
4953
|
# following event types: * `add-to-cart` * `detail-page-view` * `purchase-
|
4189
|
-
# complete` In a `search` event, this field represents the products
|
4190
|
-
# the end user on the current page (the end user may have not
|
4191
|
-
# the whole page yet). When a new page is returned to the end
|
4192
|
-
# pagination/filtering/ordering even for the same query, a new `
|
4193
|
-
# with different product_details is desired. The end user may have
|
4194
|
-
# browsing the whole page yet.
|
4954
|
+
# complete` * `search` In a `search` event, this field represents the products
|
4955
|
+
# returned to the end user on the current page (the end user may have not
|
4956
|
+
# finished browsing the whole page yet). When a new page is returned to the end
|
4957
|
+
# user, after pagination/filtering/ordering even for the same query, a new `
|
4958
|
+
# search` event with different product_details is desired. The end user may have
|
4959
|
+
# not finished browsing the whole page yet.
|
4195
4960
|
# Corresponds to the JSON property `productDetails`
|
4196
4961
|
# @return [Array<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductDetail>]
|
4197
4962
|
attr_accessor :product_details
|
@@ -4559,10 +5324,10 @@ module Google
|
|
4559
5324
|
# day and time zone are either specified elsewhere or are insignificant. The
|
4560
5325
|
# date is relative to the Gregorian Calendar. This can represent one of the
|
4561
5326
|
# following: * A full date, with non-zero year, month, and day values * A month
|
4562
|
-
# and day
|
4563
|
-
#
|
4564
|
-
#
|
4565
|
-
# google.protobuf.Timestamp
|
5327
|
+
# and day, with a zero year (e.g., an anniversary) * A year on its own, with a
|
5328
|
+
# zero month and a zero day * A year and month, with a zero day (e.g., a credit
|
5329
|
+
# card expiration date) Related types: * google.type.TimeOfDay * google.type.
|
5330
|
+
# DateTime * google.protobuf.Timestamp
|
4566
5331
|
class GoogleTypeDate
|
4567
5332
|
include Google::Apis::Core::Hashable
|
4568
5333
|
|