google-apis-retail_v2 0.49.0 → 0.52.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.
@@ -783,7 +803,7 @@ module Google
783
803
  # CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The
784
804
  # recent searches satisfy the follow rules: * They are ordered from latest to
785
805
  # oldest. * They are matched with CompleteQueryRequest.query case insensitively.
786
- # * They are transformed to lower cases. * They are UTF-8 safe. Recent searches
806
+ # * They are transformed to lower case. * They are UTF-8 safe. Recent searches
787
807
  # are deduplicated. More recent searches will be reserved when duplication
788
808
  # happens.
789
809
  # Corresponds to the JSON property `recentSearchResults`
@@ -1000,6 +1020,157 @@ module Google
1000
1020
  end
1001
1021
  end
1002
1022
 
1023
+ # Metadata that is used to define a condition that triggers an action. A valid
1024
+ # condition must specify at least one of 'query_terms' or 'products_filter'. If
1025
+ # multiple fields are specified, the condition is met if all the fields are
1026
+ # satisfied e.g. if a set of query terms and product_filter are set, then only
1027
+ # items matching the product_filter for requests with a query matching the query
1028
+ # terms wil get boosted.
1029
+ class GoogleCloudRetailV2Condition
1030
+ include Google::Apis::Core::Hashable
1031
+
1032
+ # Range of time(s) specifying when Condition is active. Condition true if any
1033
+ # time range matches.
1034
+ # Corresponds to the JSON property `activeTimeRange`
1035
+ # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2ConditionTimeRange>]
1036
+ attr_accessor :active_time_range
1037
+
1038
+ # A list (up to 10 entries) of terms to match the query on. If not specified,
1039
+ # match all queries. If many query terms are specified, the condition is matched
1040
+ # if any of the terms is a match (i.e. using the OR operator).
1041
+ # Corresponds to the JSON property `queryTerms`
1042
+ # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2ConditionQueryTerm>]
1043
+ attr_accessor :query_terms
1044
+
1045
+ def initialize(**args)
1046
+ update!(**args)
1047
+ end
1048
+
1049
+ # Update properties of this object
1050
+ def update!(**args)
1051
+ @active_time_range = args[:active_time_range] if args.key?(:active_time_range)
1052
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
1053
+ end
1054
+ end
1055
+
1056
+ # Query terms that we want to match on.
1057
+ class GoogleCloudRetailV2ConditionQueryTerm
1058
+ include Google::Apis::Core::Hashable
1059
+
1060
+ # Whether this is supposed to be a full or partial match.
1061
+ # Corresponds to the JSON property `fullMatch`
1062
+ # @return [Boolean]
1063
+ attr_accessor :full_match
1064
+ alias_method :full_match?, :full_match
1065
+
1066
+ # The value of the term to match on. Value cannot be empty. Value can have at
1067
+ # most 3 terms if specified as a partial match. Each space separated string is
1068
+ # considered as one term. For example, "a b c" is 3 terms and allowed, but " a b
1069
+ # c d" is 4 terms and not allowed for a partial match.
1070
+ # Corresponds to the JSON property `value`
1071
+ # @return [String]
1072
+ attr_accessor :value
1073
+
1074
+ def initialize(**args)
1075
+ update!(**args)
1076
+ end
1077
+
1078
+ # Update properties of this object
1079
+ def update!(**args)
1080
+ @full_match = args[:full_match] if args.key?(:full_match)
1081
+ @value = args[:value] if args.key?(:value)
1082
+ end
1083
+ end
1084
+
1085
+ # Used for time-dependent conditions. Example: Want to have rule applied for
1086
+ # week long sale.
1087
+ class GoogleCloudRetailV2ConditionTimeRange
1088
+ include Google::Apis::Core::Hashable
1089
+
1090
+ # End of time range. Range is inclusive.
1091
+ # Corresponds to the JSON property `endTime`
1092
+ # @return [String]
1093
+ attr_accessor :end_time
1094
+
1095
+ # Start of time range. Range is inclusive.
1096
+ # Corresponds to the JSON property `startTime`
1097
+ # @return [String]
1098
+ attr_accessor :start_time
1099
+
1100
+ def initialize(**args)
1101
+ update!(**args)
1102
+ end
1103
+
1104
+ # Update properties of this object
1105
+ def update!(**args)
1106
+ @end_time = args[:end_time] if args.key?(:end_time)
1107
+ @start_time = args[:start_time] if args.key?(:start_time)
1108
+ end
1109
+ end
1110
+
1111
+ # Configures dynamic metadata that can be linked to a ServingConfig and affect
1112
+ # search or recommendation results at serving time.
1113
+ class GoogleCloudRetailV2Control
1114
+ include Google::Apis::Core::Hashable
1115
+
1116
+ # Output only. List of serving configuration ids that are associated with this
1117
+ # control in the same Catalog. Note the association is managed via the
1118
+ # ServingConfig, this is an output only denormalized view.
1119
+ # Corresponds to the JSON property `associatedServingConfigIds`
1120
+ # @return [Array<String>]
1121
+ attr_accessor :associated_serving_config_ids
1122
+
1123
+ # Required. The human readable control display name. Used in Retail UI. This
1124
+ # field must be a UTF-8 encoded string with a length limit of 128 characters.
1125
+ # Otherwise, an INVALID_ARGUMENT error is thrown.
1126
+ # Corresponds to the JSON property `displayName`
1127
+ # @return [String]
1128
+ attr_accessor :display_name
1129
+
1130
+ # Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/
1131
+ # controls/*`
1132
+ # Corresponds to the JSON property `name`
1133
+ # @return [String]
1134
+ attr_accessor :name
1135
+
1136
+ # A rule is a condition-action pair * A condition defines when a rule is to be
1137
+ # triggered. * An action specifies what occurs on that trigger. Currently rules
1138
+ # only work for controls with SOLUTION_TYPE_SEARCH.
1139
+ # Corresponds to the JSON property `rule`
1140
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Rule]
1141
+ attr_accessor :rule
1142
+
1143
+ # Specifies the use case for the control. Affects what condition fields can be
1144
+ # set. Only settable by search controls. Will default to
1145
+ # SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one
1146
+ # search_solution_use_case per control.
1147
+ # Corresponds to the JSON property `searchSolutionUseCase`
1148
+ # @return [Array<String>]
1149
+ attr_accessor :search_solution_use_case
1150
+
1151
+ # Required. Immutable. The solution types that the control is used for.
1152
+ # Currently we support setting only one type of solution at creation time. Only `
1153
+ # SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is
1154
+ # provided at creation time, will default to SOLUTION_TYPE_SEARCH.
1155
+ # Corresponds to the JSON property `solutionTypes`
1156
+ # @return [Array<String>]
1157
+ attr_accessor :solution_types
1158
+
1159
+ def initialize(**args)
1160
+ update!(**args)
1161
+ end
1162
+
1163
+ # Update properties of this object
1164
+ def update!(**args)
1165
+ @associated_serving_config_ids = args[:associated_serving_config_ids] if args.key?(:associated_serving_config_ids)
1166
+ @display_name = args[:display_name] if args.key?(:display_name)
1167
+ @name = args[:name] if args.key?(:name)
1168
+ @rule = args[:rule] if args.key?(:rule)
1169
+ @search_solution_use_case = args[:search_solution_use_case] if args.key?(:search_solution_use_case)
1170
+ @solution_types = args[:solution_types] if args.key?(:solution_types)
1171
+ end
1172
+ end
1173
+
1003
1174
  # A custom attribute that is not explicitly modeled in Product.
1004
1175
  class GoogleCloudRetailV2CustomAttribute
1005
1176
  include Google::Apis::Core::Hashable
@@ -1093,7 +1264,7 @@ module Google
1093
1264
  end
1094
1265
  end
1095
1266
 
1096
- # Google Cloud Storage location for input content. format.
1267
+ # Google Cloud Storage location for input content.
1097
1268
  class GoogleCloudRetailV2GcsSource
1098
1269
  include Google::Apis::Core::Hashable
1099
1270
 
@@ -1104,8 +1275,8 @@ module Google
1104
1275
  # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
1105
1276
  # imports: * `user_event` (default): One JSON UserEvent per line. * `
1106
1277
  # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
