google-apis-retail_v2 0.51.0 → 0.54.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/apis/retail_v2/classes.rb +852 -37
- data/lib/google/apis/retail_v2/gem_version.rb +2 -2
- data/lib/google/apis/retail_v2/representations.rb +310 -0
- data/lib/google/apis/retail_v2/service.rb +524 -38
- metadata +3 -3
@@ -299,6 +299,26 @@ module Google
|
|
299
299
|
end
|
300
300
|
end
|
301
301
|
|
302
|
+
# Request for AddControl method.
|
303
|
+
class GoogleCloudRetailV2AddControlRequest
|
304
|
+
include Google::Apis::Core::Hashable
|
305
|
+
|
306
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog as
|
307
|
+
# the serving config - if id is not found a NOT_FOUND error is returned.
|
308
|
+
# Corresponds to the JSON property `controlId`
|
309
|
+
# @return [String]
|
310
|
+
attr_accessor :control_id
|
311
|
+
|
312
|
+
def initialize(**args)
|
313
|
+
update!(**args)
|
314
|
+
end
|
315
|
+
|
316
|
+
# Update properties of this object
|
317
|
+
def update!(**args)
|
318
|
+
@control_id = args[:control_id] if args.key?(:control_id)
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
302
322
|
# Metadata related to the progress of the AddFulfillmentPlaces operation.
|
303
323
|
# Currently empty because there is no meaningful metadata populated from the
|
304
324
|
# ProductService.AddFulfillmentPlaces method.
|
@@ -664,11 +684,12 @@ module Google
|
|
664
684
|
# Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using
|
665
685
|
# CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or
|
666
686
|
# CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-
|
667
|
-
# loaded CatalogAttributes. Only pre-loaded
|
668
|
-
# in use by products nor predefined can be deleted.
|
669
|
-
# either in use by products or are predefined cannot be deleted;
|
670
|
-
# configuration properties will reset to default values upon
|
671
|
-
# After catalog changes, it takes about 10 minutes for this
|
687
|
+
# loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither
|
688
|
+
# in use by products nor predefined can be deleted. Catalog attributes that are
|
689
|
+
# either in use by products or are predefined attributes cannot be deleted;
|
690
|
+
# however, their configuration properties will reset to default values upon
|
691
|
+
# removal request. After catalog changes, it takes about 10 minutes for this
|
692
|
+
# field to update.
|
672
693
|
# Corresponds to the JSON property `inUse`
|
673
694
|
# @return [Boolean]
|
674
695
|
attr_accessor :in_use
|
@@ -1000,6 +1021,157 @@ module Google
|
|
1000
1021
|
end
|
1001
1022
|
end
|
1002
1023
|
|
1024
|
+
# Metadata that is used to define a condition that triggers an action. A valid
|
1025
|
+
# condition must specify at least one of 'query_terms' or 'products_filter'. If
|
1026
|
+
# multiple fields are specified, the condition is met if all the fields are
|
1027
|
+
# satisfied e.g. if a set of query terms and product_filter are set, then only
|
1028
|
+
# items matching the product_filter for requests with a query matching the query
|
1029
|
+
# terms wil get boosted.
|
1030
|
+
class GoogleCloudRetailV2Condition
|
1031
|
+
include Google::Apis::Core::Hashable
|
1032
|
+
|
1033
|
+
# Range of time(s) specifying when Condition is active. Condition true if any
|
1034
|
+
# time range matches.
|
1035
|
+
# Corresponds to the JSON property `activeTimeRange`
|
1036
|
+
# @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2ConditionTimeRange>]
|
1037
|
+
attr_accessor :active_time_range
|
1038
|
+
|
1039
|
+
# A list (up to 10 entries) of terms to match the query on. If not specified,
|
1040
|
+
# match all queries. If many query terms are specified, the condition is matched
|
1041
|
+
# if any of the terms is a match (i.e. using the OR operator).
|
1042
|
+
# Corresponds to the JSON property `queryTerms`
|
1043
|
+
# @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2ConditionQueryTerm>]
|
1044
|
+
attr_accessor :query_terms
|
1045
|
+
|
1046
|
+
def initialize(**args)
|
1047
|
+
update!(**args)
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# Update properties of this object
|
1051
|
+
def update!(**args)
|
1052
|
+
@active_time_range = args[:active_time_range] if args.key?(:active_time_range)
|
1053
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
1054
|
+
end
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
# Query terms that we want to match on.
|
1058
|
+
class GoogleCloudRetailV2ConditionQueryTerm
|
1059
|
+
include Google::Apis::Core::Hashable
|
1060
|
+
|
1061
|
+
# Whether this is supposed to be a full or partial match.
|
1062
|
+
# Corresponds to the JSON property `fullMatch`
|
1063
|
+
# @return [Boolean]
|
1064
|
+
attr_accessor :full_match
|
1065
|
+
alias_method :full_match?, :full_match
|
1066
|
+
|
1067
|
+
# The value of the term to match on. Value cannot be empty. Value can have at
|
1068
|
+
# most 3 terms if specified as a partial match. Each space separated string is
|
1069
|
+
# considered as one term. For example, "a b c" is 3 terms and allowed, but " a b
|
1070
|
+
# c d" is 4 terms and not allowed for a partial match.
|
1071
|
+
# Corresponds to the JSON property `value`
|
1072
|
+
# @return [String]
|
1073
|
+
attr_accessor :value
|
1074
|
+
|
1075
|
+
def initialize(**args)
|
1076
|
+
update!(**args)
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
# Update properties of this object
|
1080
|
+
def update!(**args)
|
1081
|
+
@full_match = args[:full_match] if args.key?(:full_match)
|
1082
|
+
@value = args[:value] if args.key?(:value)
|
1083
|
+
end
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
# Used for time-dependent conditions. Example: Want to have rule applied for
|
1087
|
+
# week long sale.
|
1088
|
+
class GoogleCloudRetailV2ConditionTimeRange
|
1089
|
+
include Google::Apis::Core::Hashable
|
1090
|
+
|
1091
|
+
# End of time range. Range is inclusive.
|
1092
|
+
# Corresponds to the JSON property `endTime`
|
1093
|
+
# @return [String]
|
1094
|
+
attr_accessor :end_time
|
1095
|
+
|
1096
|
+
# Start of time range. Range is inclusive.
|
1097
|
+
# Corresponds to the JSON property `startTime`
|
1098
|
+
# @return [String]
|
1099
|
+
attr_accessor :start_time
|
1100
|
+
|
1101
|
+
def initialize(**args)
|
1102
|
+
update!(**args)
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
# Update properties of this object
|
1106
|
+
def update!(**args)
|
1107
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1108
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1109
|
+
end
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Configures dynamic metadata that can be linked to a ServingConfig and affect
|
1113
|
+
# search or recommendation results at serving time.
|
1114
|
+
class GoogleCloudRetailV2Control
|
1115
|
+
include Google::Apis::Core::Hashable
|
1116
|
+
|
1117
|
+
# Output only. List of serving configuration ids that are associated with this
|
1118
|
+
# control in the same Catalog. Note the association is managed via the
|
1119
|
+
# ServingConfig, this is an output only denormalized view.
|
1120
|
+
# Corresponds to the JSON property `associatedServingConfigIds`
|
1121
|
+
# @return [Array<String>]
|
1122
|
+
attr_accessor :associated_serving_config_ids
|
1123
|
+
|
1124
|
+
# Required. The human readable control display name. Used in Retail UI. This
|
1125
|
+
# field must be a UTF-8 encoded string with a length limit of 128 characters.
|
1126
|
+
# Otherwise, an INVALID_ARGUMENT error is thrown.
|
1127
|
+
# Corresponds to the JSON property `displayName`
|
1128
|
+
# @return [String]
|
1129
|
+
attr_accessor :display_name
|
1130
|
+
|
1131
|
+
# Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/
|
1132
|
+
# controls/*`
|
1133
|
+
# Corresponds to the JSON property `name`
|
1134
|
+
# @return [String]
|
1135
|
+
attr_accessor :name
|
1136
|
+
|
1137
|
+
# A rule is a condition-action pair * A condition defines when a rule is to be
|
1138
|
+
# triggered. * An action specifies what occurs on that trigger. Currently rules
|
1139
|
+
# only work for controls with SOLUTION_TYPE_SEARCH.
|
1140
|
+
# Corresponds to the JSON property `rule`
|
1141
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2Rule]
|
1142
|
+
attr_accessor :rule
|
1143
|
+
|
1144
|
+
# Specifies the use case for the control. Affects what condition fields can be
|
1145
|
+
# set. Only settable by search controls. Will default to
|
1146
|
+
# SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one
|
1147
|
+
# search_solution_use_case per control.
|
1148
|
+
# Corresponds to the JSON property `searchSolutionUseCase`
|
1149
|
+
# @return [Array<String>]
|
1150
|
+
attr_accessor :search_solution_use_case
|
1151
|
+
|
1152
|
+
# Required. Immutable. The solution types that the control is used for.
|
1153
|
+
# Currently we support setting only one type of solution at creation time. Only `
|
1154
|
+
# SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is
|
1155
|
+
# provided at creation time, will default to SOLUTION_TYPE_SEARCH.
|
1156
|
+
# Corresponds to the JSON property `solutionTypes`
|
1157
|
+
# @return [Array<String>]
|
1158
|
+
attr_accessor :solution_types
|
1159
|
+
|
1160
|
+
def initialize(**args)
|
1161
|
+
update!(**args)
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Update properties of this object
|
1165
|
+
def update!(**args)
|
1166
|
+
@associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids)
|
1167
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1168
|
+
@name = args[:name] if args.key?(:name)
|
1169
|
+
@rule = args[:rule] if args.key?(:rule)
|
1170
|
+
@search_solution_use_case = args[:search_solution_use_case] if args.key?(:search_solution_use_case)
|
1171
|
+
@solution_types = args[:solution_types] if args.key?(:solution_types)
|
1172
|
+
end
|
1173
|
+
end
|
1174
|
+
|
1003
1175
|
# A custom attribute that is not explicitly modeled in Product.
|
1004
1176
|
class GoogleCloudRetailV2CustomAttribute
|
1005
1177
|
include Google::Apis::Core::Hashable
|
@@ -1535,6 +1707,31 @@ module Google
|
|
1535
1707
|
end
|
1536
1708
|
end
|
1537
1709
|
|
1710
|
+
# Response for ListControls method.
|
1711
|
+
class GoogleCloudRetailV2ListControlsResponse
|
1712
|
+
include Google::Apis::Core::Hashable
|
1713
|
+
|
1714
|
+
# All the Controls for a given catalog.
|
1715
|
+
# Corresponds to the JSON property `controls`
|
1716
|
+
# @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2Control>]
|
1717
|
+
attr_accessor :controls
|
1718
|
+
|
1719
|
+
# Pagination token, if not returned indicates the last page.
|
1720
|
+
# Corresponds to the JSON property `nextPageToken`
|
1721
|
+
# @return [String]
|
1722
|
+
attr_accessor :next_page_token
|
1723
|
+
|
1724
|
+
def initialize(**args)
|
1725
|
+
update!(**args)
|
1726
|
+
end
|
1727
|
+
|
1728
|
+
# Update properties of this object
|
1729
|
+
def update!(**args)
|
1730
|
+
@controls = args[:controls] if args.key?(:controls)
|
1731
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1732
|
+
end
|
1733
|
+
end
|
1734
|
+
|
1538
1735
|
# Response message for ProductService.ListProducts method.
|
1539
1736
|
class GoogleCloudRetailV2ListProductsResponse
|
1540
1737
|
include Google::Apis::Core::Hashable
|
@@ -1561,6 +1758,31 @@ module Google
|
|
1561
1758
|
end
|
1562
1759
|
end
|
1563
1760
|
|
1761
|
+
# Response for ListServingConfigs method.
|
1762
|
+
class GoogleCloudRetailV2ListServingConfigsResponse
|
1763
|
+
include Google::Apis::Core::Hashable
|
1764
|
+
|
1765
|
+
# Pagination token, if not returned indicates the last page.
|
1766
|
+
# Corresponds to the JSON property `nextPageToken`
|
1767
|
+
# @return [String]
|
1768
|
+
attr_accessor :next_page_token
|
1769
|
+
|
1770
|
+
# All the ServingConfigs for a given catalog.
|
1771
|
+
# Corresponds to the JSON property `servingConfigs`
|
1772
|
+
# @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig>]
|
1773
|
+
attr_accessor :serving_configs
|
1774
|
+
|
1775
|
+
def initialize(**args)
|
1776
|
+
update!(**args)
|
1777
|
+
end
|
1778
|
+
|
1779
|
+
# Update properties of this object
|
1780
|
+
def update!(**args)
|
1781
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1782
|
+
@serving_configs = args[:serving_configs] if args.key?(:serving_configs)
|
1783
|
+
end
|
1784
|
+
end
|
1785
|
+
|
1564
1786
|
# The inventory information at a place (e.g. a store) identified by a place ID.
|
1565
1787
|
class GoogleCloudRetailV2LocalInventory
|
1566
1788
|
include Google::Apis::Core::Hashable
|
@@ -1938,6 +2160,8 @@ module Google
|
|
1938
2160
|
attr_accessor :available_quantity
|
1939
2161
|
|
1940
2162
|
# The timestamp when this Product becomes available for SearchService.Search.
|
2163
|
+
# Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and
|
2164
|
+
# ignored for Type.VARIANT.
|
1941
2165
|
# Corresponds to the JSON property `availableTime`
|
1942
2166
|
# @return [String]
|
1943
2167
|
attr_accessor :available_time
|
@@ -1955,11 +2179,11 @@ module Google
|
|
1955
2179
|
# belonging to several parallel categories. Strongly recommended using the full
|
1956
2180
|
# path for better search / recommendation quality. To represent full path of
|
1957
2181
|
# category, use '>' sign to separate different hierarchies. If '>' is part of
|
1958
|
-
# the category name,
|
1959
|
-
#
|
1960
|
-
#
|
1961
|
-
#
|
1962
|
-
#
|
2182
|
+
# the category name, replace it with other character(s). For example, if a shoes
|
2183
|
+
# product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports &
|
2184
|
+
# Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "
|
2185
|
+
# categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic
|
2186
|
+
# Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
|
1963
2187
|
# INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product.
|
1964
2188
|
# Empty values are not allowed. Each value must be a UTF-8 encoded string with
|
1965
2189
|
# a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
|
@@ -2006,7 +2230,10 @@ module Google
|
|
2006
2230
|
attr_accessor :description
|
2007
2231
|
|
2008
2232
|
# The timestamp when this product becomes unavailable for SearchService.Search.
|
2009
|
-
#
|
2233
|
+
# Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and
|
2234
|
+
# ignored for Type.VARIANT. In general, we suggest the users to delete the stale
|
2235
|
+
# products explicitly, instead of using this field to determine staleness. If it
|
2236
|
+
# is set, the Product is not available for SearchService.Search after
|
2010
2237
|
# expire_time. However, the product can still be retrieved by ProductService.
|
2011
2238
|
# GetProduct and ProductService.ListProducts. expire_time must be later than
|
2012
2239
|
# available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown.
|
@@ -2067,6 +2294,14 @@ module Google
|
|
2067
2294
|
# @return [String]
|
2068
2295
|
attr_accessor :language_code
|
2069
2296
|
|
2297
|
+
# Output only. A list of local inventories specific to different places. This is
|
2298
|
+
# only available for users who have Retail Search enabled, and it can be managed
|
2299
|
+
# by ProductService.AddLocalInventories and ProductService.
|
2300
|
+
# RemoveLocalInventories APIs.
|
2301
|
+
# Corresponds to the JSON property `localInventories`
|
2302
|
+
# @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2LocalInventory>]
|
2303
|
+
attr_accessor :local_inventories
|
2304
|
+
|
2070
2305
|
# The material of the product. For example, "leather", "wooden". A maximum of 20
|
2071
2306
|
# values are allowed. Each value must be a UTF-8 encoded string with a length
|
2072
2307
|
# limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
@@ -2185,7 +2420,10 @@ module Google
|
|
2185
2420
|
# @return [String]
|
2186
2421
|
attr_accessor :title
|
2187
2422
|
|
2188
|
-
# Input only. The TTL (time to live) of the product.
|
2423
|
+
# Input only. The TTL (time to live) of the product. Note that this is only
|
2424
|
+
# applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
|
2425
|
+
# In general, we suggest the users to delete the stale products explicitly,
|
2426
|
+
# instead of using this field to determine staleness. If it is set, it must be a
|
2189
2427
|
# non-negative value, and expire_time is set as current timestamp plus ttl. The
|
2190
2428
|
# derived expire_time is returned in the output and ttl is left blank when
|
2191
2429
|
# retrieving the Product. If it is set, the product is not available for
|
@@ -2245,6 +2483,7 @@ module Google
|
|
2245
2483
|
@id = args[:id] if args.key?(:id)
|
2246
2484
|
@images = args[:images] if args.key?(:images)
|
2247
2485
|
@language_code = args[:language_code] if args.key?(:language_code)
|
2486
|
+
@local_inventories = args[:local_inventories] if args.key?(:local_inventories)
|
2248
2487
|
@materials = args[:materials] if args.key?(:materials)
|
2249
2488
|
@name = args[:name] if args.key?(:name)
|
2250
2489
|
@patterns = args[:patterns] if args.key?(:patterns)
|
@@ -2571,7 +2810,7 @@ module Google
|
|
2571
2810
|
end
|
2572
2811
|
end
|
2573
2812
|
|
2574
|
-
# Metadata for RejoinUserEvents method.
|
2813
|
+
# Metadata for `RejoinUserEvents` method.
|
2575
2814
|
class GoogleCloudRetailV2RejoinUserEventsMetadata
|
2576
2815
|
include Google::Apis::Core::Hashable
|
2577
2816
|
|
@@ -2589,8 +2828,8 @@ module Google
|
|
2589
2828
|
include Google::Apis::Core::Hashable
|
2590
2829
|
|
2591
2830
|
# The type of the user event rejoin to define the scope and range of the user
|
2592
|
-
# events to be rejoined with the latest product catalog. Defaults to
|
2593
|
-
# USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
|
2831
|
+
# events to be rejoined with the latest product catalog. Defaults to `
|
2832
|
+
# USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an
|
2594
2833
|
# invalid integer value.
|
2595
2834
|
# Corresponds to the JSON property `userEventRejoinScope`
|
2596
2835
|
# @return [String]
|
@@ -2606,7 +2845,7 @@ module Google
|
|
2606
2845
|
end
|
2607
2846
|
end
|
2608
2847
|
|
2609
|
-
# Response message for RejoinUserEvents method.
|
2848
|
+
# Response message for `RejoinUserEvents` method.
|
2610
2849
|
class GoogleCloudRetailV2RejoinUserEventsResponse
|
2611
2850
|
include Google::Apis::Core::Hashable
|
2612
2851
|
|
@@ -2644,6 +2883,26 @@ module Google
|
|
2644
2883
|
end
|
2645
2884
|
end
|
2646
2885
|
|
2886
|
+
# Request for RemoveControl method.
|
2887
|
+
class GoogleCloudRetailV2RemoveControlRequest
|
2888
|
+
include Google::Apis::Core::Hashable
|
2889
|
+
|
2890
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog as
|
2891
|
+
# the serving config.
|
2892
|
+
# Corresponds to the JSON property `controlId`
|
2893
|
+
# @return [String]
|
2894
|
+
attr_accessor :control_id
|
2895
|
+
|
2896
|
+
def initialize(**args)
|
2897
|
+
update!(**args)
|
2898
|
+
end
|
2899
|
+
|
2900
|
+
# Update properties of this object
|
2901
|
+
def update!(**args)
|
2902
|
+
@control_id = args[:control_id] if args.key?(:control_id)
|
2903
|
+
end
|
2904
|
+
end
|
2905
|
+
|
2647
2906
|
# Metadata related to the progress of the RemoveFulfillmentPlaces operation.
|
2648
2907
|
# Currently empty because there is no meaningful metadata populated from the
|
2649
2908
|
# ProductService.RemoveFulfillmentPlaces method.
|
@@ -2796,6 +3055,361 @@ module Google
|
|
2796
3055
|
end
|
2797
3056
|
end
|
2798
3057
|
|
3058
|
+
# Request for CatalogService.ReplaceCatalogAttribute method.
|
3059
|
+
class GoogleCloudRetailV2ReplaceCatalogAttributeRequest
|
3060
|
+
include Google::Apis::Core::Hashable
|
3061
|
+
|
3062
|
+
# Catalog level attribute config for an attribute. For example, if customers
|
3063
|
+
# want to enable/disable facet for a specific attribute.
|
3064
|
+
# Corresponds to the JSON property `catalogAttribute`
|
3065
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2CatalogAttribute]
|
3066
|
+
attr_accessor :catalog_attribute
|
3067
|
+
|
3068
|
+
# Indicates which fields in the provided CatalogAttribute to update. The
|
3069
|
+
# following are NOT supported: * CatalogAttribute.key If not set, all supported
|
3070
|
+
# fields are updated.
|
3071
|
+
# Corresponds to the JSON property `updateMask`
|
3072
|
+
# @return [String]
|
3073
|
+
attr_accessor :update_mask
|
3074
|
+
|
3075
|
+
def initialize(**args)
|
3076
|
+
update!(**args)
|
3077
|
+
end
|
3078
|
+
|
3079
|
+
# Update properties of this object
|
3080
|
+
def update!(**args)
|
3081
|
+
@catalog_attribute = args[:catalog_attribute] if args.key?(:catalog_attribute)
|
3082
|
+
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
3083
|
+
end
|
3084
|
+
end
|
3085
|
+
|
3086
|
+
# A rule is a condition-action pair * A condition defines when a rule is to be
|
3087
|
+
# triggered. * An action specifies what occurs on that trigger. Currently rules
|
3088
|
+
# only work for controls with SOLUTION_TYPE_SEARCH.
|
3089
|
+
class GoogleCloudRetailV2Rule
|
3090
|
+
include Google::Apis::Core::Hashable
|
3091
|
+
|
3092
|
+
# A boost action to apply to results matching condition specified above.
|
3093
|
+
# Corresponds to the JSON property `boostAction`
|
3094
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleBoostAction]
|
3095
|
+
attr_accessor :boost_action
|
3096
|
+
|
3097
|
+
# Metadata that is used to define a condition that triggers an action. A valid
|
3098
|
+
# condition must specify at least one of 'query_terms' or 'products_filter'. If
|
3099
|
+
# multiple fields are specified, the condition is met if all the fields are
|
3100
|
+
# satisfied e.g. if a set of query terms and product_filter are set, then only
|
3101
|
+
# items matching the product_filter for requests with a query matching the query
|
3102
|
+
# terms wil get boosted.
|
3103
|
+
# Corresponds to the JSON property `condition`
|
3104
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2Condition]
|
3105
|
+
attr_accessor :condition
|
3106
|
+
|
3107
|
+
# Prevents `query_term` from being associated with specified terms during search.
|
3108
|
+
# Example: Don't associate "gShoe" and "cheap".
|
3109
|
+
# Corresponds to the JSON property `doNotAssociateAction`
|
3110
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleDoNotAssociateAction]
|
3111
|
+
attr_accessor :do_not_associate_action
|
3112
|
+
|
3113
|
+
# * Rule Condition: - No Condition.query_terms provided is a global match. - 1
|
3114
|
+
# or more Condition.query_terms provided are combined with OR operator. * Action
|
3115
|
+
# Input: The request query and filter that are applied to the retrieved products,
|
3116
|
+
# in addition to any filters already provided with the SearchRequest. The AND
|
3117
|
+
# operator is used to combine the query's existing filters with the filter rule(
|
3118
|
+
# s). NOTE: May result in 0 results when filters conflict. * Action Result:
|
3119
|
+
# Filters the returned objects to be ONLY those that passed the filter.
|
3120
|
+
# Corresponds to the JSON property `filterAction`
|
3121
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleFilterAction]
|
3122
|
+
attr_accessor :filter_action
|
3123
|
+
|
3124
|
+
# Prevents a term in the query from being used in search. Example: Don't search
|
3125
|
+
# for "shoddy".
|
3126
|
+
# Corresponds to the JSON property `ignoreAction`
|
3127
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleIgnoreAction]
|
3128
|
+
attr_accessor :ignore_action
|
3129
|
+
|
3130
|
+
# Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
|
3131
|
+
# synonyms of each query term only. `query_terms` will not be treated as
|
3132
|
+
# synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
|
3133
|
+
# shoes" will not use a synonym of "sneakers".
|
3134
|
+
# Corresponds to the JSON property `onewaySynonymsAction`
|
3135
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleOnewaySynonymsAction]
|
3136
|
+
attr_accessor :oneway_synonyms_action
|
3137
|
+
|
3138
|
+
# Redirects a shopper to a specific page. * Rule Condition: - Must specify
|
3139
|
+
# Condition.query_terms. * Action Input: Request Query * Action Result:
|
3140
|
+
# Redirects shopper to provided uri.
|
3141
|
+
# Corresponds to the JSON property `redirectAction`
|
3142
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleRedirectAction]
|
3143
|
+
attr_accessor :redirect_action
|
3144
|
+
|
3145
|
+
# Replaces a term in the query. Multiple replacement candidates can be specified.
|
3146
|
+
# All `query_terms` will be replaced with the replacement term. Example:
|
3147
|
+
# Replace "gShoe" with "google shoe".
|
3148
|
+
# Corresponds to the JSON property `replacementAction`
|
3149
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleReplacementAction]
|
3150
|
+
attr_accessor :replacement_action
|
3151
|
+
|
3152
|
+
# Creates a set of terms that will be treated as synonyms of each other. Example:
|
3153
|
+
# synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
|
3154
|
+
# . * "shoes" will use a synonym of "sneakers".
|
3155
|
+
# Corresponds to the JSON property `twowaySynonymsAction`
|
3156
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleTwowaySynonymsAction]
|
3157
|
+
attr_accessor :twoway_synonyms_action
|
3158
|
+
|
3159
|
+
def initialize(**args)
|
3160
|
+
update!(**args)
|
3161
|
+
end
|
3162
|
+
|
3163
|
+
# Update properties of this object
|
3164
|
+
def update!(**args)
|
3165
|
+
@boost_action = args[:boost_action] if args.key?(:boost_action)
|
3166
|
+
@condition = args[:condition] if args.key?(:condition)
|
3167
|
+
@do_not_associate_action = args[:do_not_associate_action] if args.key?(:do_not_associate_action)
|
3168
|
+
@filter_action = args[:filter_action] if args.key?(:filter_action)
|
3169
|
+
@ignore_action = args[:ignore_action] if args.key?(:ignore_action)
|
3170
|
+
@oneway_synonyms_action = args[:oneway_synonyms_action] if args.key?(:oneway_synonyms_action)
|
3171
|
+
@redirect_action = args[:redirect_action] if args.key?(:redirect_action)
|
3172
|
+
@replacement_action = args[:replacement_action] if args.key?(:replacement_action)
|
3173
|
+
@twoway_synonyms_action = args[:twoway_synonyms_action] if args.key?(:twoway_synonyms_action)
|
3174
|
+
end
|
3175
|
+
end
|
3176
|
+
|
3177
|
+
# A boost action to apply to results matching condition specified above.
|
3178
|
+
class GoogleCloudRetailV2RuleBoostAction
|
3179
|
+
include Google::Apis::Core::Hashable
|
3180
|
+
|
3181
|
+
# Strength of the condition boost, which must be in [-1, 1]. Negative boost
|
3182
|
+
# means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
|
3183
|
+
# However, it does not necessarily mean that the boosted item will be the top
|
3184
|
+
# result at all times, nor that other items will be excluded. Results could
|
3185
|
+
# still be shown even when none of them matches the condition. And results that
|
3186
|
+
# are significantly more relevant to the search query can still trump your
|
3187
|
+
# heavily favored but irrelevant items. Setting to -1.0 gives the item a big
|
3188
|
+
# demotion. However, results that are deeply relevant might still be shown. The
|
3189
|
+
# item will have an upstream battle to get a fairly high ranking, but it is not
|
3190
|
+
# blocked out completely. Setting to 0.0 means no boost applied. The boosting
|
3191
|
+
# condition is ignored.
|
3192
|
+
# Corresponds to the JSON property `boost`
|
3193
|
+
# @return [Float]
|
3194
|
+
attr_accessor :boost
|
3195
|
+
|
3196
|
+
# The filter can have a max size of 5000 characters. An expression which
|
3197
|
+
# specifies which products to apply an action to. The syntax and supported
|
3198
|
+
# fields are the same as a filter expression. See SearchRequest.filter for
|
3199
|
+
# detail syntax and limitations. Examples: * To boost products with product ID "
|
3200
|
+
# product_1" or "product_2", and color "Red" or "Blue": *(id: ANY("product_1", "
|
3201
|
+
# product_2")) * *AND * *(colorFamilies: ANY("Red", "Blue")) *
|
3202
|
+
# Corresponds to the JSON property `productsFilter`
|
3203
|
+
# @return [String]
|
3204
|
+
attr_accessor :products_filter
|
3205
|
+
|
3206
|
+
def initialize(**args)
|
3207
|
+
update!(**args)
|
3208
|
+
end
|
3209
|
+
|
3210
|
+
# Update properties of this object
|
3211
|
+
def update!(**args)
|
3212
|
+
@boost = args[:boost] if args.key?(:boost)
|
3213
|
+
@products_filter = args[:products_filter] if args.key?(:products_filter)
|
3214
|
+
end
|
3215
|
+
end
|
3216
|
+
|
3217
|
+
# Prevents `query_term` from being associated with specified terms during search.
|
3218
|
+
# Example: Don't associate "gShoe" and "cheap".
|
3219
|
+
class GoogleCloudRetailV2RuleDoNotAssociateAction
|
3220
|
+
include Google::Apis::Core::Hashable
|
3221
|
+
|
3222
|
+
# Cannot contain duplicates or the query term. Can specify up to 100 terms.
|
3223
|
+
# Corresponds to the JSON property `doNotAssociateTerms`
|
3224
|
+
# @return [Array<String>]
|
3225
|
+
attr_accessor :do_not_associate_terms
|
3226
|
+
|
3227
|
+
# Terms from the search query. Will not consider do_not_associate_terms for
|
3228
|
+
# search if in search query. Can specify up to 100 terms.
|
3229
|
+
# Corresponds to the JSON property `queryTerms`
|
3230
|
+
# @return [Array<String>]
|
3231
|
+
attr_accessor :query_terms
|
3232
|
+
|
3233
|
+
# Will be [deprecated = true] post migration;
|
3234
|
+
# Corresponds to the JSON property `terms`
|
3235
|
+
# @return [Array<String>]
|
3236
|
+
attr_accessor :terms
|
3237
|
+
|
3238
|
+
def initialize(**args)
|
3239
|
+
update!(**args)
|
3240
|
+
end
|
3241
|
+
|
3242
|
+
# Update properties of this object
|
3243
|
+
def update!(**args)
|
3244
|
+
@do_not_associate_terms = args[:do_not_associate_terms] if args.key?(:do_not_associate_terms)
|
3245
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3246
|
+
@terms = args[:terms] if args.key?(:terms)
|
3247
|
+
end
|
3248
|
+
end
|
3249
|
+
|
3250
|
+
# * Rule Condition: - No Condition.query_terms provided is a global match. - 1
|
3251
|
+
# or more Condition.query_terms provided are combined with OR operator. * Action
|
3252
|
+
# Input: The request query and filter that are applied to the retrieved products,
|
3253
|
+
# in addition to any filters already provided with the SearchRequest. The AND
|
3254
|
+
# operator is used to combine the query's existing filters with the filter rule(
|
3255
|
+
# s). NOTE: May result in 0 results when filters conflict. * Action Result:
|
3256
|
+
# Filters the returned objects to be ONLY those that passed the filter.
|
3257
|
+
class GoogleCloudRetailV2RuleFilterAction
|
3258
|
+
include Google::Apis::Core::Hashable
|
3259
|
+
|
3260
|
+
# A filter to apply on the matching condition results. Supported features: *
|
3261
|
+
# filter must be set. * Filter syntax is identical to SearchRequest.filter. See
|
3262
|
+
# more details at the Retail Search [user guide](/retail/search/docs/filter-and-
|
3263
|
+
# order#filter). * To filter products with product ID "product_1" or "product_2",
|
3264
|
+
# and color "Red" or "Blue": *(id: ANY("product_1", "product_2")) * *AND * *(
|
3265
|
+
# colorFamilies: ANY("Red", "Blue")) *
|
3266
|
+
# Corresponds to the JSON property `filter`
|
3267
|
+
# @return [String]
|
3268
|
+
attr_accessor :filter
|
3269
|
+
|
3270
|
+
def initialize(**args)
|
3271
|
+
update!(**args)
|
3272
|
+
end
|
3273
|
+
|
3274
|
+
# Update properties of this object
|
3275
|
+
def update!(**args)
|
3276
|
+
@filter = args[:filter] if args.key?(:filter)
|
3277
|
+
end
|
3278
|
+
end
|
3279
|
+
|
3280
|
+
# Prevents a term in the query from being used in search. Example: Don't search
|
3281
|
+
# for "shoddy".
|
3282
|
+
class GoogleCloudRetailV2RuleIgnoreAction
|
3283
|
+
include Google::Apis::Core::Hashable
|
3284
|
+
|
3285
|
+
# Terms to ignore in the search query.
|
3286
|
+
# Corresponds to the JSON property `ignoreTerms`
|
3287
|
+
# @return [Array<String>]
|
3288
|
+
attr_accessor :ignore_terms
|
3289
|
+
|
3290
|
+
def initialize(**args)
|
3291
|
+
update!(**args)
|
3292
|
+
end
|
3293
|
+
|
3294
|
+
# Update properties of this object
|
3295
|
+
def update!(**args)
|
3296
|
+
@ignore_terms = args[:ignore_terms] if args.key?(:ignore_terms)
|
3297
|
+
end
|
3298
|
+
end
|
3299
|
+
|
3300
|
+
# Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
|
3301
|
+
# synonyms of each query term only. `query_terms` will not be treated as
|
3302
|
+
# synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
|
3303
|
+
# shoes" will not use a synonym of "sneakers".
|
3304
|
+
class GoogleCloudRetailV2RuleOnewaySynonymsAction
|
3305
|
+
include Google::Apis::Core::Hashable
|
3306
|
+
|
3307
|
+
# Will be [deprecated = true] post migration;
|
3308
|
+
# Corresponds to the JSON property `onewayTerms`
|
3309
|
+
# @return [Array<String>]
|
3310
|
+
attr_accessor :oneway_terms
|
3311
|
+
|
3312
|
+
# Terms from the search query. Will treat synonyms as their synonyms. Not
|
3313
|
+
# themselves synonyms of the synonyms. Can specify up to 100 terms.
|
3314
|
+
# Corresponds to the JSON property `queryTerms`
|
3315
|
+
# @return [Array<String>]
|
3316
|
+
attr_accessor :query_terms
|
3317
|
+
|
3318
|
+
# Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100
|
3319
|
+
# synonyms.
|
3320
|
+
# Corresponds to the JSON property `synonyms`
|
3321
|
+
# @return [Array<String>]
|
3322
|
+
attr_accessor :synonyms
|
3323
|
+
|
3324
|
+
def initialize(**args)
|
3325
|
+
update!(**args)
|
3326
|
+
end
|
3327
|
+
|
3328
|
+
# Update properties of this object
|
3329
|
+
def update!(**args)
|
3330
|
+
@oneway_terms = args[:oneway_terms] if args.key?(:oneway_terms)
|
3331
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3332
|
+
@synonyms = args[:synonyms] if args.key?(:synonyms)
|
3333
|
+
end
|
3334
|
+
end
|
3335
|
+
|
3336
|
+
# Redirects a shopper to a specific page. * Rule Condition: - Must specify
|
3337
|
+
# Condition.query_terms. * Action Input: Request Query * Action Result:
|
3338
|
+
# Redirects shopper to provided uri.
|
3339
|
+
class GoogleCloudRetailV2RuleRedirectAction
|
3340
|
+
include Google::Apis::Core::Hashable
|
3341
|
+
|
3342
|
+
# URL must have length equal or less than 2000 characters.
|
3343
|
+
# Corresponds to the JSON property `redirectUri`
|
3344
|
+
# @return [String]
|
3345
|
+
attr_accessor :redirect_uri
|
3346
|
+
|
3347
|
+
def initialize(**args)
|
3348
|
+
update!(**args)
|
3349
|
+
end
|
3350
|
+
|
3351
|
+
# Update properties of this object
|
3352
|
+
def update!(**args)
|
3353
|
+
@redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
|
3354
|
+
end
|
3355
|
+
end
|
3356
|
+
|
3357
|
+
# Replaces a term in the query. Multiple replacement candidates can be specified.
|
3358
|
+
# All `query_terms` will be replaced with the replacement term. Example:
|
3359
|
+
# Replace "gShoe" with "google shoe".
|
3360
|
+
class GoogleCloudRetailV2RuleReplacementAction
|
3361
|
+
include Google::Apis::Core::Hashable
|
3362
|
+
|
3363
|
+
# Terms from the search query. Will be replaced by replacement term. Can specify
|
3364
|
+
# up to 100 terms.
|
3365
|
+
# Corresponds to the JSON property `queryTerms`
|
3366
|
+
# @return [Array<String>]
|
3367
|
+
attr_accessor :query_terms
|
3368
|
+
|
3369
|
+
# Term that will be used for replacement.
|
3370
|
+
# Corresponds to the JSON property `replacementTerm`
|
3371
|
+
# @return [String]
|
3372
|
+
attr_accessor :replacement_term
|
3373
|
+
|
3374
|
+
# Will be [deprecated = true] post migration;
|
3375
|
+
# Corresponds to the JSON property `term`
|
3376
|
+
# @return [String]
|
3377
|
+
attr_accessor :term
|
3378
|
+
|
3379
|
+
def initialize(**args)
|
3380
|
+
update!(**args)
|
3381
|
+
end
|
3382
|
+
|
3383
|
+
# Update properties of this object
|
3384
|
+
def update!(**args)
|
3385
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3386
|
+
@replacement_term = args[:replacement_term] if args.key?(:replacement_term)
|
3387
|
+
@term = args[:term] if args.key?(:term)
|
3388
|
+
end
|
3389
|
+
end
|
3390
|
+
|
3391
|
+
# Creates a set of terms that will be treated as synonyms of each other. Example:
|
3392
|
+
# synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
|
3393
|
+
# . * "shoes" will use a synonym of "sneakers".
|
3394
|
+
class GoogleCloudRetailV2RuleTwowaySynonymsAction
|
3395
|
+
include Google::Apis::Core::Hashable
|
3396
|
+
|
3397
|
+
# Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at
|
3398
|
+
# least 2 synonyms.
|
3399
|
+
# Corresponds to the JSON property `synonyms`
|
3400
|
+
# @return [Array<String>]
|
3401
|
+
attr_accessor :synonyms
|
3402
|
+
|
3403
|
+
def initialize(**args)
|
3404
|
+
update!(**args)
|
3405
|
+
end
|
3406
|
+
|
3407
|
+
# Update properties of this object
|
3408
|
+
def update!(**args)
|
3409
|
+
@synonyms = args[:synonyms] if args.key?(:synonyms)
|
3410
|
+
end
|
3411
|
+
end
|
3412
|
+
|
2799
3413
|
# Request message for SearchService.Search method.
|
2800
3414
|
class GoogleCloudRetailV2SearchRequest
|
2801
3415
|
include Google::Apis::Core::Hashable
|
@@ -2880,9 +3494,9 @@ module Google
|
|
2880
3494
|
# navigation queries to achieve good search quality. The format should be the
|
2881
3495
|
# same as UserEvent.page_categories; To represent full path of category, use '>'
|
2882
3496
|
# sign to separate different hierarchies. If '>' is part of the category name,
|
2883
|
-
#
|
2884
|
-
#
|
2885
|
-
#
|
3497
|
+
# replace it with other character(s). Category pages include special pages such
|
3498
|
+
# as sales or promotions. For instance, a special sale page may have the
|
3499
|
+
# category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
|
2886
3500
|
# Corresponds to the JSON property `pageCategories`
|
2887
3501
|
# @return [Array<String>]
|
2888
3502
|
attr_accessor :page_categories
|
@@ -3607,6 +4221,193 @@ module Google
|
|
3607
4221
|
end
|
3608
4222
|
end
|
3609
4223
|
|
4224
|
+
# Configures metadata that is used to generate serving time results (e.g. search
|
4225
|
+
# results or recommendation predictions).
|
4226
|
+
class GoogleCloudRetailV2ServingConfig
|
4227
|
+
include Google::Apis::Core::Hashable
|
4228
|
+
|
4229
|
+
# Condition boost specifications. If a product matches multiple conditions in
|
4230
|
+
# the specifications, boost scores from these specifications are all applied and
|
4231
|
+
# combined in a non-linear way. Maximum number of specifications is 100. Notice
|
4232
|
+
# that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are
|
4233
|
+
# set, the boost conditions from both places are evaluated. If a search request
|
4234
|
+
# matches multiple boost conditions, the final boost score is equal to the sum
|
4235
|
+
# of the boost scores from all matched boost conditions. Can only be set if
|
4236
|
+
# solution_types is SOLUTION_TYPE_SEARCH.
|
4237
|
+
# Corresponds to the JSON property `boostControlIds`
|
4238
|
+
# @return [Array<String>]
|
4239
|
+
attr_accessor :boost_control_ids
|
4240
|
+
|
4241
|
+
# Required. The human readable serving config display name. Used in Retail UI.
|
4242
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
4243
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
4244
|
+
# Corresponds to the JSON property `displayName`
|
4245
|
+
# @return [String]
|
4246
|
+
attr_accessor :display_name
|
4247
|
+
|
4248
|
+
# How much diversity to use in recommendation model results e.g. `medium-
|
4249
|
+
# diversity` or `high-diversity`. Currently supported values: * `no-diversity` *
|
4250
|
+
# `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If
|
4251
|
+
# not specified, we choose default based on recommendation model type. Default
|
4252
|
+
# value: `no-diversity`. Can only be set if solution_types is
|
4253
|
+
# SOLUTION_TYPE_RECOMMENDATION.
|
4254
|
+
# Corresponds to the JSON property `diversityLevel`
|
4255
|
+
# @return [String]
|
4256
|
+
attr_accessor :diversity_level
|
4257
|
+
|
4258
|
+
# What kind of diversity to use - data driven or rule based.
|
4259
|
+
# Corresponds to the JSON property `diversityType`
|
4260
|
+
# @return [String]
|
4261
|
+
attr_accessor :diversity_type
|
4262
|
+
|
4263
|
+
# Condition do not associate specifications. If multiple do not associate
|
4264
|
+
# conditions match, all matching do not associate controls in the list will
|
4265
|
+
# execute. - Order does not matter. - Maximum number of specifications is 100.
|
4266
|
+
# Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4267
|
+
# Corresponds to the JSON property `doNotAssociateControlIds`
|
4268
|
+
# @return [Array<String>]
|
4269
|
+
attr_accessor :do_not_associate_control_ids
|
4270
|
+
|
4271
|
+
# The specifications of dynamically generated facets.
|
4272
|
+
# Corresponds to the JSON property `dynamicFacetSpec`
|
4273
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequestDynamicFacetSpec]
|
4274
|
+
attr_accessor :dynamic_facet_spec
|
4275
|
+
|
4276
|
+
# Whether to add additional category filters on the `similar-items` model. If
|
4277
|
+
# not specified, we enable it by default. Allowed values are: * `no-category-
|
4278
|
+
# match`: No additional filtering of original results from the model and the
|
4279
|
+
# customer's filters. * `relaxed-category-match`: Only keep results with
|
4280
|
+
# categories that match at least one item categories in the PredictRequests's
|
4281
|
+
# context item. * If customer also sends filters in the PredictRequest, then the
|
4282
|
+
# results will satisfy both conditions (user given and category match). Can only
|
4283
|
+
# be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
|
4284
|
+
# Corresponds to the JSON property `enableCategoryFilterLevel`
|
4285
|
+
# @return [String]
|
4286
|
+
attr_accessor :enable_category_filter_level
|
4287
|
+
|
4288
|
+
# Facet specifications for faceted search. If empty, no facets are returned. The
|
4289
|
+
# ids refer to the ids of Control resources with only the Facet control set.
|
4290
|
+
# These controls are assumed to be in the same Catalog as the ServingConfig. A
|
4291
|
+
# maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
|
4292
|
+
# returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4293
|
+
# Corresponds to the JSON property `facetControlIds`
|
4294
|
+
# @return [Array<String>]
|
4295
|
+
attr_accessor :facet_control_ids
|
4296
|
+
|
4297
|
+
# Condition filter specifications. If a product matches multiple conditions in
|
4298
|
+
# the specifications, filters from these specifications are all applied and
|
4299
|
+
# combined via the AND operator. Maximum number of specifications is 100. Can
|
4300
|
+
# only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4301
|
+
# Corresponds to the JSON property `filterControlIds`
|
4302
|
+
# @return [Array<String>]
|
4303
|
+
attr_accessor :filter_control_ids
|
4304
|
+
|
4305
|
+
# Condition ignore specifications. If multiple ignore conditions match, all
|
4306
|
+
# matching ignore controls in the list will execute. - Order does not matter. -
|
4307
|
+
# Maximum number of specifications is 100. Can only be set if solution_types is
|
4308
|
+
# SOLUTION_TYPE_SEARCH.
|
4309
|
+
# Corresponds to the JSON property `ignoreControlIds`
|
4310
|
+
# @return [Array<String>]
|
4311
|
+
attr_accessor :ignore_control_ids
|
4312
|
+
|
4313
|
+
# The id of the model in the same Catalog to use at serving time. Currently only
|
4314
|
+
# RecommendationModels are supported: https://cloud.google.com/retail/
|
4315
|
+
# recommendations-ai/docs/create-models Can be changed but only to a compatible
|
4316
|
+
# model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
|
4317
|
+
# solution_types is SOLUTION_TYPE_RECOMMENDATION.
|
4318
|
+
# Corresponds to the JSON property `modelId`
|
4319
|
+
# @return [String]
|
4320
|
+
attr_accessor :model_id
|
4321
|
+
|
4322
|
+
# Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/
|
4323
|
+
# servingConfig/*`
|
4324
|
+
# Corresponds to the JSON property `name`
|
4325
|
+
# @return [String]
|
4326
|
+
attr_accessor :name
|
4327
|
+
|
4328
|
+
# Condition oneway synonyms specifications. If multiple oneway synonyms
|
4329
|
+
# conditions match, all matching oneway synonyms controls in the list will
|
4330
|
+
# execute. Order of controls in the list will not matter. Maximum number of
|
4331
|
+
# specifications is 100. Can only be set if solution_types is
|
4332
|
+
# SOLUTION_TYPE_SEARCH.
|
4333
|
+
# Corresponds to the JSON property `onewaySynonymsControlIds`
|
4334
|
+
# @return [Array<String>]
|
4335
|
+
attr_accessor :oneway_synonyms_control_ids
|
4336
|
+
|
4337
|
+
# The specification for personalization.
|
4338
|
+
# Corresponds to the JSON property `personalizationSpec`
|
4339
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequestPersonalizationSpec]
|
4340
|
+
attr_accessor :personalization_spec
|
4341
|
+
|
4342
|
+
# How much price ranking we want in serving results. Price reranking causes
|
4343
|
+
# product items with a similar recommendation probability to be ordered by price,
|
4344
|
+
# with the highest-priced items first. This setting could result in a decrease
|
4345
|
+
# in click-through and conversion rates. Allowed values are: * `no-price-
|
4346
|
+
# reranking` * `low-price-raranking` * `medium-price-reranking` * `high-price-
|
4347
|
+
# reranking` If not specified, we choose default based on model type. Default
|
4348
|
+
# value: `no-price-reranking`. Can only be set if solution_types is
|
4349
|
+
# SOLUTION_TYPE_RECOMMENDATION.
|
4350
|
+
# Corresponds to the JSON property `priceRerankingLevel`
|
4351
|
+
# @return [String]
|
4352
|
+
attr_accessor :price_reranking_level
|
4353
|
+
|
4354
|
+
# Condition redirect specifications. Only the first triggered redirect action is
|
4355
|
+
# applied, even if multiple apply. Maximum number of specifications is 1000. Can
|
4356
|
+
# only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4357
|
+
# Corresponds to the JSON property `redirectControlIds`
|
4358
|
+
# @return [Array<String>]
|
4359
|
+
attr_accessor :redirect_control_ids
|
4360
|
+
|
4361
|
+
# Condition replacement specifications. - Applied according to the order in the
|
4362
|
+
# list. - A previously replaced term can not be re-replaced. - Maximum number of
|
4363
|
+
# specifications is 100. Can only be set if solution_types is
|
4364
|
+
# SOLUTION_TYPE_SEARCH.
|
4365
|
+
# Corresponds to the JSON property `replacementControlIds`
|
4366
|
+
# @return [Array<String>]
|
4367
|
+
attr_accessor :replacement_control_ids
|
4368
|
+
|
4369
|
+
# Required. Immutable. Specifies the solution types that a serving config can be
|
4370
|
+
# associated with. Currently we support setting only one type of solution.
|
4371
|
+
# Corresponds to the JSON property `solutionTypes`
|
4372
|
+
# @return [Array<String>]
|
4373
|
+
attr_accessor :solution_types
|
4374
|
+
|
4375
|
+
# Condition synonyms specifications. If multiple syonyms conditions match, all
|
4376
|
+
# matching synonyms control in the list will execute. Order of controls in the
|
4377
|
+
# list will not matter. Maximum number of specifications is 100. Can only be set
|
4378
|
+
# if solution_types is SOLUTION_TYPE_SEARCH.
|
4379
|
+
# Corresponds to the JSON property `twowaySynonymsControlIds`
|
4380
|
+
# @return [Array<String>]
|
4381
|
+
attr_accessor :twoway_synonyms_control_ids
|
4382
|
+
|
4383
|
+
def initialize(**args)
|
4384
|
+
update!(**args)
|
4385
|
+
end
|
4386
|
+
|
4387
|
+
# Update properties of this object
|
4388
|
+
def update!(**args)
|
4389
|
+
@boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
|
4390
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
4391
|
+
@diversity_level = args[:diversity_level] if args.key?(:diversity_level)
|
4392
|
+
@diversity_type = args[:diversity_type] if args.key?(:diversity_type)
|
4393
|
+
@do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids)
|
4394
|
+
@dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
|
4395
|
+
@enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level)
|
4396
|
+
@facet_control_ids = args[:facet_control_ids] if args.key?(:facet_control_ids)
|
4397
|
+
@filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
|
4398
|
+
@ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
|
4399
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
4400
|
+
@name = args[:name] if args.key?(:name)
|
4401
|
+
@oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
|
4402
|
+
@personalization_spec = args[:personalization_spec] if args.key?(:personalization_spec)
|
4403
|
+
@price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level)
|
4404
|
+
@redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
|
4405
|
+
@replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
|
4406
|
+
@solution_types = args[:solution_types] if args.key?(:solution_types)
|
4407
|
+
@twoway_synonyms_control_ids = args[:twoway_synonyms_control_ids] if args.key?(:twoway_synonyms_control_ids)
|
4408
|
+
end
|
4409
|
+
end
|
4410
|
+
|
3610
4411
|
# Request message to set a specified branch as new default_branch.
|
3611
4412
|
class GoogleCloudRetailV2SetDefaultBranchRequest
|
3612
4413
|
include Google::Apis::Core::Hashable
|
@@ -3829,12 +4630,12 @@ module Google
|
|
3829
4630
|
|
3830
4631
|
# The categories associated with a category page. To represent full path of
|
3831
4632
|
# category, use '>' sign to separate different hierarchies. If '>' is part of
|
3832
|
-
# the category name,
|
3833
|
-
#
|
3834
|
-
#
|
3835
|
-
#
|
3836
|
-
#
|
3837
|
-
#
|
4633
|
+
# the category name, replace it with other character(s). Category pages include
|
4634
|
+
# special pages such as sales or promotions. For instance, a special sale page
|
4635
|
+
# may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black
|
4636
|
+
# Friday Deals"]. Required for `category-page-view` events. At least one of
|
4637
|
+
# search_query or page_categories is required for `search` events. Other event
|
4638
|
+
# types should not set this field. Otherwise, an INVALID_ARGUMENT error is
|
3838
4639
|
# returned.
|
3839
4640
|
# Corresponds to the JSON property `pageCategories`
|
3840
4641
|
# @return [Array<String>]
|
@@ -4172,8 +4973,9 @@ module Google
|
|
4172
4973
|
class GoogleCloudRetailV2alphaCreateModelMetadata
|
4173
4974
|
include Google::Apis::Core::Hashable
|
4174
4975
|
|
4175
|
-
# The resource name of the model that this create applies to. Format: projects/`
|
4976
|
+
# The resource name of the model that this create applies to. Format: `projects/`
|
4176
4977
|
# project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
|
4978
|
+
# `
|
4177
4979
|
# Corresponds to the JSON property `model`
|
4178
4980
|
# @return [String]
|
4179
4981
|
attr_accessor :model
|
@@ -4209,8 +5011,8 @@ module Google
|
|
4209
5011
|
end
|
4210
5012
|
end
|
4211
5013
|
|
4212
|
-
# Metadata related to the progress of the Export operation. This
|
4213
|
-
#
|
5014
|
+
# Metadata related to the progress of the Export operation. This is returned by
|
5015
|
+
# the google.longrunning.Operation.metadata field.
|
4214
5016
|
class GoogleCloudRetailV2alphaExportMetadata
|
4215
5017
|
include Google::Apis::Core::Hashable
|
4216
5018
|
|
@@ -4515,7 +5317,13 @@ module Google
|
|
4515
5317
|
# ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on
|
4516
5318
|
# model type. Default depends on type of recommendation: `recommended-for-you` =>
|
4517
5319
|
# `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `
|
4518
|
-
# revenue_per_order`
|
5320
|
+
# revenue_per_order` This field together with optimization_objective describe
|
5321
|
+
# model metadata to use to control model training and serving. See https://cloud.
|
5322
|
+
# google.com/retail/docs/models for more details on what the model metadata
|
5323
|
+
# control and which combination of parameters are valid. For invalid
|
5324
|
+
# combinations of parameters (e.g. type = `frequently-bought-together` and
|
5325
|
+
# optimization_objective = `ctr`), you receive an error 400 if you try to create/
|
5326
|
+
# update a recommendation with this set of knobs.
|
4519
5327
|
# Corresponds to the JSON property `optimizationObjective`
|
4520
5328
|
# @return [String]
|
4521
5329
|
attr_accessor :optimization_objective
|
@@ -4565,7 +5373,13 @@ module Google
|
|
4565
5373
|
# Required. The type of model e.g. `home-page`. Currently supported values: `
|
4566
5374
|
# recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `
|
4567
5375
|
# page-optimization`, `similar-items`, `buy-it-again`, and `recently-viewed`(
|
4568
|
-
# readonly value).
|
5376
|
+
# readonly value). This field together with optimization_objective describe
|
5377
|
+
# model metadata to use to control model training and serving. See https://cloud.
|
5378
|
+
# google.com/retail/docs/models for more details on what the model metadata
|
5379
|
+
# control and which combination of parameters are valid. For invalid
|
5380
|
+
# combinations of parameters (e.g. type = `frequently-bought-together` and
|
5381
|
+
# optimization_objective = `ctr`), you receive an error 400 if you try to create/
|
5382
|
+
# update a recommendation with this set of knobs.
|
4569
5383
|
# Corresponds to the JSON property `type`
|
4570
5384
|
# @return [String]
|
4571
5385
|
attr_accessor :type
|
@@ -4842,7 +5656,7 @@ module Google
|
|
4842
5656
|
end
|
4843
5657
|
end
|
4844
5658
|
|
4845
|
-
# Metadata for RejoinUserEvents method.
|
5659
|
+
# Metadata for `RejoinUserEvents` method.
|
4846
5660
|
class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
|
4847
5661
|
include Google::Apis::Core::Hashable
|
4848
5662
|
|
@@ -4855,7 +5669,7 @@ module Google
|
|
4855
5669
|
end
|
4856
5670
|
end
|
4857
5671
|
|
4858
|
-
# Response message for RejoinUserEvents method.
|
5672
|
+
# Response message for `RejoinUserEvents` method.
|
4859
5673
|
class GoogleCloudRetailV2alphaRejoinUserEventsResponse
|
4860
5674
|
include Google::Apis::Core::Hashable
|
4861
5675
|
|
@@ -4993,8 +5807,9 @@ module Google
|
|
4993
5807
|
class GoogleCloudRetailV2alphaTuneModelMetadata
|
4994
5808
|
include Google::Apis::Core::Hashable
|
4995
5809
|
|
4996
|
-
# The resource name of the model that this tune applies to. Format: projects/`
|
5810
|
+
# The resource name of the model that this tune applies to. Format: `projects/`
|
4997
5811
|
# project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
|
5812
|
+
# `
|
4998
5813
|
# Corresponds to the JSON property `model`
|
4999
5814
|
# @return [String]
|
5000
5815
|
attr_accessor :model
|
@@ -5155,8 +5970,8 @@ module Google
|
|
5155
5970
|
end
|
5156
5971
|
end
|
5157
5972
|
|
5158
|
-
# Metadata related to the progress of the Export operation. This
|
5159
|
-
#
|
5973
|
+
# Metadata related to the progress of the Export operation. This is returned by
|
5974
|
+
# the google.longrunning.Operation.metadata field.
|
5160
5975
|
class GoogleCloudRetailV2betaExportMetadata
|
5161
5976
|
include Google::Apis::Core::Hashable
|
5162
5977
|
|
@@ -5459,7 +6274,7 @@ module Google
|
|
5459
6274
|
end
|
5460
6275
|
end
|
5461
6276
|
|
5462
|
-
# Metadata for RejoinUserEvents method.
|
6277
|
+
# Metadata for `RejoinUserEvents` method.
|
5463
6278
|
class GoogleCloudRetailV2betaRejoinUserEventsMetadata
|
5464
6279
|
include Google::Apis::Core::Hashable
|
5465
6280
|
|
@@ -5472,7 +6287,7 @@ module Google
|
|
5472
6287
|
end
|
5473
6288
|
end
|
5474
6289
|
|
5475
|
-
# Response message for RejoinUserEvents method.
|
6290
|
+
# Response message for `RejoinUserEvents` method.
|
5476
6291
|
class GoogleCloudRetailV2betaRejoinUserEventsResponse
|
5477
6292
|
include Google::Apis::Core::Hashable
|
5478
6293
|
|