google-apis-retail_v2alpha 0.25.0 → 0.26.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -618,6 +618,26 @@ module Google
|
|
618
618
|
end
|
619
619
|
end
|
620
620
|
|
621
|
+
# Request for AddControl method.
|
622
|
+
class GoogleCloudRetailV2alphaAddControlRequest
|
623
|
+
include Google::Apis::Core::Hashable
|
624
|
+
|
625
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog as
|
626
|
+
# the serving config - if id is not found a NOT_FOUND error is returned.
|
627
|
+
# Corresponds to the JSON property `controlId`
|
628
|
+
# @return [String]
|
629
|
+
attr_accessor :control_id
|
630
|
+
|
631
|
+
def initialize(**args)
|
632
|
+
update!(**args)
|
633
|
+
end
|
634
|
+
|
635
|
+
# Update properties of this object
|
636
|
+
def update!(**args)
|
637
|
+
@control_id = args[:control_id] if args.key?(:control_id)
|
638
|
+
end
|
639
|
+
end
|
640
|
+
|
621
641
|
# Metadata related to the progress of the AddFulfillmentPlaces operation.
|
622
642
|
# Currently empty because there is no meaningful metadata populated from the
|
623
643
|
# AddFulfillmentPlaces method.
|
@@ -1108,6 +1128,153 @@ module Google
|
|
1108
1128
|
end
|
1109
1129
|
end
|
1110
1130
|
|
1131
|
+
# Metadata that is used to define a condition that triggers an action. A valid
|
1132
|
+
# condition must specify at least one of 'query_terms' or 'products_filter'. If
|
1133
|
+
# multiple fields are specified, the condition is met if all the fields are
|
1134
|
+
# satisfied e.g. if a set of query terms and product_filter are set, then only
|
1135
|
+
# items matching the product_filter for requests with a query matching the query
|
1136
|
+
# terms wil get boosted.
|
1137
|
+
class GoogleCloudRetailV2alphaCondition
|
1138
|
+
include Google::Apis::Core::Hashable
|
1139
|
+
|
1140
|
+
# Range of time(s) specifying when Condition is active. Condition true if any
|
1141
|
+
# time range matches.
|
1142
|
+
# Corresponds to the JSON property `activeTimeRange`
|
1143
|
+
# @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConditionTimeRange>]
|
1144
|
+
attr_accessor :active_time_range
|
1145
|
+
|
1146
|
+
# A list (up to 10 entries) of terms to match the query on. If not specified,
|
1147
|
+
# match all queries. If many query terms are specified, the condition is matched
|
1148
|
+
# if any of the terms is a match (i.e. using the OR operator).
|
1149
|
+
# Corresponds to the JSON property `queryTerms`
|
1150
|
+
# @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaConditionQueryTerm>]
|
1151
|
+
attr_accessor :query_terms
|
1152
|
+
|
1153
|
+
def initialize(**args)
|
1154
|
+
update!(**args)
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# Update properties of this object
|
1158
|
+
def update!(**args)
|
1159
|
+
@active_time_range = args[:active_time_range] if args.key?(:active_time_range)
|
1160
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
1161
|
+
end
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
# Query terms that we want to match on.
|
1165
|
+
class GoogleCloudRetailV2alphaConditionQueryTerm
|
1166
|
+
include Google::Apis::Core::Hashable
|
1167
|
+
|
1168
|
+
# Whether this is supposed to be a full or partial match.
|
1169
|
+
# Corresponds to the JSON property `fullMatch`
|
1170
|
+
# @return [Boolean]
|
1171
|
+
attr_accessor :full_match
|
1172
|
+
alias_method :full_match?, :full_match
|
1173
|
+
|
1174
|
+
# The value of the term to match on. Value cannot be empty. Value can have at
|
1175
|
+
# most 3 terms if specified as a partial match. Each space separated string is
|
1176
|
+
# considered as one term. Example) "a b c" is 3 terms and allowed, " a b c d" is
|
1177
|
+
# 4 terms and not allowed for partial match.
|
1178
|
+
# Corresponds to the JSON property `value`
|
1179
|
+
# @return [String]
|
1180
|
+
attr_accessor :value
|
1181
|
+
|
1182
|
+
def initialize(**args)
|
1183
|
+
update!(**args)
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
# Update properties of this object
|
1187
|
+
def update!(**args)
|
1188
|
+
@full_match = args[:full_match] if args.key?(:full_match)
|
1189
|
+
@value = args[:value] if args.key?(:value)
|
1190
|
+
end
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
# Used for time-dependent conditions. Example: Want to have rule applied for
|
1194
|
+
# week long sale.
|
1195
|
+
class GoogleCloudRetailV2alphaConditionTimeRange
|
1196
|
+
include Google::Apis::Core::Hashable
|
1197
|
+
|
1198
|
+
# End of time range. Range is inclusive.
|
1199
|
+
# Corresponds to the JSON property `endTime`
|
1200
|
+
# @return [String]
|
1201
|
+
attr_accessor :end_time
|
1202
|
+
|
1203
|
+
# Start of time range. Range is inclusive.
|
1204
|
+
# Corresponds to the JSON property `startTime`
|
1205
|
+
# @return [String]
|
1206
|
+
attr_accessor :start_time
|
1207
|
+
|
1208
|
+
def initialize(**args)
|
1209
|
+
update!(**args)
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
# Update properties of this object
|
1213
|
+
def update!(**args)
|
1214
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
1215
|
+
@start_time = args[:start_time] if args.key?(:start_time)
|
1216
|
+
end
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
# Configures dynamic serving time metadata that is used to pre and post process
|
1220
|
+
# search/recommendation model results.
|
1221
|
+
class GoogleCloudRetailV2alphaControl
|
1222
|
+
include Google::Apis::Core::Hashable
|
1223
|
+
|
1224
|
+
# Output only. List of serving configuration ids that that are associated with
|
1225
|
+
# this control. Note the association is managed via the ServingConfig, this is
|
1226
|
+
# an output only denormalizeed view. Assumed to be in the same catalog.
|
1227
|
+
# Corresponds to the JSON property `associatedServingConfigIds`
|
1228
|
+
# @return [Array<String>]
|
1229
|
+
attr_accessor :associated_serving_config_ids
|
1230
|
+
|
1231
|
+
# Required. The human readable control display name. Used in Retail UI. This
|
1232
|
+
# field must be a UTF-8 encoded string with a length limit of 128 characters.
|
1233
|
+
# Otherwise, an INVALID_ARGUMENT error is thrown.
|
1234
|
+
# Corresponds to the JSON property `displayName`
|
1235
|
+
# @return [String]
|
1236
|
+
attr_accessor :display_name
|
1237
|
+
|
1238
|
+
# A facet specification to perform faceted search.
|
1239
|
+
# Corresponds to the JSON property `facetSpec`
|
1240
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestFacetSpec]
|
1241
|
+
attr_accessor :facet_spec
|
1242
|
+
|
1243
|
+
# Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
|
1244
|
+
# controls/*
|
1245
|
+
# Corresponds to the JSON property `name`
|
1246
|
+
# @return [String]
|
1247
|
+
attr_accessor :name
|
1248
|
+
|
1249
|
+
# A rule is a condition-action pair * A condition defines when a rule is to be
|
1250
|
+
# triggered. * An action specifies what occurs on that trigger. Currently only
|
1251
|
+
# boost rules are supported. Currently only supported by the search endpoint.
|
1252
|
+
# Corresponds to the JSON property `rule`
|
1253
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRule]
|
1254
|
+
attr_accessor :rule
|
1255
|
+
|
1256
|
+
# Required. Immutable. The solution types that the serving config is used for.
|
1257
|
+
# Currently we support setting only one type of solution at creation time. Only `
|
1258
|
+
# SOLUTION_TYPE_SEARCH` value is supported at the moment.
|
1259
|
+
# Corresponds to the JSON property `solutionTypes`
|
1260
|
+
# @return [Array<String>]
|
1261
|
+
attr_accessor :solution_types
|
1262
|
+
|
1263
|
+
def initialize(**args)
|
1264
|
+
update!(**args)
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Update properties of this object
|
1268
|
+
def update!(**args)
|
1269
|
+
@associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids)
|
1270
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1271
|
+
@facet_spec = args[:facet_spec] if args.key?(:facet_spec)
|
1272
|
+
@name = args[:name] if args.key?(:name)
|
1273
|
+
@rule = args[:rule] if args.key?(:rule)
|
1274
|
+
@solution_types = args[:solution_types] if args.key?(:solution_types)
|
1275
|
+
end
|
1276
|
+
end
|
1277
|
+
|
1111
1278
|
# A custom attribute that is not explicitly modeled in Product.
|
1112
1279
|
class GoogleCloudRetailV2alphaCustomAttribute
|
1113
1280
|
include Google::Apis::Core::Hashable
|
@@ -1735,6 +1902,31 @@ module Google
|
|
1735
1902
|
end
|
1736
1903
|
end
|
1737
1904
|
|
1905
|
+
# Response for ListControls method.
|
1906
|
+
class GoogleCloudRetailV2alphaListControlsResponse
|
1907
|
+
include Google::Apis::Core::Hashable
|
1908
|
+
|
1909
|
+
# All the Controls for a given catalog.
|
1910
|
+
# Corresponds to the JSON property `controls`
|
1911
|
+
# @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaControl>]
|
1912
|
+
attr_accessor :controls
|
1913
|
+
|
1914
|
+
# Pagination token, if not returned indicates the last page.
|
1915
|
+
# Corresponds to the JSON property `nextPageToken`
|
1916
|
+
# @return [String]
|
1917
|
+
attr_accessor :next_page_token
|
1918
|
+
|
1919
|
+
def initialize(**args)
|
1920
|
+
update!(**args)
|
1921
|
+
end
|
1922
|
+
|
1923
|
+
# Update properties of this object
|
1924
|
+
def update!(**args)
|
1925
|
+
@controls = args[:controls] if args.key?(:controls)
|
1926
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1927
|
+
end
|
1928
|
+
end
|
1929
|
+
|
1738
1930
|
# Response message for ProductService.ListProducts method.
|
1739
1931
|
class GoogleCloudRetailV2alphaListProductsResponse
|
1740
1932
|
include Google::Apis::Core::Hashable
|
@@ -1770,6 +1962,31 @@ module Google
|
|
1770
1962
|
end
|
1771
1963
|
end
|
1772
1964
|
|
1965
|
+
# Response for ListServingConfigs method.
|
1966
|
+
class GoogleCloudRetailV2alphaListServingConfigsResponse
|
1967
|
+
include Google::Apis::Core::Hashable
|
1968
|
+
|
1969
|
+
# Pagination token, if not returned indicates the last page.
|
1970
|
+
# Corresponds to the JSON property `nextPageToken`
|
1971
|
+
# @return [String]
|
1972
|
+
attr_accessor :next_page_token
|
1973
|
+
|
1974
|
+
# All the ServingConfigs for a given catalog.
|
1975
|
+
# Corresponds to the JSON property `servingConfigs`
|
1976
|
+
# @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaServingConfig>]
|
1977
|
+
attr_accessor :serving_configs
|
1978
|
+
|
1979
|
+
def initialize(**args)
|
1980
|
+
update!(**args)
|
1981
|
+
end
|
1982
|
+
|
1983
|
+
# Update properties of this object
|
1984
|
+
def update!(**args)
|
1985
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
1986
|
+
@serving_configs = args[:serving_configs] if args.key?(:serving_configs)
|
1987
|
+
end
|
1988
|
+
end
|
1989
|
+
|
1773
1990
|
# The inventory information at a place (e.g. a store) identified by a place ID.
|
1774
1991
|
class GoogleCloudRetailV2alphaLocalInventory
|
1775
1992
|
include Google::Apis::Core::Hashable
|
@@ -2888,6 +3105,26 @@ module Google
|
|
2888
3105
|
end
|
2889
3106
|
end
|
2890
3107
|
|
3108
|
+
# Request for RemoveControl method.
|
3109
|
+
class GoogleCloudRetailV2alphaRemoveControlRequest
|
3110
|
+
include Google::Apis::Core::Hashable
|
3111
|
+
|
3112
|
+
# Required. The id of the control to apply. Assumed to be in the same catalog as
|
3113
|
+
# the serving config.
|
3114
|
+
# Corresponds to the JSON property `controlId`
|
3115
|
+
# @return [String]
|
3116
|
+
attr_accessor :control_id
|
3117
|
+
|
3118
|
+
def initialize(**args)
|
3119
|
+
update!(**args)
|
3120
|
+
end
|
3121
|
+
|
3122
|
+
# Update properties of this object
|
3123
|
+
def update!(**args)
|
3124
|
+
@control_id = args[:control_id] if args.key?(:control_id)
|
3125
|
+
end
|
3126
|
+
end
|
3127
|
+
|
2891
3128
|
# Metadata related to the progress of the RemoveFulfillmentPlaces operation.
|
2892
3129
|
# Currently empty because there is no meaningful metadata populated from the
|
2893
3130
|
# RemoveFulfillmentPlaces method.
|
@@ -3038,6 +3275,333 @@ module Google
|
|
3038
3275
|
end
|
3039
3276
|
end
|
3040
3277
|
|
3278
|
+
# A rule is a condition-action pair * A condition defines when a rule is to be
|
3279
|
+
# triggered. * An action specifies what occurs on that trigger. Currently only
|
3280
|
+
# boost rules are supported. Currently only supported by the search endpoint.
|
3281
|
+
class GoogleCloudRetailV2alphaRule
|
3282
|
+
include Google::Apis::Core::Hashable
|
3283
|
+
|
3284
|
+
# A boost action to apply to results matching condition specified above.
|
3285
|
+
# Corresponds to the JSON property `boostAction`
|
3286
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleBoostAction]
|
3287
|
+
attr_accessor :boost_action
|
3288
|
+
|
3289
|
+
# Metadata that is used to define a condition that triggers an action. A valid
|
3290
|
+
# condition must specify at least one of 'query_terms' or 'products_filter'. If
|
3291
|
+
# multiple fields are specified, the condition is met if all the fields are
|
3292
|
+
# satisfied e.g. if a set of query terms and product_filter are set, then only
|
3293
|
+
# items matching the product_filter for requests with a query matching the query
|
3294
|
+
# terms wil get boosted.
|
3295
|
+
# Corresponds to the JSON property `condition`
|
3296
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCondition]
|
3297
|
+
attr_accessor :condition
|
3298
|
+
|
3299
|
+
# Prevents `query_term` from being associated with specified terms during search.
|
3300
|
+
# Example: Don't associate "gShoe" and "cheap".
|
3301
|
+
# Corresponds to the JSON property `doNotAssociateAction`
|
3302
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleDoNotAssociateAction]
|
3303
|
+
attr_accessor :do_not_associate_action
|
3304
|
+
|
3305
|
+
# * Rule Condition: - No Condition provided is a global match. - 1 or more
|
3306
|
+
# Condition provided is combined with OR operator. * Action Input: The request
|
3307
|
+
# query and filter that will be applied to the retrieved products, in addition
|
3308
|
+
# to any filters already provided with the SearchRequest. The AND operator is
|
3309
|
+
# used to combine the query's existing filters with the filter rule(s). NOTE:
|
3310
|
+
# May result in 0 results when filters conflict. * Action Result: Filters the
|
3311
|
+
# returned objects to be ONLY those that passed the filter.
|
3312
|
+
# Corresponds to the JSON property `filterAction`
|
3313
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleFilterAction]
|
3314
|
+
attr_accessor :filter_action
|
3315
|
+
|
3316
|
+
# Prevents a term in the query from being used in search. Example: Don't search
|
3317
|
+
# for "shoddy".
|
3318
|
+
# Corresponds to the JSON property `ignoreAction`
|
3319
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleIgnoreAction]
|
3320
|
+
attr_accessor :ignore_action
|
3321
|
+
|
3322
|
+
# Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
|
3323
|
+
# synonyms of each query term only. `query_terms` will not be treated as
|
3324
|
+
# synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
|
3325
|
+
# shoes" will not use a synonym of "sneakers".
|
3326
|
+
# Corresponds to the JSON property `onewaySynonymsAction`
|
3327
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleOnewaySynonymsAction]
|
3328
|
+
attr_accessor :oneway_synonyms_action
|
3329
|
+
|
3330
|
+
# Redirects a shopper to a specific page. * Rule Condition: - Must specify
|
3331
|
+
# Condition. * Action Input: Request Query * Action Result: Redirects shopper to
|
3332
|
+
# provided uri.
|
3333
|
+
# Corresponds to the JSON property `redirectAction`
|
3334
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleRedirectAction]
|
3335
|
+
attr_accessor :redirect_action
|
3336
|
+
|
3337
|
+
# Replaces a term in the query. Multiple replacement candidates can be specified.
|
3338
|
+
# All `query_terms` will be replaced with the replacement term. Example:
|
3339
|
+
# Replace "gShoe" with "google shoe".
|
3340
|
+
# Corresponds to the JSON property `replacementAction`
|
3341
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleReplacementAction]
|
3342
|
+
attr_accessor :replacement_action
|
3343
|
+
|
3344
|
+
# Creates a set of terms that will be treated as synonyms of each other. Example:
|
3345
|
+
# synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
|
3346
|
+
# . * "shoes" will use a synonym of "sneakers".
|
3347
|
+
# Corresponds to the JSON property `twowaySynonymsAction`
|
3348
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRuleTwowaySynonymsAction]
|
3349
|
+
attr_accessor :twoway_synonyms_action
|
3350
|
+
|
3351
|
+
def initialize(**args)
|
3352
|
+
update!(**args)
|
3353
|
+
end
|
3354
|
+
|
3355
|
+
# Update properties of this object
|
3356
|
+
def update!(**args)
|
3357
|
+
@boost_action = args[:boost_action] if args.key?(:boost_action)
|
3358
|
+
@condition = args[:condition] if args.key?(:condition)
|
3359
|
+
@do_not_associate_action = args[:do_not_associate_action] if args.key?(:do_not_associate_action)
|
3360
|
+
@filter_action = args[:filter_action] if args.key?(:filter_action)
|
3361
|
+
@ignore_action = args[:ignore_action] if args.key?(:ignore_action)
|
3362
|
+
@oneway_synonyms_action = args[:oneway_synonyms_action] if args.key?(:oneway_synonyms_action)
|
3363
|
+
@redirect_action = args[:redirect_action] if args.key?(:redirect_action)
|
3364
|
+
@replacement_action = args[:replacement_action] if args.key?(:replacement_action)
|
3365
|
+
@twoway_synonyms_action = args[:twoway_synonyms_action] if args.key?(:twoway_synonyms_action)
|
3366
|
+
end
|
3367
|
+
end
|
3368
|
+
|
3369
|
+
# A boost action to apply to results matching condition specified above.
|
3370
|
+
class GoogleCloudRetailV2alphaRuleBoostAction
|
3371
|
+
include Google::Apis::Core::Hashable
|
3372
|
+
|
3373
|
+
# Strength of the condition boost, which must be in [-1, 1]. Negative boost
|
3374
|
+
# means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
|
3375
|
+
# However, it does not necessarily mean that the boosted item will be the top
|
3376
|
+
# result at all times, nor that other items will be excluded. Results could
|
3377
|
+
# still be shown even when none of them matches the condition. And results that
|
3378
|
+
# are significantly more relevant to the search query can still trump your
|
3379
|
+
# heavily favored but irrelevant items. Setting to -1.0 gives the item a big
|
3380
|
+
# demotion. However, results that are deeply relevant might still be shown. The
|
3381
|
+
# item will have an upstream battle to get a fairly high ranking, but it is not
|
3382
|
+
# blocked out completely. Setting to 0.0 means no boost applied. The boosting
|
3383
|
+
# condition is ignored.
|
3384
|
+
# Corresponds to the JSON property `boost`
|
3385
|
+
# @return [Float]
|
3386
|
+
attr_accessor :boost
|
3387
|
+
|
3388
|
+
# The filter can have a max size of 5000 characters. An expression which
|
3389
|
+
# specifies which products to apply an action to. The syntax and supported
|
3390
|
+
# fields are the same as a filter expression. See SearchRequest.filter for
|
3391
|
+
# detail syntax and limitations. Examples: * To boost products with product ID "
|
3392
|
+
# product_1" or "product_2", and color "Red" or "Blue": *(id: ANY("product_1", "
|
3393
|
+
# product_2")) * *AND * *(colorFamily: ANY("Red", "Blue")) *
|
3394
|
+
# Corresponds to the JSON property `productsFilter`
|
3395
|
+
# @return [String]
|
3396
|
+
attr_accessor :products_filter
|
3397
|
+
|
3398
|
+
def initialize(**args)
|
3399
|
+
update!(**args)
|
3400
|
+
end
|
3401
|
+
|
3402
|
+
# Update properties of this object
|
3403
|
+
def update!(**args)
|
3404
|
+
@boost = args[:boost] if args.key?(:boost)
|
3405
|
+
@products_filter = args[:products_filter] if args.key?(:products_filter)
|
3406
|
+
end
|
3407
|
+
end
|
3408
|
+
|
3409
|
+
# Prevents `query_term` from being associated with specified terms during search.
|
3410
|
+
# Example: Don't associate "gShoe" and "cheap".
|
3411
|
+
class GoogleCloudRetailV2alphaRuleDoNotAssociateAction
|
3412
|
+
include Google::Apis::Core::Hashable
|
3413
|
+
|
3414
|
+
# Cannot contain duplicates or the query term. Can specify up to 100 terms.
|
3415
|
+
# Corresponds to the JSON property `doNotAssociateTerms`
|
3416
|
+
# @return [Array<String>]
|
3417
|
+
attr_accessor :do_not_associate_terms
|
3418
|
+
|
3419
|
+
# Terms from the search query. Will not consider do_not_associate_terms for
|
3420
|
+
# search if in search query. Can specify up to 100 terms.
|
3421
|
+
# Corresponds to the JSON property `queryTerms`
|
3422
|
+
# @return [Array<String>]
|
3423
|
+
attr_accessor :query_terms
|
3424
|
+
|
3425
|
+
# Will be [deprecated = true] post migration;
|
3426
|
+
# Corresponds to the JSON property `terms`
|
3427
|
+
# @return [Array<String>]
|
3428
|
+
attr_accessor :terms
|
3429
|
+
|
3430
|
+
def initialize(**args)
|
3431
|
+
update!(**args)
|
3432
|
+
end
|
3433
|
+
|
3434
|
+
# Update properties of this object
|
3435
|
+
def update!(**args)
|
3436
|
+
@do_not_associate_terms = args[:do_not_associate_terms] if args.key?(:do_not_associate_terms)
|
3437
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3438
|
+
@terms = args[:terms] if args.key?(:terms)
|
3439
|
+
end
|
3440
|
+
end
|
3441
|
+
|
3442
|
+
# * Rule Condition: - No Condition provided is a global match. - 1 or more
|
3443
|
+
# Condition provided is combined with OR operator. * Action Input: The request
|
3444
|
+
# query and filter that will be applied to the retrieved products, in addition
|
3445
|
+
# to any filters already provided with the SearchRequest. The AND operator is
|
3446
|
+
# used to combine the query's existing filters with the filter rule(s). NOTE:
|
3447
|
+
# May result in 0 results when filters conflict. * Action Result: Filters the
|
3448
|
+
# returned objects to be ONLY those that passed the filter.
|
3449
|
+
class GoogleCloudRetailV2alphaRuleFilterAction
|
3450
|
+
include Google::Apis::Core::Hashable
|
3451
|
+
|
3452
|
+
# A filter to apply on the matching condition results. Supported features: *
|
3453
|
+
# filter must be set. * Filter syntax is identical to SearchRequest.filter. See
|
3454
|
+
# more details at the Retail Search [user guide](/retail/search/docs/filter-and-
|
3455
|
+
# order#filter). * To filter products with product ID "product_1" or "product_2",
|
3456
|
+
# and color "Red" or "Blue": *(id: ANY("product_1", "product_2")) * *AND * *(
|
3457
|
+
# colorFamily: ANY("Red", "Blue")) *
|
3458
|
+
# Corresponds to the JSON property `filter`
|
3459
|
+
# @return [String]
|
3460
|
+
attr_accessor :filter
|
3461
|
+
|
3462
|
+
def initialize(**args)
|
3463
|
+
update!(**args)
|
3464
|
+
end
|
3465
|
+
|
3466
|
+
# Update properties of this object
|
3467
|
+
def update!(**args)
|
3468
|
+
@filter = args[:filter] if args.key?(:filter)
|
3469
|
+
end
|
3470
|
+
end
|
3471
|
+
|
3472
|
+
# Prevents a term in the query from being used in search. Example: Don't search
|
3473
|
+
# for "shoddy".
|
3474
|
+
class GoogleCloudRetailV2alphaRuleIgnoreAction
|
3475
|
+
include Google::Apis::Core::Hashable
|
3476
|
+
|
3477
|
+
# Terms to ignore in the search query.
|
3478
|
+
# Corresponds to the JSON property `ignoreTerms`
|
3479
|
+
# @return [Array<String>]
|
3480
|
+
attr_accessor :ignore_terms
|
3481
|
+
|
3482
|
+
def initialize(**args)
|
3483
|
+
update!(**args)
|
3484
|
+
end
|
3485
|
+
|
3486
|
+
# Update properties of this object
|
3487
|
+
def update!(**args)
|
3488
|
+
@ignore_terms = args[:ignore_terms] if args.key?(:ignore_terms)
|
3489
|
+
end
|
3490
|
+
end
|
3491
|
+
|
3492
|
+
# Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
|
3493
|
+
# synonyms of each query term only. `query_terms` will not be treated as
|
3494
|
+
# synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
|
3495
|
+
# shoes" will not use a synonym of "sneakers".
|
3496
|
+
class GoogleCloudRetailV2alphaRuleOnewaySynonymsAction
|
3497
|
+
include Google::Apis::Core::Hashable
|
3498
|
+
|
3499
|
+
# Will be [deprecated = true] post migration;
|
3500
|
+
# Corresponds to the JSON property `onewayTerms`
|
3501
|
+
# @return [Array<String>]
|
3502
|
+
attr_accessor :oneway_terms
|
3503
|
+
|
3504
|
+
# Terms from the search query. Will treat synonyms as their synonyms. Not
|
3505
|
+
# themselves synonyms of the synonyms. Can specify up to 100 terms.
|
3506
|
+
# Corresponds to the JSON property `queryTerms`
|
3507
|
+
# @return [Array<String>]
|
3508
|
+
attr_accessor :query_terms
|
3509
|
+
|
3510
|
+
# Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100
|
3511
|
+
# synonyms.
|
3512
|
+
# Corresponds to the JSON property `synonyms`
|
3513
|
+
# @return [Array<String>]
|
3514
|
+
attr_accessor :synonyms
|
3515
|
+
|
3516
|
+
def initialize(**args)
|
3517
|
+
update!(**args)
|
3518
|
+
end
|
3519
|
+
|
3520
|
+
# Update properties of this object
|
3521
|
+
def update!(**args)
|
3522
|
+
@oneway_terms = args[:oneway_terms] if args.key?(:oneway_terms)
|
3523
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3524
|
+
@synonyms = args[:synonyms] if args.key?(:synonyms)
|
3525
|
+
end
|
3526
|
+
end
|
3527
|
+
|
3528
|
+
# Redirects a shopper to a specific page. * Rule Condition: - Must specify
|
3529
|
+
# Condition. * Action Input: Request Query * Action Result: Redirects shopper to
|
3530
|
+
# provided uri.
|
3531
|
+
class GoogleCloudRetailV2alphaRuleRedirectAction
|
3532
|
+
include Google::Apis::Core::Hashable
|
3533
|
+
|
3534
|
+
# URL must have length equal or less than 2000 characters.
|
3535
|
+
# Corresponds to the JSON property `redirectUri`
|
3536
|
+
# @return [String]
|
3537
|
+
attr_accessor :redirect_uri
|
3538
|
+
|
3539
|
+
def initialize(**args)
|
3540
|
+
update!(**args)
|
3541
|
+
end
|
3542
|
+
|
3543
|
+
# Update properties of this object
|
3544
|
+
def update!(**args)
|
3545
|
+
@redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
|
3546
|
+
end
|
3547
|
+
end
|
3548
|
+
|
3549
|
+
# Replaces a term in the query. Multiple replacement candidates can be specified.
|
3550
|
+
# All `query_terms` will be replaced with the replacement term. Example:
|
3551
|
+
# Replace "gShoe" with "google shoe".
|
3552
|
+
class GoogleCloudRetailV2alphaRuleReplacementAction
|
3553
|
+
include Google::Apis::Core::Hashable
|
3554
|
+
|
3555
|
+
# Terms from the search query. Will be replaced by replacement term. Can specify
|
3556
|
+
# up to 100 terms.
|
3557
|
+
# Corresponds to the JSON property `queryTerms`
|
3558
|
+
# @return [Array<String>]
|
3559
|
+
attr_accessor :query_terms
|
3560
|
+
|
3561
|
+
# Term that will be used for replacement.
|
3562
|
+
# Corresponds to the JSON property `replacementTerm`
|
3563
|
+
# @return [String]
|
3564
|
+
attr_accessor :replacement_term
|
3565
|
+
|
3566
|
+
# Will be [deprecated = true] post migration;
|
3567
|
+
# Corresponds to the JSON property `term`
|
3568
|
+
# @return [String]
|
3569
|
+
attr_accessor :term
|
3570
|
+
|
3571
|
+
def initialize(**args)
|
3572
|
+
update!(**args)
|
3573
|
+
end
|
3574
|
+
|
3575
|
+
# Update properties of this object
|
3576
|
+
def update!(**args)
|
3577
|
+
@query_terms = args[:query_terms] if args.key?(:query_terms)
|
3578
|
+
@replacement_term = args[:replacement_term] if args.key?(:replacement_term)
|
3579
|
+
@term = args[:term] if args.key?(:term)
|
3580
|
+
end
|
3581
|
+
end
|
3582
|
+
|
3583
|
+
# Creates a set of terms that will be treated as synonyms of each other. Example:
|
3584
|
+
# synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
|
3585
|
+
# . * "shoes" will use a synonym of "sneakers".
|
3586
|
+
class GoogleCloudRetailV2alphaRuleTwowaySynonymsAction
|
3587
|
+
include Google::Apis::Core::Hashable
|
3588
|
+
|
3589
|
+
# Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at
|
3590
|
+
# least 2 synonyms.
|
3591
|
+
# Corresponds to the JSON property `synonyms`
|
3592
|
+
# @return [Array<String>]
|
3593
|
+
attr_accessor :synonyms
|
3594
|
+
|
3595
|
+
def initialize(**args)
|
3596
|
+
update!(**args)
|
3597
|
+
end
|
3598
|
+
|
3599
|
+
# Update properties of this object
|
3600
|
+
def update!(**args)
|
3601
|
+
@synonyms = args[:synonyms] if args.key?(:synonyms)
|
3602
|
+
end
|
3603
|
+
end
|
3604
|
+
|
3041
3605
|
# Request message for SearchService.Search method.
|
3042
3606
|
class GoogleCloudRetailV2alphaSearchRequest
|
3043
3607
|
include Google::Apis::Core::Hashable
|
@@ -3721,6 +4285,183 @@ module Google
|
|
3721
4285
|
end
|
3722
4286
|
end
|
3723
4287
|
|
4288
|
+
# Configures metadata that is used to generate serving time results (e.g. search
|
4289
|
+
# results or recommendation predictions). The ServingConfig is passed in the
|
4290
|
+
# search and predict request and together with the Catalog.default_branch,
|
4291
|
+
# generates results.
|
4292
|
+
class GoogleCloudRetailV2alphaServingConfig
|
4293
|
+
include Google::Apis::Core::Hashable
|
4294
|
+
|
4295
|
+
# Condition boost specifications. If a product matches multiple conditions in
|
4296
|
+
# the specifications, boost scores from these specifications are all applied and
|
4297
|
+
# combined in a non-linear way. Maximum number of specifications is 10. Notice
|
4298
|
+
# that if both ServingConfig.boost_control_ids and [SearchRequest.boost_spec]
|
4299
|
+
# are set, the boost conditions from both places are evaluated. If a search
|
4300
|
+
# request matches multiple boost conditions, the final boost score is equal to
|
4301
|
+
# the sum of the boost scores from all matched boost conditions. Can only be set
|
4302
|
+
# if solution_types is SOLUTION_TYPE_SEARCH.
|
4303
|
+
# Corresponds to the JSON property `boostControlIds`
|
4304
|
+
# @return [Array<String>]
|
4305
|
+
attr_accessor :boost_control_ids
|
4306
|
+
|
4307
|
+
# Required. The human readable serving config display name. Used in Retail UI.
|
4308
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
4309
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
4310
|
+
# Corresponds to the JSON property `displayName`
|
4311
|
+
# @return [String]
|
4312
|
+
attr_accessor :display_name
|
4313
|
+
|
4314
|
+
# How much diversity to use in recommendation model results e.g. 'medium-
|
4315
|
+
# diversity' or 'high-diversity'. Currently supported values: * 'no-diversity' *
|
4316
|
+
# 'low-diversity' * 'medium-diversity' * 'high-diversity' * 'auto-diversity' If
|
4317
|
+
# not specified, we choose default based on recommendation model type. Default
|
4318
|
+
# value: 'no-diversity'. Can only be set if solution_types is
|
4319
|
+
# SOLUTION_TYPE_RECOMMENDATION.
|
4320
|
+
# Corresponds to the JSON property `diversityLevel`
|
4321
|
+
# @return [String]
|
4322
|
+
attr_accessor :diversity_level
|
4323
|
+
|
4324
|
+
# Condition do not associate specifications. If multiple do not associate
|
4325
|
+
# conditions match, all matching do not associate controls in the list will
|
4326
|
+
# execute. - Order does not matter. - Maximum number of specifications is 100.
|
4327
|
+
# Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4328
|
+
# Corresponds to the JSON property `doNotAssociateControlIds`
|
4329
|
+
# @return [Array<String>]
|
4330
|
+
attr_accessor :do_not_associate_control_ids
|
4331
|
+
|
4332
|
+
# The specifications of dynamically generated facets.
|
4333
|
+
# Corresponds to the JSON property `dynamicFacetSpec`
|
4334
|
+
# @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec]
|
4335
|
+
attr_accessor :dynamic_facet_spec
|
4336
|
+
|
4337
|
+
# Whether to add additional category filters on the 'similar-items' model. If
|
4338
|
+
# not specified, we enable it by default. Allowed values are: * 'no-category-
|
4339
|
+
# match': No additional filtering of original results from the model and the
|
4340
|
+
# customer's filters. * 'relaxed-category-match': Only keep results with
|
4341
|
+
# categories that match at least one item categories in the PredictRequests's
|
4342
|
+
# context item. * If customer also sends filters in the PredictRequest, then the
|
4343
|
+
# results will satisfy both conditions (user given and category match). Can only
|
4344
|
+
# be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
|
4345
|
+
# Corresponds to the JSON property `enableCategoryFilterLevel`
|
4346
|
+
# @return [String]
|
4347
|
+
attr_accessor :enable_category_filter_level
|
4348
|
+
|
4349
|
+
# Facet specifications for faceted search. If empty, no facets are returned. The
|
4350
|
+
# ids refer to the ids of Control resources with only the Facet control set.
|
4351
|
+
# These controls are assumed to be in the same Catalog as the ServingConfig. A
|
4352
|
+
# maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
|
4353
|
+
# returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4354
|
+
# Corresponds to the JSON property `facetControlIds`
|
4355
|
+
# @return [Array<String>]
|
4356
|
+
attr_accessor :facet_control_ids
|
4357
|
+
|
4358
|
+
# Condition filter specifications. If a product matches multiple conditions in
|
4359
|
+
# the specifications, filters from these specifications are all applied and
|
4360
|
+
# combined via the AND operator. Maximum number of specifications is 100. Can
|
4361
|
+
# only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4362
|
+
# Corresponds to the JSON property `filterControlIds`
|
4363
|
+
# @return [Array<String>]
|
4364
|
+
attr_accessor :filter_control_ids
|
4365
|
+
|
4366
|
+
# Condition ignore specifications. If multiple ignore conditions match, all
|
4367
|
+
# matching ignore controls in the list will execute. - Order does not matter. -
|
4368
|
+
# Maximum number of specifications is 100. Can only be set if solution_types is
|
4369
|
+
# SOLUTION_TYPE_SEARCH.
|
4370
|
+
# Corresponds to the JSON property `ignoreControlIds`
|
4371
|
+
# @return [Array<String>]
|
4372
|
+
attr_accessor :ignore_control_ids
|
4373
|
+
|
4374
|
+
# The id of the model to use at serving time. Currently only
|
4375
|
+
# RecommendationModels are supported: https://cloud.google.com/retail/
|
4376
|
+
# recommendations-ai/docs/create-models Can be changed but only to a compatible
|
4377
|
+
# model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
|
4378
|
+
# solution_types is SOLUTION_TYPE_RECOMMENDATION.
|
4379
|
+
# Corresponds to the JSON property `modelId`
|
4380
|
+
# @return [String]
|
4381
|
+
attr_accessor :model_id
|
4382
|
+
|
4383
|
+
# Immutable. Fully qualified name projects/*/locations/global/catalogs/*/
|
4384
|
+
# servingConfig/*
|
4385
|
+
# Corresponds to the JSON property `name`
|
4386
|
+
# @return [String]
|
4387
|
+
attr_accessor :name
|
4388
|
+
|
4389
|
+
# Condition oneway synonyms specifications. If multiple oneway synonyms
|
4390
|
+
# conditions match, all matching oneway synonyms controls in the list will
|
4391
|
+
# execute. Order of controls in the list will not matter. Maximum number of
|
4392
|
+
# specifications is 100. Can only be set if solution_types is
|
4393
|
+
# SOLUTION_TYPE_SEARCH.
|
4394
|
+
# Corresponds to the JSON property `onewaySynonymsControlIds`
|
4395
|
+
# @return [Array<String>]
|
4396
|
+
attr_accessor :oneway_synonyms_control_ids
|
4397
|
+
|
4398
|
+
# How much price ranking we want in serving results. Price reranking causes
|
4399
|
+
# product items with a similar recommendation probability to be ordered by price,
|
4400
|
+
# with the highest-priced items first. This setting could result in a decrease
|
4401
|
+
# in click-through and conversion rates. Allowed values are: * 'no-price-
|
4402
|
+
# reranking' * 'low-price-raranking' * 'medium-price-reranking' * 'high-price-
|
4403
|
+
# reranking' If not specified, we choose default based on model type. Default
|
4404
|
+
# value: 'no-price-reranking'. Can only be set if solution_types is
|
4405
|
+
# SOLUTION_TYPE_RECOMMENDATION.
|
4406
|
+
# Corresponds to the JSON property `priceRerankingLevel`
|
4407
|
+
# @return [String]
|
4408
|
+
attr_accessor :price_reranking_level
|
4409
|
+
|
4410
|
+
# Condition redirect specifications. Only the first triggered redirect action is
|
4411
|
+
# applied, even if multiple apply. Maximum number of specifications is 100. Can
|
4412
|
+
# only be set if solution_types is SOLUTION_TYPE_SEARCH.
|
4413
|
+
# Corresponds to the JSON property `redirectControlIds`
|
4414
|
+
# @return [Array<String>]
|
4415
|
+
attr_accessor :redirect_control_ids
|
4416
|
+
|
4417
|
+
# Condition replacement specifications. - Applied according to the order in the
|
4418
|
+
# list. - A previously replaced term can not be re-replaced. - Maximum number of
|
4419
|
+
# specifications is 100. Can only be set if solution_types is
|
4420
|
+
# SOLUTION_TYPE_SEARCH.
|
4421
|
+
# Corresponds to the JSON property `replacementControlIds`
|
4422
|
+
# @return [Array<String>]
|
4423
|
+
attr_accessor :replacement_control_ids
|
4424
|
+
|
4425
|
+
# Required. Immutable. Specifies the solution types that a serving config can be
|
4426
|
+
# associated with. Currently we support setting only one type of solution.
|
4427
|
+
# Corresponds to the JSON property `solutionTypes`
|
4428
|
+
# @return [Array<String>]
|
4429
|
+
attr_accessor :solution_types
|
4430
|
+
|
4431
|
+
# Condition synonyms specifications. If multiple syonyms conditions match, all
|
4432
|
+
# matching synonyms control in the list will execute. Order of controls in the
|
4433
|
+
# list will not matter. Maximum number of specifications is 100. Can only be set
|
4434
|
+
# if solution_types is SOLUTION_TYPE_SEARCH.
|
4435
|
+
# Corresponds to the JSON property `twowaySynonymsControlIds`
|
4436
|
+
# @return [Array<String>]
|
4437
|
+
attr_accessor :twoway_synonyms_control_ids
|
4438
|
+
|
4439
|
+
def initialize(**args)
|
4440
|
+
update!(**args)
|
4441
|
+
end
|
4442
|
+
|
4443
|
+
# Update properties of this object
|
4444
|
+
def update!(**args)
|
4445
|
+
@boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
|
4446
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
4447
|
+
@diversity_level = args[:diversity_level] if args.key?(:diversity_level)
|
4448
|
+
@do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids)
|
4449
|
+
@dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
|
4450
|
+
@enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level)
|
4451
|
+
@facet_control_ids = args[:facet_control_ids] if args.key?(:facet_control_ids)
|
4452
|
+
@filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
|
4453
|
+
@ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
|
4454
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
4455
|
+
@name = args[:name] if args.key?(:name)
|
4456
|
+
@oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
|
4457
|
+
@price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level)
|
4458
|
+
@redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
|
4459
|
+
@replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
|
4460
|
+
@solution_types = args[:solution_types] if args.key?(:solution_types)
|
4461
|
+
@twoway_synonyms_control_ids = args[:twoway_synonyms_control_ids] if args.key?(:twoway_synonyms_control_ids)
|
4462
|
+
end
|
4463
|
+
end
|
4464
|
+
|
3724
4465
|
# Request message to set a specified branch as new default_branch.
|
3725
4466
|
class GoogleCloudRetailV2alphaSetDefaultBranchRequest
|
3726
4467
|
include Google::Apis::Core::Hashable
|