1107
- # Supported values for control imports: * 'control' (default): One JSON Control
1108
- # per line. Supported values for catalog attribute imports: * 'catalog_attribute'
1278
+ # Supported values for control imports: * `control` (default): One JSON Control
1279
+ # per line. Supported values for catalog attribute imports: * `catalog_attribute`
1109
1280
  # (default): One CSV CatalogAttribute per line.
1110
1281
  # Corresponds to the JSON property `dataSchema`
1111
1282
  # @return [String]
@@ -1215,9 +1386,9 @@ module Google
1215
1386
  attr_accessor :input_config
1216
1387
 
1217
1388
  # Pub/Sub topic for receiving notification. If this field is set, when the
1218
- # import is finished, a notification will be sent to specified Pub/Sub topic.
1219
- # The message data will be JSON string of a Operation. Format of the Pub/Sub
1220
- # topic is `projects/`project`/topics/`topic``.
1389
+ # import is finished, a notification is sent to specified Pub/Sub topic. The
1390
+ # message data is JSON string of a Operation. Format of the Pub/Sub topic is `
1391
+ # projects/`project`/topics/`topic``.
1221
1392
  # Corresponds to the JSON property `notificationPubsubTopic`
1222
1393
  # @return [String]
1223
1394
  attr_accessor :notification_pubsub_topic
@@ -1259,8 +1430,8 @@ module Google
1259
1430
  include Google::Apis::Core::Hashable
1260
1431
 
1261
1432
  # Google Cloud Storage prefix for import errors. This must be an empty, existing
1262
- # Cloud Storage directory. Import errors will be written to sharded files in
1263
- # this directory, one per line, as a JSON-encoded `google.rpc.Status` message.
1433
+ # Cloud Storage directory. Import errors are written to sharded files in this
1434
+ # directory, one per line, as a JSON-encoded `google.rpc.Status` message.
1264
1435
  # Corresponds to the JSON property `gcsPrefix`
1265
1436
  # @return [String]
1266
1437
  attr_accessor :gcs_prefix
@@ -1275,8 +1446,8 @@ module Google
1275
1446
  end
1276
1447
  end
1277
1448
 
1278
- # Metadata related to the progress of the Import operation. This will be
1279
- # returned by the google.longrunning.Operation.metadata field.
1449
+ # Metadata related to the progress of the Import operation. This is returned by
1450
+ # the google.longrunning.Operation.metadata field.
1280
1451
  class GoogleCloudRetailV2ImportMetadata
1281
1452
  include Google::Apis::Core::Hashable
1282
1453
 
@@ -1291,9 +1462,9 @@ module Google
1291
1462
  attr_accessor :failure_count
1292
1463
 
1293
1464
  # Pub/Sub topic for receiving notification. If this field is set, when the
1294
- # import is finished, a notification will be sent to specified Pub/Sub topic.
1295
- # The message data will be JSON string of a Operation. Format of the Pub/Sub
1296
- # topic is `projects/`project`/topics/`topic``.
1465
+ # import is finished, a notification is sent to specified Pub/Sub topic. The
1466
+ # message data is JSON string of a Operation. Format of the Pub/Sub topic is `
1467
+ # projects/`project`/topics/`topic``.
1297
1468
  # Corresponds to the JSON property `notificationPubsubTopic`
1298
1469
  # @return [String]
1299
1470
  attr_accessor :notification_pubsub_topic
@@ -1344,12 +1515,12 @@ module Google
1344
1515
  attr_accessor :input_config
1345
1516
 
1346
1517
  # Full Pub/Sub topic name for receiving notification. If this field is set, when
1347
- # the import is finished, a notification will be sent to specified Pub/Sub topic.
1348
- # The message data will be JSON string of a Operation. Format of the Pub/Sub
1349
- # topic is `projects/`project`/topics/`topic``. It has to be within the same
1350
- # project as ImportProductsRequest.parent. Make sure that `service-@gcp-sa-
1351
- # retail.iam.gserviceaccount.com` has the `pubsub.topics.publish` IAM permission
1352
- # on the topic.
1518
+ # the import is finished, a notification is sent to specified Pub/Sub topic. The
1519
+ # message data is JSON string of a Operation. Format of the Pub/Sub topic is `
1520
+ # projects/`project`/topics/`topic``. It has to be within the same project as
1521
+ # ImportProductsRequest.parent. Make sure that `service-@gcp-sa-retail.iam.
1522
+ # gserviceaccount.com` has the `pubsub.topics.publish` IAM permission on the
1523
+ # topic.
1353
1524
  # Corresponds to the JSON property `notificationPubsubTopic`
1354
1525
  # @return [String]
1355
1526
  attr_accessor :notification_pubsub_topic
@@ -1365,8 +1536,8 @@ module Google
1365
1536
  # @return [String]
1366
1537
  attr_accessor :request_id
1367
1538
 
1368
- # Indicates which fields in the provided imported 'products' to update. If not
1369
- # set, will by default update all fields.
1539
+ # Indicates which fields in the provided imported `products` to update. If not
1540
+ # set, all fields are updated.
1370
1541
  # Corresponds to the JSON property `updateMask`
1371
1542
  # @return [String]
1372
1543
  attr_accessor :update_mask
@@ -1535,6 +1706,31 @@ module Google
1535
1706
  end
1536
1707
  end
1537
1708
 
1709
+ # Response for ListControls method.
1710
+ class GoogleCloudRetailV2ListControlsResponse
1711
+ include Google::Apis::Core::Hashable
1712
+
1713
+ # All the Controls for a given catalog.
1714
+ # Corresponds to the JSON property `controls`
1715
+ # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2Control>]
1716
+ attr_accessor :controls
1717
+
1718
+ # Pagination token, if not returned indicates the last page.
1719
+ # Corresponds to the JSON property `nextPageToken`
1720
+ # @return [String]
1721
+ attr_accessor :next_page_token
1722
+
1723
+ def initialize(**args)
1724
+ update!(**args)
1725
+ end
1726
+
1727
+ # Update properties of this object
1728
+ def update!(**args)
1729
+ @controls = args[:controls] if args.key?(:controls)
1730
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1731
+ end
1732
+ end
1733
+
1538
1734
  # Response message for ProductService.ListProducts method.
1539
1735
  class GoogleCloudRetailV2ListProductsResponse
1540
1736
  include Google::Apis::Core::Hashable
@@ -1561,6 +1757,31 @@ module Google
1561
1757
  end
1562
1758
  end
1563
1759
 
1760
+ # Response for ListServingConfigs method.
1761
+ class GoogleCloudRetailV2ListServingConfigsResponse
1762
+ include Google::Apis::Core::Hashable
1763
+
1764
+ # Pagination token, if not returned indicates the last page.
1765
+ # Corresponds to the JSON property `nextPageToken`
1766
+ # @return [String]
1767
+ attr_accessor :next_page_token
1768
+
1769
+ # All the ServingConfigs for a given catalog.
1770
+ # Corresponds to the JSON property `servingConfigs`
1771
+ # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig>]
1772
+ attr_accessor :serving_configs
1773
+
1774
+ def initialize(**args)
1775
+ update!(**args)
1776
+ end
1777
+
1778
+ # Update properties of this object
1779
+ def update!(**args)
1780
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1781
+ @serving_configs = args[:serving_configs] if args.key?(:serving_configs)
1782
+ end
1783
+ end
1784
+
1564
1785
  # The inventory information at a place (e.g. a store) identified by a place ID.
1565
1786
  class GoogleCloudRetailV2LocalInventory
1566
1787
  include Google::Apis::Core::Hashable
@@ -1658,15 +1879,15 @@ module Google
1658
1879
  # @return [Hash<String,String>]
1659
1880
  attr_accessor :labels
1660
1881
 
1661
- # Maximum number of results to return per page. Set this property to the number
1662
- # of prediction results needed. If zero, the service will choose a reasonable
1882
+ # Maximum number of results to return. Set this property to the number of
1883
+ # prediction results needed. If zero, the service will choose a reasonable
1663
1884
  # default. The maximum allowed value is 100. Values above 100 will be coerced to
1664
1885
  # 100.
1665
1886
  # Corresponds to the JSON property `pageSize`
1666
1887
  # @return [Fixnum]
1667
1888
  attr_accessor :page_size
1668
1889
 
1669
- # This field is not used for now, leave it unset.
1890
+ # This field is not used; leave it unset.
1670
1891
  # Corresponds to the JSON property `pageToken`
1671
1892
  # @return [String]
1672
1893
  attr_accessor :page_token
@@ -1955,11 +2176,11 @@ module Google
1955
2176
  # belonging to several parallel categories. Strongly recommended using the full
1956
2177
  # path for better search / recommendation quality. To represent full path of
1957
2178
  # category, use '>' sign to separate different hierarchies. If '>' is part of
1958
- # the category name, please replace it with other character(s). For example, if
1959
- # a shoes product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["
1960
- # Sports & Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented
1961
- # as: "categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness >
1962
- # Athletic Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
2179
+ # the category name, replace it with other character(s). For example, if a shoes
2180
+ # product belongs to both ["Shoes & Accessories" -> "Shoes"] and ["Sports &
2181
+ # Fitness" -> "Athletic Clothing" -> "Shoes"], it could be represented as: "
2182
+ # categories": [ "Shoes & Accessories > Shoes", "Sports & Fitness > Athletic
2183
+ # Clothing > Shoes" ] Must be set for Type.PRIMARY Product otherwise an
1963
2184
  # INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product.
1964
2185
  # Empty values are not allowed. Each value must be a UTF-8 encoded string with
1965
2186
  # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
@@ -2067,6 +2288,13 @@ module Google
2067
2288
  # @return [String]
2068
2289
  attr_accessor :language_code
2069
2290
 
2291
+ # Output only. A list of local inventories specific to different places. This is
2292
+ # only available for users who have Retail Search enabled, and it can be managed
2293
+ # by AddLocalInventories and RemoveLocalInventories APIs.
2294
+ # Corresponds to the JSON property `localInventories`
2295
+ # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2LocalInventory>]
2296
+ attr_accessor :local_inventories
2297
+
2070
2298
  # The material of the product. For example, "leather", "wooden". A maximum of 20
2071
2299
  # values are allowed. Each value must be a UTF-8 encoded string with a length
2072
2300
  # limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -2245,6 +2473,7 @@ module Google
2245
2473
  @id = args[:id] if args.key?(:id)
2246
2474
  @images = args[:images] if args.key?(:images)
2247
2475
  @language_code = args[:language_code] if args.key?(:language_code)
2476
+ @local_inventories = args[:local_inventories] if args.key?(:local_inventories)
2248
2477
  @materials = args[:materials] if args.key?(:materials)
2249
2478
  @name = args[:name] if args.key?(:name)
2250
2479
  @patterns = args[:patterns] if args.key?(:patterns)
@@ -2322,7 +2551,7 @@ module Google
2322
2551
  # @return [Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource]
2323
2552
  attr_accessor :big_query_source
2324
2553
 
2325
- # Google Cloud Storage location for input content. format.
2554
+ # Google Cloud Storage location for input content.
2326
2555
  # Corresponds to the JSON property `gcsSource`
2327
2556
  # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource]
2328
2557
  attr_accessor :gcs_source
@@ -2571,7 +2800,7 @@ module Google
2571
2800
  end
2572
2801
  end
2573
2802
 
2574
- # Metadata for RejoinUserEvents method.
2803
+ # Metadata for `RejoinUserEvents` method.
2575
2804
  class GoogleCloudRetailV2RejoinUserEventsMetadata
2576
2805
  include Google::Apis::Core::Hashable
2577
2806
 
@@ -2589,8 +2818,8 @@ module Google
2589
2818
  include Google::Apis::Core::Hashable
2590
2819
 
2591
2820
  # 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
2821
+ # events to be rejoined with the latest product catalog. Defaults to `
2822
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an
2594
2823
  # invalid integer value.
2595
2824
  # Corresponds to the JSON property `userEventRejoinScope`
2596
2825
  # @return [String]
@@ -2606,7 +2835,7 @@ module Google
2606
2835
  end
2607
2836
  end
2608
2837
 
2609
- # Response message for RejoinUserEvents method.
2838
+ # Response message for `RejoinUserEvents` method.
2610
2839
  class GoogleCloudRetailV2RejoinUserEventsResponse
2611
2840
  include Google::Apis::Core::Hashable
2612
2841
 
@@ -2644,6 +2873,26 @@ module Google
2644
2873
  end
2645
2874
  end
2646
2875
 
2876
+ # Request for RemoveControl method.
2877
+ class GoogleCloudRetailV2RemoveControlRequest
2878
+ include Google::Apis::Core::Hashable
2879
+
2880
+ # Required. The id of the control to apply. Assumed to be in the same catalog as
2881
+ # the serving config.
2882
+ # Corresponds to the JSON property `controlId`
2883
+ # @return [String]
2884
+ attr_accessor :control_id
2885
+
2886
+ def initialize(**args)
2887
+ update!(**args)
2888
+ end
2889
+
2890
+ # Update properties of this object
2891
+ def update!(**args)
2892
+ @control_id = args[:control_id] if args.key?(:control_id)
2893
+ end
2894
+ end
2895
+
2647
2896
  # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
2648
2897
  # Currently empty because there is no meaningful metadata populated from the
2649
2898
  # ProductService.RemoveFulfillmentPlaces method.
@@ -2796,6 +3045,361 @@ module Google
2796
3045
  end
2797
3046
  end
2798
3047
 
3048
+ # Request for CatalogService.ReplaceCatalogAttribute method.
3049
+ class GoogleCloudRetailV2ReplaceCatalogAttributeRequest
3050
+ include Google::Apis::Core::Hashable
3051
+
3052
+ # Catalog level attribute config for an attribute. For example, if customers
3053
+ # want to enable/disable facet for a specific attribute.
3054
+ # Corresponds to the JSON property `catalogAttribute`
3055
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2CatalogAttribute]
3056
+ attr_accessor :catalog_attribute
3057
+
3058
+ # Indicates which fields in the provided CatalogAttribute to update. The
3059
+ # following are NOT supported: * CatalogAttribute.key If not set, all supported
3060
+ # fields are updated.
3061
+ # Corresponds to the JSON property `updateMask`
3062
+ # @return [String]
3063
+ attr_accessor :update_mask
3064
+
3065
+ def initialize(**args)
3066
+ update!(**args)
3067
+ end
3068
+
3069
+ # Update properties of this object
3070
+ def update!(**args)
3071
+ @catalog_attribute = args[:catalog_attribute] if args.key?(:catalog_attribute)
3072
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
3073
+ end
3074
+ end
3075
+
3076
+ # A rule is a condition-action pair * A condition defines when a rule is to be
3077
+ # triggered. * An action specifies what occurs on that trigger. Currently rules
3078
+ # only work for controls with SOLUTION_TYPE_SEARCH.
3079
+ class GoogleCloudRetailV2Rule
3080
+ include Google::Apis::Core::Hashable
3081
+
3082
+ # A boost action to apply to results matching condition specified above.
3083
+ # Corresponds to the JSON property `boostAction`
3084
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleBoostAction]
3085
+ attr_accessor :boost_action
3086
+
3087
+ # Metadata that is used to define a condition that triggers an action. A valid
3088
+ # condition must specify at least one of 'query_terms' or 'products_filter'. If
3089
+ # multiple fields are specified, the condition is met if all the fields are
3090
+ # satisfied e.g. if a set of query terms and product_filter are set, then only
3091
+ # items matching the product_filter for requests with a query matching the query
3092
+ # terms wil get boosted.
3093
+ # Corresponds to the JSON property `condition`
3094
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2Condition]
3095
+ attr_accessor :condition
3096
+
3097
+ # Prevents `query_term` from being associated with specified terms during search.
3098
+ # Example: Don't associate "gShoe" and "cheap".
3099
+ # Corresponds to the JSON property `doNotAssociateAction`
3100
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleDoNotAssociateAction]
3101
+ attr_accessor :do_not_associate_action
3102
+
3103
+ # * Rule Condition: - No Condition.query_terms provided is a global match. - 1
3104
+ # or more Condition.query_terms provided are combined with OR operator. * Action
3105
+ # Input: The request query and filter that are applied to the retrieved products,
3106
+ # in addition to any filters already provided with the SearchRequest. The AND
3107
+ # operator is used to combine the query's existing filters with the filter rule(
3108
+ # s). NOTE: May result in 0 results when filters conflict. * Action Result:
3109
+ # Filters the returned objects to be ONLY those that passed the filter.
3110
+ # Corresponds to the JSON property `filterAction`
3111
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleFilterAction]
3112
+ attr_accessor :filter_action
3113
+
3114
+ # Prevents a term in the query from being used in search. Example: Don't search
3115
+ # for "shoddy".
3116
+ # Corresponds to the JSON property `ignoreAction`
3117
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleIgnoreAction]
3118
+ attr_accessor :ignore_action
3119
+
3120
+ # Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
3121
+ # synonyms of each query term only. `query_terms` will not be treated as
3122
+ # synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
3123
+ # shoes" will not use a synonym of "sneakers".
3124
+ # Corresponds to the JSON property `onewaySynonymsAction`
3125
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleOnewaySynonymsAction]
3126
+ attr_accessor :oneway_synonyms_action
3127
+
3128
+ # Redirects a shopper to a specific page. * Rule Condition: - Must specify
3129
+ # Condition.query_terms. * Action Input: Request Query * Action Result:
3130
+ # Redirects shopper to provided uri.
3131
+ # Corresponds to the JSON property `redirectAction`
3132
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleRedirectAction]
3133
+ attr_accessor :redirect_action
3134
+
3135
+ # Replaces a term in the query. Multiple replacement candidates can be specified.
3136
+ # All `query_terms` will be replaced with the replacement term. Example:
3137
+ # Replace "gShoe" with "google shoe".
3138
+ # Corresponds to the JSON property `replacementAction`
3139
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleReplacementAction]
3140
+ attr_accessor :replacement_action
3141
+
3142
+ # Creates a set of terms that will be treated as synonyms of each other. Example:
3143
+ # synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
3144
+ # . * "shoes" will use a synonym of "sneakers".
3145
+ # Corresponds to the JSON property `twowaySynonymsAction`
3146
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2RuleTwowaySynonymsAction]
3147
+ attr_accessor :twoway_synonyms_action
3148
+
3149
+ def initialize(**args)
3150
+ update!(**args)
3151
+ end
3152
+
3153
+ # Update properties of this object
3154
+ def update!(**args)
3155
+ @boost_action = args[:boost_action] if args.key?(:boost_action)
3156
+ @condition = args[:condition] if args.key?(:condition)
3157
+ @do_not_associate_action = args[:do_not_associate_action] if args.key?(:do_not_associate_action)
3158
+ @filter_action = args[:filter_action] if args.key?(:filter_action)
3159
+ @ignore_action = args[:ignore_action] if args.key?(:ignore_action)
3160
+ @oneway_synonyms_action = args[:oneway_synonyms_action] if args.key?(:oneway_synonyms_action)
3161
+ @redirect_action = args[:redirect_action] if args.key?(:redirect_action)
3162
+ @replacement_action = args[:replacement_action] if args.key?(:replacement_action)
3163
+ @twoway_synonyms_action = args[:twoway_synonyms_action] if args.key?(:twoway_synonyms_action)
3164
+ end
3165
+ end
3166
+
3167
+ # A boost action to apply to results matching condition specified above.
3168
+ class GoogleCloudRetailV2RuleBoostAction
3169
+ include Google::Apis::Core::Hashable
3170
+
3171
+ # Strength of the condition boost, which must be in [-1, 1]. Negative boost
3172
+ # means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
3173
+ # However, it does not necessarily mean that the boosted item will be the top
3174
+ # result at all times, nor that other items will be excluded. Results could
3175
+ # still be shown even when none of them matches the condition. And results that
3176
+ # are significantly more relevant to the search query can still trump your
3177
+ # heavily favored but irrelevant items. Setting to -1.0 gives the item a big
3178
+ # demotion. However, results that are deeply relevant might still be shown. The
3179
+ # item will have an upstream battle to get a fairly high ranking, but it is not
3180
+ # blocked out completely. Setting to 0.0 means no boost applied. The boosting
3181
+ # condition is ignored.
3182
+ # Corresponds to the JSON property `boost`
3183
+ # @return [Float]
3184
+ attr_accessor :boost
3185
+
3186
+ # The filter can have a max size of 5000 characters. An expression which
3187
+ # specifies which products to apply an action to. The syntax and supported
3188
+ # fields are the same as a filter expression. See SearchRequest.filter for
3189
+ # detail syntax and limitations. Examples: * To boost products with product ID "
3190
+ # product_1" or "product_2", and color "Red" or "Blue": *(id: ANY("product_1", "
3191
+ # product_2")) * *AND * *(colorFamilies: ANY("Red", "Blue")) *
3192
+ # Corresponds to the JSON property `productsFilter`
3193
+ # @return [String]
3194
+ attr_accessor :products_filter
3195
+
3196
+ def initialize(**args)
3197
+ update!(**args)
3198
+ end
3199
+
3200
+ # Update properties of this object
3201
+ def update!(**args)
3202
+ @boost = args[:boost] if args.key?(:boost)
3203
+ @products_filter = args[:products_filter] if args.key?(:products_filter)
3204
+ end
3205
+ end
3206
+
3207
+ # Prevents `query_term` from being associated with specified terms during search.
3208
+ # Example: Don't associate "gShoe" and "cheap".
3209
+ class GoogleCloudRetailV2RuleDoNotAssociateAction
3210
+ include Google::Apis::Core::Hashable
3211
+
3212
+ # Cannot contain duplicates or the query term. Can specify up to 100 terms.
3213
+ # Corresponds to the JSON property `doNotAssociateTerms`
3214
+ # @return [Array<String>]
3215
+ attr_accessor :do_not_associate_terms
3216
+
3217
+ # Terms from the search query. Will not consider do_not_associate_terms for
3218
+ # search if in search query. Can specify up to 100 terms.
3219
+ # Corresponds to the JSON property `queryTerms`
3220
+ # @return [Array<String>]
3221
+ attr_accessor :query_terms
3222
+
3223
+ # Will be [deprecated = true] post migration;
3224
+ # Corresponds to the JSON property `terms`
3225
+ # @return [Array<String>]
3226
+ attr_accessor :terms
3227
+
3228
+ def initialize(**args)
3229
+ update!(**args)
3230
+ end
3231
+
3232
+ # Update properties of this object
3233
+ def update!(**args)
3234
+ @do_not_associate_terms = args[:do_not_associate_terms] if args.key?(:do_not_associate_terms)
3235
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
3236
+ @terms = args[:terms] if args.key?(:terms)
3237
+ end
3238
+ end
3239
+
3240
+ # * Rule Condition: - No Condition.query_terms provided is a global match. - 1
3241
+ # or more Condition.query_terms provided are combined with OR operator. * Action
3242
+ # Input: The request query and filter that are applied to the retrieved products,
3243
+ # in addition to any filters already provided with the SearchRequest. The AND
3244
+ # operator is used to combine the query's existing filters with the filter rule(
3245
+ # s). NOTE: May result in 0 results when filters conflict. * Action Result:
3246
+ # Filters the returned objects to be ONLY those that passed the filter.
3247
+ class GoogleCloudRetailV2RuleFilterAction
3248
+ include Google::Apis::Core::Hashable
3249
+
3250
+ # A filter to apply on the matching condition results. Supported features: *
3251
+ # filter must be set. * Filter syntax is identical to SearchRequest.filter. See
3252
+ # more details at the Retail Search [user guide](/retail/search/docs/filter-and-
3253
+ # order#filter). * To filter products with product ID "product_1" or "product_2",
3254
+ # and color "Red" or "Blue": *(id: ANY("product_1", "product_2")) * *AND * *(
3255
+ # colorFamilies: ANY("Red", "Blue")) *
3256
+ # Corresponds to the JSON property `filter`
3257
+ # @return [String]
3258
+ attr_accessor :filter
3259
+
3260
+ def initialize(**args)
3261
+ update!(**args)
3262
+ end
3263
+
3264
+ # Update properties of this object
3265
+ def update!(**args)
3266
+ @filter = args[:filter] if args.key?(:filter)
3267
+ end
3268
+ end
3269
+
3270
+ # Prevents a term in the query from being used in search. Example: Don't search
3271
+ # for "shoddy".
3272
+ class GoogleCloudRetailV2RuleIgnoreAction
3273
+ include Google::Apis::Core::Hashable
3274
+
3275
+ # Terms to ignore in the search query.
3276
+ # Corresponds to the JSON property `ignoreTerms`
3277
+ # @return [Array<String>]
3278
+ attr_accessor :ignore_terms
3279
+
3280
+ def initialize(**args)
3281
+ update!(**args)
3282
+ end
3283
+
3284
+ # Update properties of this object
3285
+ def update!(**args)
3286
+ @ignore_terms = args[:ignore_terms] if args.key?(:ignore_terms)
3287
+ end
3288
+ end
3289
+
3290
+ # Maps a set of terms to a set of synonyms. Set of synonyms will be treated as
3291
+ # synonyms of each query term only. `query_terms` will not be treated as
3292
+ # synonyms of each other. Example: "sneakers" will use a synonym of "shoes". "
3293
+ # shoes" will not use a synonym of "sneakers".
3294
+ class GoogleCloudRetailV2RuleOnewaySynonymsAction
3295
+ include Google::Apis::Core::Hashable
3296
+
3297
+ # Will be [deprecated = true] post migration;
3298
+ # Corresponds to the JSON property `onewayTerms`
3299
+ # @return [Array<String>]
3300
+ attr_accessor :oneway_terms
3301
+
3302
+ # Terms from the search query. Will treat synonyms as their synonyms. Not
3303
+ # themselves synonyms of the synonyms. Can specify up to 100 terms.
3304
+ # Corresponds to the JSON property `queryTerms`
3305
+ # @return [Array<String>]
3306
+ attr_accessor :query_terms
3307
+
3308
+ # Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100
3309
+ # synonyms.
3310
+ # Corresponds to the JSON property `synonyms`
3311
+ # @return [Array<String>]
3312
+ attr_accessor :synonyms
3313
+
3314
+ def initialize(**args)
3315
+ update!(**args)
3316
+ end
3317
+
3318
+ # Update properties of this object
3319
+ def update!(**args)
3320
+ @oneway_terms = args[:oneway_terms] if args.key?(:oneway_terms)
3321
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
3322
+ @synonyms = args[:synonyms] if args.key?(:synonyms)
3323
+ end
3324
+ end
3325
+
3326
+ # Redirects a shopper to a specific page. * Rule Condition: - Must specify
3327
+ # Condition.query_terms. * Action Input: Request Query * Action Result:
3328
+ # Redirects shopper to provided uri.
3329
+ class GoogleCloudRetailV2RuleRedirectAction
3330
+ include Google::Apis::Core::Hashable
3331
+
3332
+ # URL must have length equal or less than 2000 characters.
3333
+ # Corresponds to the JSON property `redirectUri`
3334
+ # @return [String]
3335
+ attr_accessor :redirect_uri
3336
+
3337
+ def initialize(**args)
3338
+ update!(**args)
3339
+ end
3340
+
3341
+ # Update properties of this object
3342
+ def update!(**args)
3343
+ @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
3344
+ end
3345
+ end
3346
+
3347
+ # Replaces a term in the query. Multiple replacement candidates can be specified.
3348
+ # All `query_terms` will be replaced with the replacement term. Example:
3349
+ # Replace "gShoe" with "google shoe".
3350
+ class GoogleCloudRetailV2RuleReplacementAction
3351
+ include Google::Apis::Core::Hashable
3352
+
3353
+ # Terms from the search query. Will be replaced by replacement term. Can specify
3354
+ # up to 100 terms.
3355
+ # Corresponds to the JSON property `queryTerms`
3356
+ # @return [Array<String>]
3357
+ attr_accessor :query_terms
3358
+
3359
+ # Term that will be used for replacement.
3360
+ # Corresponds to the JSON property `replacementTerm`
3361
+ # @return [String]
3362
+ attr_accessor :replacement_term
3363
+
3364
+ # Will be [deprecated = true] post migration;
3365
+ # Corresponds to the JSON property `term`
3366
+ # @return [String]
3367
+ attr_accessor :term
3368
+
3369
+ def initialize(**args)
3370
+ update!(**args)
3371
+ end
3372
+
3373
+ # Update properties of this object
3374
+ def update!(**args)
3375
+ @query_terms = args[:query_terms] if args.key?(:query_terms)
3376
+ @replacement_term = args[:replacement_term] if args.key?(:replacement_term)
3377
+ @term = args[:term] if args.key?(:term)
3378
+ end
3379
+ end
3380
+
3381
+ # Creates a set of terms that will be treated as synonyms of each other. Example:
3382
+ # synonyms of "sneakers" and "shoes". * "sneakers" will use a synonym of "shoes"
3383
+ # . * "shoes" will use a synonym of "sneakers".
3384
+ class GoogleCloudRetailV2RuleTwowaySynonymsAction
3385
+ include Google::Apis::Core::Hashable
3386
+
3387
+ # Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at
3388
+ # least 2 synonyms.
3389
+ # Corresponds to the JSON property `synonyms`
3390
+ # @return [Array<String>]
3391
+ attr_accessor :synonyms
3392
+
3393
+ def initialize(**args)
3394
+ update!(**args)
3395
+ end
3396
+
3397
+ # Update properties of this object
3398
+ def update!(**args)
3399
+ @synonyms = args[:synonyms] if args.key?(:synonyms)
3400
+ end
3401
+ end
3402
+
2799
3403
  # Request message for SearchService.Search method.
2800
3404
  class GoogleCloudRetailV2SearchRequest
2801
3405
  include Google::Apis::Core::Hashable
@@ -2880,9 +3484,9 @@ module Google
2880
3484
  # navigation queries to achieve good search quality. The format should be the
2881
3485
  # same as UserEvent.page_categories; To represent full path of category, use '>'
2882
3486
  # sign to separate different hierarchies. If '>' is part of the category name,
2883
- # please replace it with other character(s). Category pages include special
2884
- # pages such as sales or promotions. For instance, a special sale page may have
2885
- # the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
3487
+ # replace it with other character(s). Category pages include special pages such
3488
+ # as sales or promotions. For instance, a special sale page may have the
3489
+ # category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
2886
3490
  # Corresponds to the JSON property `pageCategories`
2887
3491
  # @return [Array<String>]
2888
3492
  attr_accessor :page_categories
@@ -3607,6 +4211,193 @@ module Google
3607
4211
  end
3608
4212
  end
3609
4213
 
4214
+ # Configures metadata that is used to generate serving time results (e.g. search
4215
+ # results or recommendation predictions).
4216
+ class GoogleCloudRetailV2ServingConfig
4217
+ include Google::Apis::Core::Hashable
4218
+
4219
+ # Condition boost specifications. If a product matches multiple conditions in
4220
+ # the specifications, boost scores from these specifications are all applied and
4221
+ # combined in a non-linear way. Maximum number of specifications is 100. Notice
4222
+ # that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are
4223
+ # set, the boost conditions from both places are evaluated. If a search request
4224
+ # matches multiple boost conditions, the final boost score is equal to the sum
4225
+ # of the boost scores from all matched boost conditions. Can only be set if
4226
+ # solution_types is SOLUTION_TYPE_SEARCH.
4227
+ # Corresponds to the JSON property `boostControlIds`
4228
+ # @return [Array<String>]
4229
+ attr_accessor :boost_control_ids
4230
+
4231
+ # Required. The human readable serving config display name. Used in Retail UI.
4232
+ # This field must be a UTF-8 encoded string with a length limit of 128
4233
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
4234
+ # Corresponds to the JSON property `displayName`
4235
+ # @return [String]
4236
+ attr_accessor :display_name
4237
+
4238
+ # How much diversity to use in recommendation model results e.g. `medium-
4239
+ # diversity` or `high-diversity`. Currently supported values: * `no-diversity` *
4240
+ # `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If
4241
+ # not specified, we choose default based on recommendation model type. Default
4242
+ # value: `no-diversity`. Can only be set if solution_types is
4243
+ # SOLUTION_TYPE_RECOMMENDATION.
4244
+ # Corresponds to the JSON property `diversityLevel`
4245
+ # @return [String]
4246
+ attr_accessor :diversity_level
4247
+
4248
+ # What kind of diversity to use - data driven or rule based.
4249
+ # Corresponds to the JSON property `diversityType`
4250
+ # @return [String]
4251
+ attr_accessor :diversity_type
4252
+
4253
+ # Condition do not associate specifications. If multiple do not associate
4254
+ # conditions match, all matching do not associate controls in the list will
4255
+ # execute. - Order does not matter. - Maximum number of specifications is 100.
4256
+ # Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
4257
+ # Corresponds to the JSON property `doNotAssociateControlIds`
4258
+ # @return [Array<String>]
4259
+ attr_accessor :do_not_associate_control_ids
4260
+
4261
+ # The specifications of dynamically generated facets.
4262
+ # Corresponds to the JSON property `dynamicFacetSpec`
4263
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequestDynamicFacetSpec]
4264
+ attr_accessor :dynamic_facet_spec
4265
+
4266
+ # Whether to add additional category filters on the `similar-items` model. If
4267
+ # not specified, we enable it by default. Allowed values are: * `no-category-
4268
+ # match`: No additional filtering of original results from the model and the
4269
+ # customer's filters. * `relaxed-category-match`: Only keep results with
4270
+ # categories that match at least one item categories in the PredictRequests's
4271
+ # context item. * If customer also sends filters in the PredictRequest, then the
4272
+ # results will satisfy both conditions (user given and category match). Can only
4273
+ # be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.
4274
+ # Corresponds to the JSON property `enableCategoryFilterLevel`
4275
+ # @return [String]
4276
+ attr_accessor :enable_category_filter_level
4277
+
4278
+ # Facet specifications for faceted search. If empty, no facets are returned. The
4279
+ # ids refer to the ids of Control resources with only the Facet control set.
4280
+ # These controls are assumed to be in the same Catalog as the ServingConfig. A
4281
+ # maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
4282
+ # returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.
4283
+ # Corresponds to the JSON property `facetControlIds`
4284
+ # @return [Array<String>]
4285
+ attr_accessor :facet_control_ids
4286
+
4287
+ # Condition filter specifications. If a product matches multiple conditions in
4288
+ # the specifications, filters from these specifications are all applied and
4289
+ # combined via the AND operator. Maximum number of specifications is 100. Can
4290
+ # only be set if solution_types is SOLUTION_TYPE_SEARCH.
4291
+ # Corresponds to the JSON property `filterControlIds`
4292
+ # @return [Array<String>]
4293
+ attr_accessor :filter_control_ids
4294
+
4295
+ # Condition ignore specifications. If multiple ignore conditions match, all
4296
+ # matching ignore controls in the list will execute. - Order does not matter. -
4297
+ # Maximum number of specifications is 100. Can only be set if solution_types is
4298
+ # SOLUTION_TYPE_SEARCH.
4299
+ # Corresponds to the JSON property `ignoreControlIds`
4300
+ # @return [Array<String>]
4301
+ attr_accessor :ignore_control_ids
4302
+
4303
+ # The id of the model in the same Catalog to use at serving time. Currently only
4304
+ # RecommendationModels are supported: https://cloud.google.com/retail/
4305
+ # recommendations-ai/docs/create-models Can be changed but only to a compatible
4306
+ # model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when
4307
+ # solution_types is SOLUTION_TYPE_RECOMMENDATION.
4308
+ # Corresponds to the JSON property `modelId`
4309
+ # @return [String]
4310
+ attr_accessor :model_id
4311
+
4312
+ # Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/
4313
+ # servingConfig/*`
4314
+ # Corresponds to the JSON property `name`
4315
+ # @return [String]
4316
+ attr_accessor :name
4317
+
4318
+ # Condition oneway synonyms specifications. If multiple oneway synonyms
4319
+ # conditions match, all matching oneway synonyms controls in the list will
4320
+ # execute. Order of controls in the list will not matter. Maximum number of
4321
+ # specifications is 100. Can only be set if solution_types is
4322
+ # SOLUTION_TYPE_SEARCH.
4323
+ # Corresponds to the JSON property `onewaySynonymsControlIds`
4324
+ # @return [Array<String>]
4325
+ attr_accessor :oneway_synonyms_control_ids
4326
+
4327
+ # The specification for personalization.
4328
+ # Corresponds to the JSON property `personalizationSpec`
4329
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequestPersonalizationSpec]
4330
+ attr_accessor :personalization_spec
4331
+
4332
+ # How much price ranking we want in serving results. Price reranking causes
4333
+ # product items with a similar recommendation probability to be ordered by price,
4334
+ # with the highest-priced items first. This setting could result in a decrease
4335
+ # in click-through and conversion rates. Allowed values are: * `no-price-
4336
+ # reranking` * `low-price-raranking` * `medium-price-reranking` * `high-price-
4337
+ # reranking` If not specified, we choose default based on model type. Default
4338
+ # value: `no-price-reranking`. Can only be set if solution_types is
4339
+ # SOLUTION_TYPE_RECOMMENDATION.
4340
+ # Corresponds to the JSON property `priceRerankingLevel`
4341
+ # @return [String]
4342
+ attr_accessor :price_reranking_level
4343
+
4344
+ # Condition redirect specifications. Only the first triggered redirect action is
4345
+ # applied, even if multiple apply. Maximum number of specifications is 1000. Can
4346
+ # only be set if solution_types is SOLUTION_TYPE_SEARCH.
4347
+ # Corresponds to the JSON property `redirectControlIds`
4348
+ # @return [Array<String>]
4349
+ attr_accessor :redirect_control_ids
4350
+
4351
+ # Condition replacement specifications. - Applied according to the order in the
4352
+ # list. - A previously replaced term can not be re-replaced. - Maximum number of
4353
+ # specifications is 100. Can only be set if solution_types is
4354
+ # SOLUTION_TYPE_SEARCH.
4355
+ # Corresponds to the JSON property `replacementControlIds`
4356
+ # @return [Array<String>]
4357
+ attr_accessor :replacement_control_ids
4358
+
4359
+ # Required. Immutable. Specifies the solution types that a serving config can be
4360
+ # associated with. Currently we support setting only one type of solution.
4361
+ # Corresponds to the JSON property `solutionTypes`
4362
+ # @return [Array<String>]
4363
+ attr_accessor :solution_types
4364
+
4365
+ # Condition synonyms specifications. If multiple syonyms conditions match, all
4366
+ # matching synonyms control in the list will execute. Order of controls in the
4367
+ # list will not matter. Maximum number of specifications is 100. Can only be set
4368
+ # if solution_types is SOLUTION_TYPE_SEARCH.
4369
+ # Corresponds to the JSON property `twowaySynonymsControlIds`
4370
+ # @return [Array<String>]
4371
+ attr_accessor :twoway_synonyms_control_ids
4372
+
4373
+ def initialize(**args)
4374
+ update!(**args)
4375
+ end
4376
+
4377
+ # Update properties of this object
4378
+ def update!(**args)
4379
+ @boost_control_ids = args[:boost_control_ids] if args.key?(:boost_control_ids)
4380
+ @display_name = args[:display_name] if args.key?(:display_name)
4381
+ @diversity_level = args[:diversity_level] if args.key?(:diversity_level)
4382
+ @diversity_type = args[:diversity_type] if args.key?(:diversity_type)
4383
+ @do_not_associate_control_ids = args[:do_not_associate_control_ids] if args.key?(:do_not_associate_control_ids)
4384
+ @dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
4385
+ @enable_category_filter_level = args[:enable_category_filter_level] if args.key?(:enable_category_filter_level)
4386
+ @facet_control_ids = args[:facet_control_ids] if args.key?(:facet_control_ids)
4387
+ @filter_control_ids = args[:filter_control_ids] if args.key?(:filter_control_ids)
4388
+ @ignore_control_ids = args[:ignore_control_ids] if args.key?(:ignore_control_ids)
4389
+ @model_id = args[:model_id] if args.key?(:model_id)
4390
+ @name = args[:name] if args.key?(:name)
4391
+ @oneway_synonyms_control_ids = args[:oneway_synonyms_control_ids] if args.key?(:oneway_synonyms_control_ids)
4392
+ @personalization_spec = args[:personalization_spec] if args.key?(:personalization_spec)
4393
+ @price_reranking_level = args[:price_reranking_level] if args.key?(:price_reranking_level)
4394
+ @redirect_control_ids = args[:redirect_control_ids] if args.key?(:redirect_control_ids)
4395
+ @replacement_control_ids = args[:replacement_control_ids] if args.key?(:replacement_control_ids)
4396
+ @solution_types = args[:solution_types] if args.key?(:solution_types)
4397
+ @twoway_synonyms_control_ids = args[:twoway_synonyms_control_ids] if args.key?(:twoway_synonyms_control_ids)
4398
+ end
4399
+ end
4400
+
3610
4401
  # Request message to set a specified branch as new default_branch.
3611
4402
  class GoogleCloudRetailV2SetDefaultBranchRequest
3612
4403
  include Google::Apis::Core::Hashable
@@ -3829,12 +4620,12 @@ module Google
3829
4620
 
3830
4621
  # The categories associated with a category page. To represent full path of
3831
4622
  # category, use '>' sign to separate different hierarchies. If '>' is part of
3832
- # the category name, please replace it with other character(s). Category pages
3833
- # include special pages such as sales or promotions. For instance, a special
3834
- # sale page may have the category hierarchy: "pageCategories" : ["Sales > 2017
3835
- # Black Friday Deals"]. Required for `category-page-view` events. At least one
3836
- # of search_query or page_categories is required for `search` events. Other
3837
- # event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
4623
+ # the category name, replace it with other character(s). Category pages include
4624
+ # special pages such as sales or promotions. For instance, a special sale page
4625
+ # may have the category hierarchy: "pageCategories" : ["Sales > 2017 Black
4626
+ # Friday Deals"]. Required for `category-page-view` events. At least one of
4627
+ # search_query or page_categories is required for `search` events. Other event
4628
+ # types should not set this field. Otherwise, an INVALID_ARGUMENT error is
3838
4629
  # returned.
3839
4630
  # Corresponds to the JSON property `pageCategories`
3840
4631
  # @return [Array<String>]
@@ -4003,7 +4794,7 @@ module Google
4003
4794
  # @return [Google::Apis::RetailV2::GoogleCloudRetailV2BigQuerySource]
4004
4795
  attr_accessor :big_query_source
4005
4796
 
4006
- # Google Cloud Storage location for input content. format.
4797
+ # Google Cloud Storage location for input content.
4007
4798
  # Corresponds to the JSON property `gcsSource`
4008
4799
  # @return [Google::Apis::RetailV2::GoogleCloudRetailV2GcsSource]
4009
4800
  attr_accessor :gcs_source
@@ -4172,8 +4963,9 @@ module Google
4172
4963
  class GoogleCloudRetailV2alphaCreateModelMetadata
4173
4964
  include Google::Apis::Core::Hashable
4174
4965
 
4175
- # The resource name of the model that this create applies to. Format: projects/`
4966
+ # The resource name of the model that this create applies to. Format: `projects/`
4176
4967
  # project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
4968
+ # `
4177
4969
  # Corresponds to the JSON property `model`
4178
4970
  # @return [String]
4179
4971
  attr_accessor :model
@@ -4209,8 +5001,8 @@ module Google
4209
5001
  end
4210
5002
  end
4211
5003
 
4212
- # Metadata related to the progress of the Export operation. This will be
4213
- # returned by the google.longrunning.Operation.metadata field.
5004
+ # Metadata related to the progress of the Export operation. This is returned by
5005
+ # the google.longrunning.Operation.metadata field.
4214
5006
  class GoogleCloudRetailV2alphaExportMetadata
4215
5007
  include Google::Apis::Core::Hashable
4216
5008
 
@@ -4328,8 +5120,8 @@ module Google
4328
5120
  include Google::Apis::Core::Hashable
4329
5121
 
4330
5122
  # Google Cloud Storage prefix for import errors. This must be an empty, existing
4331
- # Cloud Storage directory. Import errors will be written to sharded files in
4332
- # this directory, one per line, as a JSON-encoded `google.rpc.Status` message.
5123
+ # Cloud Storage directory. Import errors are written to sharded files in this
5124
+ # directory, one per line, as a JSON-encoded `google.rpc.Status` message.
4333
5125
  # Corresponds to the JSON property `gcsPrefix`
4334
5126
  # @return [String]
4335
5127
  attr_accessor :gcs_prefix
@@ -4344,8 +5136,8 @@ module Google
4344
5136
  end
4345
5137
  end
4346
5138
 
4347
- # Metadata related to the progress of the Import operation. This will be
4348
- # returned by the google.longrunning.Operation.metadata field.
5139
+ # Metadata related to the progress of the Import operation. This is returned by
5140
+ # the google.longrunning.Operation.metadata field.
4349
5141
  class GoogleCloudRetailV2alphaImportMetadata
4350
5142
  include Google::Apis::Core::Hashable
4351
5143
 
@@ -4360,9 +5152,9 @@ module Google
4360
5152
  attr_accessor :failure_count
4361
5153
 
4362
5154
  # Pub/Sub topic for receiving notification. If this field is set, when the
4363
- # import is finished, a notification will be sent to specified Pub/Sub topic.
4364
- # The message data will be JSON string of a Operation. Format of the Pub/Sub
4365
- # topic is `projects/`project`/topics/`topic``.
5155
+ # import is finished, a notification is sent to specified Pub/Sub topic. The
5156
+ # message data is JSON string of a Operation. Format of the Pub/Sub topic is `
5157
+ # projects/`project`/topics/`topic``.
4366
5158
  # Corresponds to the JSON property `notificationPubsubTopic`
4367
5159
  # @return [String]
4368
5160
  attr_accessor :notification_pubsub_topic
@@ -4467,7 +5259,7 @@ module Google
4467
5259
 
4468
5260
  # Metadata that describes the training and serving parameters of a Model. A
4469
5261
  # Model can be associated with a ServingConfig and then queried through the
4470
- # Predict api.
5262
+ # Predict API.
4471
5263
  class GoogleCloudRetailV2alphaModel
4472
5264
  include Google::Apis::Core::Hashable
4473
5265
 
@@ -4476,23 +5268,23 @@ module Google
4476
5268
  # @return [String]
4477
5269
  attr_accessor :create_time
4478
5270
 
4479
- # Output only. The state of data requirements for this model: DATA_OK and
4480
- # DATA_ERROR. Recommendation model cannot be trained if the data is in
4481
- # DATA_ERROR state. Recommendation model can have DATA_ERROR state even if
4482
- # serving state is ACTIVE: models were trained successfully before, but cannot
5271
+ # Output only. The state of data requirements for this model: `DATA_OK` and `
5272
+ # DATA_ERROR`. Recommendation model cannot be trained if the data is in `
5273
+ # DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if
5274
+ # serving state is `ACTIVE`: models were trained successfully before, but cannot
4483
5275
  # be refreshed because model no longer has sufficient data for training.
4484
5276
  # Corresponds to the JSON property `dataState`
4485
5277
  # @return [String]
4486
5278
  attr_accessor :data_state
4487
5279
 
4488
5280
  # Required. The display name of the model. Should be human readable, used to
4489
- # display Recommendation Models in the Retail Cloud Cosole Dashboard. UTF-8
5281
+ # display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8
4490
5282
  # encoded string with limit of 1024 characters.
4491
5283
  # Corresponds to the JSON property `displayName`
4492
5284
  # @return [String]
4493
5285
  attr_accessor :display_name
4494
5286
 
4495
- # Optional. If RECOMMENDATIONS_FILTERING_ENABLED, recommendation filtering by
5287
+ # Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by
4496
5288
  # attributes is enabled for the model.
4497
5289
  # Corresponds to the JSON property `filteringOption`
4498
5290
  # @return [String]
@@ -4503,9 +5295,10 @@ module Google
4503
5295
  # @return [String]
4504
5296
  attr_accessor :last_tune_time
4505
5297
 
4506
- # Required. The fully qualified resource name of the model. Format: projects/`
5298
+ # Required. The fully qualified resource name of the model. Format: `projects/`
4507
5299
  # project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
4508
- # catalog_id has char limit of 50. recommendation_model_id has char limit of 40.
5300
+ # ` catalog_id has char limit of 50. recommendation_model_id has char limit of
5301
+ # 40.
4509
5302
  # Corresponds to the JSON property `name`
4510
5303
  # @return [String]
4511
5304
  attr_accessor :name
@@ -4528,8 +5321,8 @@ module Google
4528
5321
  attr_accessor :page_optimization_config
4529
5322
 
4530
5323
  # Optional. The state of periodic tuning. The period we use is 3 months - to do
4531
- # a one-off tune earlier use the TuneModel method. Default value is
4532
- # PERIODIC_TUNING_ENABLED.
5324
+ # a one-off tune earlier use the `TuneModel` method. Default value is `
5325
+ # PERIODIC_TUNING_ENABLED`.
4533
5326
  # Corresponds to the JSON property `periodicTuningState`
4534
5327
  # @return [String]
4535
5328
  attr_accessor :periodic_tuning_state
@@ -4540,16 +5333,16 @@ module Google
4540
5333
  # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2alphaModelServingConfigList>]
4541
5334
  attr_accessor :serving_config_lists
4542
5335
 
4543
- # Output only. The serving state of the model: ACTIVE, NOT_ACTIVE.
5336
+ # Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
4544
5337
  # Corresponds to the JSON property `servingState`
4545
5338
  # @return [String]
4546
5339
  attr_accessor :serving_state
4547
5340
 
4548
- # Optional. The training state that the model is in (e.g. TRAINING or PAUSED).
4549
- # Since part of the cost of running the service is frequency of training - this
4550
- # can be used to determine when to train model in order to control cost. If not
4551
- # specified: the default value for CreateModel method is TRAINING. the default
4552
- # value for UpdateModel method is to keep the state the same as before.
5341
+ # Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`)
5342
+ # . Since part of the cost of running the service is frequency of training -
5343
+ # this can be used to determine when to train model in order to control cost. If
5344
+ # not specified: the default value for `CreateModel` method is `TRAINING`. The
5345
+ # default value for `UpdateModel` method is to keep the state the same as before.
4553
5346
  # Corresponds to the JSON property `trainingState`
4554
5347
  # @return [String]
4555
5348
  attr_accessor :training_state
@@ -4563,7 +5356,7 @@ module Google
4563
5356
 
4564
5357
  # Required. The type of model e.g. `home-page`. Currently supported values: `
4565
5358
  # recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `
4566
- # page-optimization`, 'similar-items', 'buy-it-again', `recently-viewed`(
5359
+ # page-optimization`, `similar-items`, `buy-it-again`, and `recently-viewed`(
4567
5360
  # readonly value).
4568
5361
  # Corresponds to the JSON property `type`
4569
5362
  # @return [String]
@@ -4648,9 +5441,10 @@ module Google
4648
5441
  class GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate
4649
5442
  include Google::Apis::Core::Hashable
4650
5443
 
4651
- # This has to be a valid ServingConfig identifier. e.g. for a ServingConfig with
4652
- # full name: `projects/*/locations/global/catalogs/default_catalog/
4653
- # servingConfigs/my_candidate_config` this would be 'my_candidate_config'
5444
+ # This has to be a valid ServingConfig identifier. For example, for a
5445
+ # ServingConfig with full name: `projects/*/locations/global/catalogs/
5446
+ # default_catalog/servingConfigs/my_candidate_config`, this would be `
5447
+ # my_candidate_config`.
4654
5448
  # Corresponds to the JSON property `servingConfigId`
4655
5449
  # @return [String]
4656
5450
  attr_accessor :serving_config_id
@@ -4697,13 +5491,13 @@ module Google
4697
5491
  end
4698
5492
  end
4699
5493
 
4700
- # Represents an ordered combination of valid serving configs, which / may be
4701
- # used for PAGE_OPTIMIZATION recommendations.
5494
+ # Represents an ordered combination of valid serving configs, which can be used
5495
+ # for `PAGE_OPTIMIZATION` recommendations.
4702
5496
  class GoogleCloudRetailV2alphaModelServingConfigList
4703
5497
  include Google::Apis::Core::Hashable
4704
5498
 
4705
- # Optional. A set of valid serving configs that may be used for
4706
- # PAGE_OPTIMIZATION.
5499
+ # Optional. A set of valid serving configs that may be used for `
5500
+ # PAGE_OPTIMIZATION`.
4707
5501
  # Corresponds to the JSON property `servingConfigIds`
4708
5502
  # @return [Array<String>]
4709
5503
  attr_accessor :serving_config_ids
@@ -4840,7 +5634,7 @@ module Google
4840
5634
  end
4841
5635
  end
4842
5636
 
4843
- # Metadata for RejoinUserEvents method.
5637
+ # Metadata for `RejoinUserEvents` method.
4844
5638
  class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
4845
5639
  include Google::Apis::Core::Hashable
4846
5640
 
@@ -4853,7 +5647,7 @@ module Google
4853
5647
  end
4854
5648
  end
4855
5649
 
4856
- # Response message for RejoinUserEvents method.
5650
+ # Response message for `RejoinUserEvents` method.
4857
5651
  class GoogleCloudRetailV2alphaRejoinUserEventsResponse
4858
5652
  include Google::Apis::Core::Hashable
4859
5653
 
@@ -4991,8 +5785,9 @@ module Google
4991
5785
  class GoogleCloudRetailV2alphaTuneModelMetadata
4992
5786
  include Google::Apis::Core::Hashable
4993
5787
 
4994
- # The resource name of the model that this tune applies to. Format: projects/`
5788
+ # The resource name of the model that this tune applies to. Format: `projects/`
4995
5789
  # project_number`/locations/`location_id`/catalogs/`catalog_id`/models/`model_id`
5790
+ # `
4996
5791
  # Corresponds to the JSON property `model`
4997
5792
  # @return [String]
4998
5793
  attr_accessor :model
@@ -5153,8 +5948,8 @@ module Google
5153
5948
  end
5154
5949
  end
5155
5950
 
5156
- # Metadata related to the progress of the Export operation. This will be
5157
- # returned by the google.longrunning.Operation.metadata field.
5951
+ # Metadata related to the progress of the Export operation. This is returned by
5952
+ # the google.longrunning.Operation.metadata field.
5158
5953
  class GoogleCloudRetailV2betaExportMetadata
5159
5954
  include Google::Apis::Core::Hashable
5160
5955
 
@@ -5272,8 +6067,8 @@ module Google
5272
6067
  include Google::Apis::Core::Hashable
5273
6068
 
5274
6069
  # Google Cloud Storage prefix for import errors. This must be an empty, existing
5275
- # Cloud Storage directory. Import errors will be written to sharded files in
5276
- # this directory, one per line, as a JSON-encoded `google.rpc.Status` message.
6070
+ # Cloud Storage directory. Import errors are written to sharded files in this
6071
+ # directory, one per line, as a JSON-encoded `google.rpc.Status` message.
5277
6072
  # Corresponds to the JSON property `gcsPrefix`
5278
6073
  # @return [String]
5279
6074
  attr_accessor :gcs_prefix
@@ -5288,8 +6083,8 @@ module Google
5288
6083
  end
5289
6084
  end
5290
6085
 
5291
- # Metadata related to the progress of the Import operation. This will be
5292
- # returned by the google.longrunning.Operation.metadata field.
6086
+ # Metadata related to the progress of the Import operation. This is returned by
6087
+ # the google.longrunning.Operation.metadata field.
5293
6088
  class GoogleCloudRetailV2betaImportMetadata
5294
6089
  include Google::Apis::Core::Hashable
5295
6090
 
@@ -5304,9 +6099,9 @@ module Google
5304
6099
  attr_accessor :failure_count
5305
6100
 
5306
6101
  # Pub/Sub topic for receiving notification. If this field is set, when the
5307
- # import is finished, a notification will be sent to specified Pub/Sub topic.
5308
- # The message data will be JSON string of a Operation. Format of the Pub/Sub
5309
- # topic is `projects/`project`/topics/`topic``.
6102
+ # import is finished, a notification is sent to specified Pub/Sub topic. The
6103
+ # message data is JSON string of a Operation. Format of the Pub/Sub topic is `
6104
+ # projects/`project`/topics/`topic``.
5310
6105
  # Corresponds to the JSON property `notificationPubsubTopic`
5311
6106
  # @return [String]
5312
6107
  attr_accessor :notification_pubsub_topic
@@ -5457,7 +6252,7 @@ module Google
5457
6252
  end
5458
6253
  end
5459
6254
 
5460
- # Metadata for RejoinUserEvents method.
6255
+ # Metadata for `RejoinUserEvents` method.
5461
6256
  class GoogleCloudRetailV2betaRejoinUserEventsMetadata
5462
6257
  include Google::Apis::Core::Hashable
5463
6258
 
@@ -5470,7 +6265,7 @@ module Google
5470
6265
  end
5471
6266
  end
5472
6267
 
5473
- # Response message for RejoinUserEvents method.
6268
+ # Response message for `RejoinUserEvents` method.
5474
6269
  class GoogleCloudRetailV2betaRejoinUserEventsResponse
5475
6270
  include Google::Apis::Core::Hashable
5476
6271