google-apis-retail_v2 0.51.0 → 0.54.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/apis/retail_v2/classes.rb +852 -37
- data/lib/google/apis/retail_v2/gem_version.rb +2 -2
- data/lib/google/apis/retail_v2/representations.rb +310 -0
- data/lib/google/apis/retail_v2/service.rb +524 -38
- metadata +3 -3
@@ -52,8 +52,8 @@ module Google
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# Completes the specified prefix with keyword suggestions. This feature is only
|
55
|
-
# available for users who have Retail Search enabled.
|
56
|
-
#
|
55
|
+
# available for users who have Retail Search enabled. Enable Retail Search on
|
56
|
+
# Cloud Console before using this feature.
|
57
57
|
# @param [String] catalog
|
58
58
|
# Required. Catalog for which the completion is performed. Full resource name of
|
59
59
|
# catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
|
@@ -159,8 +159,8 @@ module Google
|
|
159
159
|
|
160
160
|
# Gets a CompletionConfig.
|
161
161
|
# @param [String] name
|
162
|
-
# Required. Full CompletionConfig resource name. Format: projects/`
|
163
|
-
# project_number`/locations/`location_id`/catalogs/`catalog_id`/completionConfig
|
162
|
+
# Required. Full CompletionConfig resource name. Format: `projects/`
|
163
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/completionConfig`
|
164
164
|
# @param [String] fields
|
165
165
|
# Selector specifying which fields to include in a partial response.
|
166
166
|
# @param [String] quota_user
|
@@ -507,6 +507,42 @@ module Google
|
|
507
507
|
execute_or_queue_command(command, &block)
|
508
508
|
end
|
509
509
|
|
510
|
+
# Replaces the specified CatalogAttribute in the AttributesConfig by updating
|
511
|
+
# the catalog attribute with the same CatalogAttribute.key. If the
|
512
|
+
# CatalogAttribute to replace does not exist, a NOT_FOUND error is returned.
|
513
|
+
# @param [String] attributes_config
|
514
|
+
# Required. Full AttributesConfig resource name. Format: `projects/`
|
515
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/attributesConfig`
|
516
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2ReplaceCatalogAttributeRequest] google_cloud_retail_v2_replace_catalog_attribute_request_object
|
517
|
+
# @param [String] fields
|
518
|
+
# Selector specifying which fields to include in a partial response.
|
519
|
+
# @param [String] quota_user
|
520
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
521
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
522
|
+
# @param [Google::Apis::RequestOptions] options
|
523
|
+
# Request-specific options
|
524
|
+
#
|
525
|
+
# @yield [result, err] Result & error if block supplied
|
526
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig] parsed result object
|
527
|
+
# @yieldparam err [StandardError] error object if request failed
|
528
|
+
#
|
529
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig]
|
530
|
+
#
|
531
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
532
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
533
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
534
|
+
def replace_project_location_catalog_attributes_config_catalog_attribute(attributes_config, google_cloud_retail_v2_replace_catalog_attribute_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
535
|
+
command = make_simple_command(:post, 'v2/{+attributesConfig}:replaceCatalogAttribute', options)
|
536
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ReplaceCatalogAttributeRequest::Representation
|
537
|
+
command.request_object = google_cloud_retail_v2_replace_catalog_attribute_request_object
|
538
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig::Representation
|
539
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2AttributesConfig
|
540
|
+
command.params['attributesConfig'] = attributes_config unless attributes_config.nil?
|
541
|
+
command.query['fields'] = fields unless fields.nil?
|
542
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
543
|
+
execute_or_queue_command(command, &block)
|
544
|
+
end
|
545
|
+
|
510
546
|
# Gets the latest state of a long-running operation. Clients can use this method
|
511
547
|
# to poll the operation result at intervals as recommended by the API service.
|
512
548
|
# @param [String] name
|
@@ -548,8 +584,7 @@ module Google
|
|
548
584
|
# return NOT_FOUND afterwards. If conflicting updates are issued, the Operations
|
549
585
|
# associated with the stale updates will not be marked as done until being
|
550
586
|
# obsolete. This feature is only available for users who have Retail Search
|
551
|
-
# enabled.
|
552
|
-
# feature.
|
587
|
+
# enabled. Enable Retail Search on Cloud Console before using this feature.
|
553
588
|
# @param [String] product
|
554
589
|
# Required. Full resource name of Product, such as `projects/*/locations/global/
|
555
590
|
# catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
|
@@ -598,8 +633,8 @@ module Google
|
|
598
633
|
# GetOperation API will return NOT_FOUND afterwards. If conflicting updates are
|
599
634
|
# issued, the Operations associated with the stale updates will not be marked as
|
600
635
|
# done until being obsolete. This feature is only available for users who have
|
601
|
-
# Retail Search enabled.
|
602
|
-
#
|
636
|
+
# Retail Search enabled. Enable Retail Search on Cloud Console before using this
|
637
|
+
# feature.
|
603
638
|
# @param [String] product
|
604
639
|
# Required. Full resource name of Product, such as `projects/*/locations/global/
|
605
640
|
# catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
|
@@ -910,8 +945,7 @@ module Google
|
|
910
945
|
# return NOT_FOUND afterwards. If conflicting updates are issued, the Operations
|
911
946
|
# associated with the stale updates will not be marked as done until being
|
912
947
|
# obsolete. This feature is only available for users who have Retail Search
|
913
|
-
# enabled.
|
914
|
-
# feature.
|
948
|
+
# enabled. Enable Retail Search on Cloud Console before using this feature.
|
915
949
|
# @param [String] product
|
916
950
|
# Required. Full resource name of Product, such as `projects/*/locations/global/
|
917
951
|
# catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
|
@@ -958,8 +992,8 @@ module Google
|
|
958
992
|
# GetOperation API will return NOT_FOUND afterwards. If conflicting updates are
|
959
993
|
# issued, the Operations associated with the stale updates will not be marked as
|
960
994
|
# done until being obsolete. This feature is only available for users who have
|
961
|
-
# Retail Search enabled.
|
962
|
-
#
|
995
|
+
# Retail Search enabled. Enable Retail Search on Cloud Console before using this
|
996
|
+
# feature.
|
963
997
|
# @param [String] product
|
964
998
|
# Required. Full resource name of Product, such as `projects/*/locations/global/
|
965
999
|
# catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
|
@@ -998,26 +1032,26 @@ module Google
|
|
998
1032
|
# Updates inventory information for a Product while respecting the last update
|
999
1033
|
# timestamps of each inventory field. This process is asynchronous and does not
|
1000
1034
|
# require the Product to exist before updating fulfillment information. If the
|
1001
|
-
# request is valid, the update
|
1035
|
+
# request is valid, the update is enqueued and processed downstream. As a
|
1002
1036
|
# consequence, when a response is returned, updates are not immediately
|
1003
1037
|
# manifested in the Product queried by ProductService.GetProduct or
|
1004
1038
|
# ProductService.ListProducts. When inventory is updated with ProductService.
|
1005
1039
|
# CreateProduct and ProductService.UpdateProduct, the specified inventory field
|
1006
|
-
# value(s)
|
1007
|
-
#
|
1008
|
-
#
|
1009
|
-
#
|
1010
|
-
#
|
1011
|
-
#
|
1012
|
-
#
|
1013
|
-
#
|
1014
|
-
# ProductService.
|
1015
|
-
#
|
1016
|
-
#
|
1017
|
-
#
|
1018
|
-
#
|
1019
|
-
#
|
1020
|
-
#
|
1040
|
+
# value(s) overwrite any existing value(s) while ignoring the last update time
|
1041
|
+
# for this field. Furthermore, the last update times for the specified inventory
|
1042
|
+
# fields are overwritten by the times of the ProductService.CreateProduct or
|
1043
|
+
# ProductService.UpdateProduct request. If no inventory fields are set in
|
1044
|
+
# CreateProductRequest.product, then any pre-existing inventory information for
|
1045
|
+
# this product is used. If no inventory fields are set in SetInventoryRequest.
|
1046
|
+
# set_mask, then any existing inventory information is preserved. Pre-existing
|
1047
|
+
# inventory information can only be updated with ProductService.SetInventory,
|
1048
|
+
# ProductService.AddFulfillmentPlaces, and ProductService.
|
1049
|
+
# RemoveFulfillmentPlaces. The returned Operations is obsolete after one day,
|
1050
|
+
# and the GetOperation API returns `NOT_FOUND` afterwards. If conflicting
|
1051
|
+
# updates are issued, the Operations associated with the stale updates are not
|
1052
|
+
# marked as done until they are obsolete. This feature is only available for
|
1053
|
+
# users who have Retail Search enabled. Enable Retail Search on Cloud Console
|
1054
|
+
# before using this feature.
|
1021
1055
|
# @param [String] name
|
1022
1056
|
# Immutable. Full resource name of the product, such as `projects/*/locations/
|
1023
1057
|
# global/catalogs/default_catalog/branches/default_branch/products/product_id`.
|
@@ -1055,8 +1089,8 @@ module Google
|
|
1055
1089
|
# asynchronous. Partial updating is not supported. The operation is successfully
|
1056
1090
|
# finished only after the imported suggestions are indexed successfully and
|
1057
1091
|
# ready for serving. The process takes hours. This feature is only available for
|
1058
|
-
# users who have Retail Search enabled.
|
1059
|
-
#
|
1092
|
+
# users who have Retail Search enabled. Enable Retail Search on Cloud Console
|
1093
|
+
# before using this feature.
|
1060
1094
|
# @param [String] parent
|
1061
1095
|
# Required. The catalog which the suggestions dataset belongs to. Format: `
|
1062
1096
|
# projects/1234/locations/global/catalogs/default_catalog`.
|
@@ -1090,6 +1124,197 @@ module Google
|
|
1090
1124
|
execute_or_queue_command(command, &block)
|
1091
1125
|
end
|
1092
1126
|
|
1127
|
+
# Creates a Control. If the Control to create already exists, an ALREADY_EXISTS
|
1128
|
+
# error is returned.
|
1129
|
+
# @param [String] parent
|
1130
|
+
# Required. Full resource name of parent catalog. Format: `projects/`
|
1131
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id``
|
1132
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2Control] google_cloud_retail_v2_control_object
|
1133
|
+
# @param [String] control_id
|
1134
|
+
# Required. The ID to use for the Control, which will become the final component
|
1135
|
+
# of the Control's resource name. This value should be 4-63 characters, and
|
1136
|
+
# valid characters are /a-z-_/.
|
1137
|
+
# @param [String] fields
|
1138
|
+
# Selector specifying which fields to include in a partial response.
|
1139
|
+
# @param [String] quota_user
|
1140
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1141
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1142
|
+
# @param [Google::Apis::RequestOptions] options
|
1143
|
+
# Request-specific options
|
1144
|
+
#
|
1145
|
+
# @yield [result, err] Result & error if block supplied
|
1146
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Control] parsed result object
|
1147
|
+
# @yieldparam err [StandardError] error object if request failed
|
1148
|
+
#
|
1149
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2Control]
|
1150
|
+
#
|
1151
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1152
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1153
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1154
|
+
def create_project_location_catalog_control(parent, google_cloud_retail_v2_control_object = nil, control_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1155
|
+
command = make_simple_command(:post, 'v2/{+parent}/controls', options)
|
1156
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
|
1157
|
+
command.request_object = google_cloud_retail_v2_control_object
|
1158
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
|
1159
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Control
|
1160
|
+
command.params['parent'] = parent unless parent.nil?
|
1161
|
+
command.query['controlId'] = control_id unless control_id.nil?
|
1162
|
+
command.query['fields'] = fields unless fields.nil?
|
1163
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1164
|
+
execute_or_queue_command(command, &block)
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
# Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error
|
1168
|
+
# is returned.
|
1169
|
+
# @param [String] name
|
1170
|
+
# Required. The resource name of the Control to delete. Format: `projects/`
|
1171
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/controls/`
|
1172
|
+
# control_id``
|
1173
|
+
# @param [String] fields
|
1174
|
+
# Selector specifying which fields to include in a partial response.
|
1175
|
+
# @param [String] quota_user
|
1176
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1177
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1178
|
+
# @param [Google::Apis::RequestOptions] options
|
1179
|
+
# Request-specific options
|
1180
|
+
#
|
1181
|
+
# @yield [result, err] Result & error if block supplied
|
1182
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleProtobufEmpty] parsed result object
|
1183
|
+
# @yieldparam err [StandardError] error object if request failed
|
1184
|
+
#
|
1185
|
+
# @return [Google::Apis::RetailV2::GoogleProtobufEmpty]
|
1186
|
+
#
|
1187
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1188
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1189
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1190
|
+
def delete_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil, &block)
|
1191
|
+
command = make_simple_command(:delete, 'v2/{+name}', options)
|
1192
|
+
command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
|
1193
|
+
command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
|
1194
|
+
command.params['name'] = name unless name.nil?
|
1195
|
+
command.query['fields'] = fields unless fields.nil?
|
1196
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1197
|
+
execute_or_queue_command(command, &block)
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
# Gets a Control.
|
1201
|
+
# @param [String] name
|
1202
|
+
# Required. The resource name of the Control to get. Format: `projects/`
|
1203
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/controls/`
|
1204
|
+
# control_id``
|
1205
|
+
# @param [String] fields
|
1206
|
+
# Selector specifying which fields to include in a partial response.
|
1207
|
+
# @param [String] quota_user
|
1208
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1209
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1210
|
+
# @param [Google::Apis::RequestOptions] options
|
1211
|
+
# Request-specific options
|
1212
|
+
#
|
1213
|
+
# @yield [result, err] Result & error if block supplied
|
1214
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Control] parsed result object
|
1215
|
+
# @yieldparam err [StandardError] error object if request failed
|
1216
|
+
#
|
1217
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2Control]
|
1218
|
+
#
|
1219
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1220
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1221
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1222
|
+
def get_project_location_catalog_control(name, fields: nil, quota_user: nil, options: nil, &block)
|
1223
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
1224
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
|
1225
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Control
|
1226
|
+
command.params['name'] = name unless name.nil?
|
1227
|
+
command.query['fields'] = fields unless fields.nil?
|
1228
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1229
|
+
execute_or_queue_command(command, &block)
|
1230
|
+
end
|
1231
|
+
|
1232
|
+
# Lists all Controls by their parent Catalog.
|
1233
|
+
# @param [String] parent
|
1234
|
+
# Required. The catalog resource name. Format: `projects/`project_number`/
|
1235
|
+
# locations/`location_id`/catalogs/`catalog_id``
|
1236
|
+
# @param [String] filter
|
1237
|
+
# Optional. A filter to apply on the list results. Supported features: * List
|
1238
|
+
# all the products under the parent branch if filter is unset. * List controls
|
1239
|
+
# that are used in a single ServingConfig: 'serving_config = "
|
1240
|
+
# boosted_home_page_cvr"'
|
1241
|
+
# @param [Fixnum] page_size
|
1242
|
+
# Optional. Maximum number of results to return. If unspecified, defaults to 50.
|
1243
|
+
# Max allowed value is 1000.
|
1244
|
+
# @param [String] page_token
|
1245
|
+
# Optional. A page token, received from a previous `ListControls` call. Provide
|
1246
|
+
# this to retrieve the subsequent page.
|
1247
|
+
# @param [String] fields
|
1248
|
+
# Selector specifying which fields to include in a partial response.
|
1249
|
+
# @param [String] quota_user
|
1250
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1251
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1252
|
+
# @param [Google::Apis::RequestOptions] options
|
1253
|
+
# Request-specific options
|
1254
|
+
#
|
1255
|
+
# @yield [result, err] Result & error if block supplied
|
1256
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse] parsed result object
|
1257
|
+
# @yieldparam err [StandardError] error object if request failed
|
1258
|
+
#
|
1259
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse]
|
1260
|
+
#
|
1261
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1262
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1263
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1264
|
+
def list_project_location_catalog_controls(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1265
|
+
command = make_simple_command(:get, 'v2/{+parent}/controls', options)
|
1266
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse::Representation
|
1267
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListControlsResponse
|
1268
|
+
command.params['parent'] = parent unless parent.nil?
|
1269
|
+
command.query['filter'] = filter unless filter.nil?
|
1270
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1271
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1272
|
+
command.query['fields'] = fields unless fields.nil?
|
1273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1274
|
+
execute_or_queue_command(command, &block)
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
# Updates a Control. Control cannot be set to a different oneof field, if so an
|
1278
|
+
# INVALID_ARGUMENT is returned. If the Control to update does not exist, a
|
1279
|
+
# NOT_FOUND error is returned.
|
1280
|
+
# @param [String] name
|
1281
|
+
# Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/
|
1282
|
+
# controls/*`
|
1283
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2Control] google_cloud_retail_v2_control_object
|
1284
|
+
# @param [String] update_mask
|
1285
|
+
# Indicates which fields in the provided Control to update. The following are
|
1286
|
+
# NOT supported: * Control.name If not set or empty, all supported fields are
|
1287
|
+
# updated.
|
1288
|
+
# @param [String] fields
|
1289
|
+
# Selector specifying which fields to include in a partial response.
|
1290
|
+
# @param [String] quota_user
|
1291
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1292
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1293
|
+
# @param [Google::Apis::RequestOptions] options
|
1294
|
+
# Request-specific options
|
1295
|
+
#
|
1296
|
+
# @yield [result, err] Result & error if block supplied
|
1297
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2Control] parsed result object
|
1298
|
+
# @yieldparam err [StandardError] error object if request failed
|
1299
|
+
#
|
1300
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2Control]
|
1301
|
+
#
|
1302
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1303
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1304
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1305
|
+
def patch_project_location_catalog_control(name, google_cloud_retail_v2_control_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1306
|
+
command = make_simple_command(:patch, 'v2/{+name}', options)
|
1307
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
|
1308
|
+
command.request_object = google_cloud_retail_v2_control_object
|
1309
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Control::Representation
|
1310
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Control
|
1311
|
+
command.params['name'] = name unless name.nil?
|
1312
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1313
|
+
command.query['fields'] = fields unless fields.nil?
|
1314
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1315
|
+
execute_or_queue_command(command, &block)
|
1316
|
+
end
|
1317
|
+
|
1093
1318
|
# Gets the latest state of a long-running operation. Clients can use this method
|
1094
1319
|
# to poll the operation result at intervals as recommended by the API service.
|
1095
1320
|
# @param [String] name
|
@@ -1210,7 +1435,7 @@ module Google
|
|
1210
1435
|
end
|
1211
1436
|
|
1212
1437
|
# Performs a search. This feature is only available for users who have Retail
|
1213
|
-
# Search enabled.
|
1438
|
+
# Search enabled. Enable Retail Search on Cloud Console before using this
|
1214
1439
|
# feature.
|
1215
1440
|
# @param [String] placement
|
1216
1441
|
# Required. The resource name of the Retail Search serving config, such as `
|
@@ -1249,6 +1474,230 @@ module Google
|
|
1249
1474
|
execute_or_queue_command(command, &block)
|
1250
1475
|
end
|
1251
1476
|
|
1477
|
+
# Enables a Control on the specified ServingConfig. The control is added in the
|
1478
|
+
# last position of the list of controls it belongs to (e.g. if it's a facet spec
|
1479
|
+
# control it will be applied in the last position of servingConfig.facetSpecIds)
|
1480
|
+
# Returns a ALREADY_EXISTS error if the control has already been applied.
|
1481
|
+
# Returns a FAILED_PRECONDITION error if the addition could exceed maximum
|
1482
|
+
# number of control allowed for that type of control.
|
1483
|
+
# @param [String] serving_config
|
1484
|
+
# Required. The source ServingConfig resource name . Format: `projects/`
|
1485
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/servingConfigs/`
|
1486
|
+
# serving_config_id``
|
1487
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2AddControlRequest] google_cloud_retail_v2_add_control_request_object
|
1488
|
+
# @param [String] fields
|
1489
|
+
# Selector specifying which fields to include in a partial response.
|
1490
|
+
# @param [String] quota_user
|
1491
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1492
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1493
|
+
# @param [Google::Apis::RequestOptions] options
|
1494
|
+
# Request-specific options
|
1495
|
+
#
|
1496
|
+
# @yield [result, err] Result & error if block supplied
|
1497
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] parsed result object
|
1498
|
+
# @yieldparam err [StandardError] error object if request failed
|
1499
|
+
#
|
1500
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig]
|
1501
|
+
#
|
1502
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1503
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1504
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1505
|
+
def add_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2_add_control_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1506
|
+
command = make_simple_command(:post, 'v2/{+servingConfig}:addControl', options)
|
1507
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddControlRequest::Representation
|
1508
|
+
command.request_object = google_cloud_retail_v2_add_control_request_object
|
1509
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1510
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
|
1511
|
+
command.params['servingConfig'] = serving_config unless serving_config.nil?
|
1512
|
+
command.query['fields'] = fields unless fields.nil?
|
1513
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1514
|
+
execute_or_queue_command(command, &block)
|
1515
|
+
end
|
1516
|
+
|
1517
|
+
# Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed in a
|
1518
|
+
# Catalog, otherwise a FAILED_PRECONDITION error is returned.
|
1519
|
+
# @param [String] parent
|
1520
|
+
# Required. Full resource name of parent. Format: `projects/`project_number`/
|
1521
|
+
# locations/`location_id`/catalogs/`catalog_id``
|
1522
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] google_cloud_retail_v2_serving_config_object
|
1523
|
+
# @param [String] serving_config_id
|
1524
|
+
# Required. The ID to use for the ServingConfig, which will become the final
|
1525
|
+
# component of the ServingConfig's resource name. This value should be 4-63
|
1526
|
+
# characters, and valid characters are /a-z-_/.
|
1527
|
+
# @param [String] fields
|
1528
|
+
# Selector specifying which fields to include in a partial response.
|
1529
|
+
# @param [String] quota_user
|
1530
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1531
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1532
|
+
# @param [Google::Apis::RequestOptions] options
|
1533
|
+
# Request-specific options
|
1534
|
+
#
|
1535
|
+
# @yield [result, err] Result & error if block supplied
|
1536
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] parsed result object
|
1537
|
+
# @yieldparam err [StandardError] error object if request failed
|
1538
|
+
#
|
1539
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig]
|
1540
|
+
#
|
1541
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1542
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1543
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1544
|
+
def create_project_location_catalog_serving_config(parent, google_cloud_retail_v2_serving_config_object = nil, serving_config_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1545
|
+
command = make_simple_command(:post, 'v2/{+parent}/servingConfigs', options)
|
1546
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1547
|
+
command.request_object = google_cloud_retail_v2_serving_config_object
|
1548
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1549
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
|
1550
|
+
command.params['parent'] = parent unless parent.nil?
|
1551
|
+
command.query['servingConfigId'] = serving_config_id unless serving_config_id.nil?
|
1552
|
+
command.query['fields'] = fields unless fields.nil?
|
1553
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1554
|
+
execute_or_queue_command(command, &block)
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
# Deletes a ServingConfig. Returns a NotFound error if the ServingConfig does
|
1558
|
+
# not exist.
|
1559
|
+
# @param [String] name
|
1560
|
+
# Required. The resource name of the ServingConfig to delete. Format: `projects/`
|
1561
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/servingConfigs/`
|
1562
|
+
# serving_config_id``
|
1563
|
+
# @param [String] fields
|
1564
|
+
# Selector specifying which fields to include in a partial response.
|
1565
|
+
# @param [String] quota_user
|
1566
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1567
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1568
|
+
# @param [Google::Apis::RequestOptions] options
|
1569
|
+
# Request-specific options
|
1570
|
+
#
|
1571
|
+
# @yield [result, err] Result & error if block supplied
|
1572
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleProtobufEmpty] parsed result object
|
1573
|
+
# @yieldparam err [StandardError] error object if request failed
|
1574
|
+
#
|
1575
|
+
# @return [Google::Apis::RetailV2::GoogleProtobufEmpty]
|
1576
|
+
#
|
1577
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1578
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1579
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1580
|
+
def delete_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil, &block)
|
1581
|
+
command = make_simple_command(:delete, 'v2/{+name}', options)
|
1582
|
+
command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation
|
1583
|
+
command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty
|
1584
|
+
command.params['name'] = name unless name.nil?
|
1585
|
+
command.query['fields'] = fields unless fields.nil?
|
1586
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1587
|
+
execute_or_queue_command(command, &block)
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
# Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not
|
1591
|
+
# exist.
|
1592
|
+
# @param [String] name
|
1593
|
+
# Required. The resource name of the ServingConfig to get. Format: `projects/`
|
1594
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/servingConfigs/`
|
1595
|
+
# serving_config_id``
|
1596
|
+
# @param [String] fields
|
1597
|
+
# Selector specifying which fields to include in a partial response.
|
1598
|
+
# @param [String] quota_user
|
1599
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1600
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1601
|
+
# @param [Google::Apis::RequestOptions] options
|
1602
|
+
# Request-specific options
|
1603
|
+
#
|
1604
|
+
# @yield [result, err] Result & error if block supplied
|
1605
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] parsed result object
|
1606
|
+
# @yieldparam err [StandardError] error object if request failed
|
1607
|
+
#
|
1608
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig]
|
1609
|
+
#
|
1610
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1611
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1612
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1613
|
+
def get_project_location_catalog_serving_config(name, fields: nil, quota_user: nil, options: nil, &block)
|
1614
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
1615
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1616
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
|
1617
|
+
command.params['name'] = name unless name.nil?
|
1618
|
+
command.query['fields'] = fields unless fields.nil?
|
1619
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1620
|
+
execute_or_queue_command(command, &block)
|
1621
|
+
end
|
1622
|
+
|
1623
|
+
# Lists all ServingConfigs linked to this catalog.
|
1624
|
+
# @param [String] parent
|
1625
|
+
# Required. The catalog resource name. Format: `projects/`project_number`/
|
1626
|
+
# locations/`location_id`/catalogs/`catalog_id``
|
1627
|
+
# @param [Fixnum] page_size
|
1628
|
+
# Optional. Maximum number of results to return. If unspecified, defaults to 100.
|
1629
|
+
# If a value greater than 100 is provided, at most 100 results are returned.
|
1630
|
+
# @param [String] page_token
|
1631
|
+
# Optional. A page token, received from a previous `ListServingConfigs` call.
|
1632
|
+
# Provide this to retrieve the subsequent page.
|
1633
|
+
# @param [String] fields
|
1634
|
+
# Selector specifying which fields to include in a partial response.
|
1635
|
+
# @param [String] quota_user
|
1636
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1637
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1638
|
+
# @param [Google::Apis::RequestOptions] options
|
1639
|
+
# Request-specific options
|
1640
|
+
#
|
1641
|
+
# @yield [result, err] Result & error if block supplied
|
1642
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse] parsed result object
|
1643
|
+
# @yieldparam err [StandardError] error object if request failed
|
1644
|
+
#
|
1645
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse]
|
1646
|
+
#
|
1647
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1648
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1649
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1650
|
+
def list_project_location_catalog_serving_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1651
|
+
command = make_simple_command(:get, 'v2/{+parent}/servingConfigs', options)
|
1652
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse::Representation
|
1653
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListServingConfigsResponse
|
1654
|
+
command.params['parent'] = parent unless parent.nil?
|
1655
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1656
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1657
|
+
command.query['fields'] = fields unless fields.nil?
|
1658
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1659
|
+
execute_or_queue_command(command, &block)
|
1660
|
+
end
|
1661
|
+
|
1662
|
+
# Updates a ServingConfig.
|
1663
|
+
# @param [String] name
|
1664
|
+
# Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/
|
1665
|
+
# servingConfig/*`
|
1666
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] google_cloud_retail_v2_serving_config_object
|
1667
|
+
# @param [String] update_mask
|
1668
|
+
# Indicates which fields in the provided ServingConfig to update. The following
|
1669
|
+
# are NOT supported: * ServingConfig.name If not set, all supported fields are
|
1670
|
+
# updated.
|
1671
|
+
# @param [String] fields
|
1672
|
+
# Selector specifying which fields to include in a partial response.
|
1673
|
+
# @param [String] quota_user
|
1674
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1675
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1676
|
+
# @param [Google::Apis::RequestOptions] options
|
1677
|
+
# Request-specific options
|
1678
|
+
#
|
1679
|
+
# @yield [result, err] Result & error if block supplied
|
1680
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] parsed result object
|
1681
|
+
# @yieldparam err [StandardError] error object if request failed
|
1682
|
+
#
|
1683
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig]
|
1684
|
+
#
|
1685
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1686
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1687
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1688
|
+
def patch_project_location_catalog_serving_config(name, google_cloud_retail_v2_serving_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1689
|
+
command = make_simple_command(:patch, 'v2/{+name}', options)
|
1690
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1691
|
+
command.request_object = google_cloud_retail_v2_serving_config_object
|
1692
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1693
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
|
1694
|
+
command.params['name'] = name unless name.nil?
|
1695
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1696
|
+
command.query['fields'] = fields unless fields.nil?
|
1697
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1698
|
+
execute_or_queue_command(command, &block)
|
1699
|
+
end
|
1700
|
+
|
1252
1701
|
# Makes a recommendation prediction.
|
1253
1702
|
# @param [String] placement
|
1254
1703
|
# Required. Full resource name of the format: ``placement=projects/*/locations/
|
@@ -1291,8 +1740,45 @@ module Google
|
|
1291
1740
|
execute_or_queue_command(command, &block)
|
1292
1741
|
end
|
1293
1742
|
|
1743
|
+
# Disables a Control on the specified ServingConfig. The control is removed from
|
1744
|
+
# the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for
|
1745
|
+
# the ServingConfig.
|
1746
|
+
# @param [String] serving_config
|
1747
|
+
# Required. The source ServingConfig resource name . Format: `projects/`
|
1748
|
+
# project_number`/locations/`location_id`/catalogs/`catalog_id`/servingConfigs/`
|
1749
|
+
# serving_config_id``
|
1750
|
+
# @param [Google::Apis::RetailV2::GoogleCloudRetailV2RemoveControlRequest] google_cloud_retail_v2_remove_control_request_object
|
1751
|
+
# @param [String] fields
|
1752
|
+
# Selector specifying which fields to include in a partial response.
|
1753
|
+
# @param [String] quota_user
|
1754
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1755
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1756
|
+
# @param [Google::Apis::RequestOptions] options
|
1757
|
+
# Request-specific options
|
1758
|
+
#
|
1759
|
+
# @yield [result, err] Result & error if block supplied
|
1760
|
+
# @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig] parsed result object
|
1761
|
+
# @yieldparam err [StandardError] error object if request failed
|
1762
|
+
#
|
1763
|
+
# @return [Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig]
|
1764
|
+
#
|
1765
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1766
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1767
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1768
|
+
def remove_project_location_catalog_serving_config_control(serving_config, google_cloud_retail_v2_remove_control_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1769
|
+
command = make_simple_command(:post, 'v2/{+servingConfig}:removeControl', options)
|
1770
|
+
command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveControlRequest::Representation
|
1771
|
+
command.request_object = google_cloud_retail_v2_remove_control_request_object
|
1772
|
+
command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig::Representation
|
1773
|
+
command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ServingConfig
|
1774
|
+
command.params['servingConfig'] = serving_config unless serving_config.nil?
|
1775
|
+
command.query['fields'] = fields unless fields.nil?
|
1776
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1777
|
+
execute_or_queue_command(command, &block)
|
1778
|
+
end
|
1779
|
+
|
1294
1780
|
# Performs a search. This feature is only available for users who have Retail
|
1295
|
-
# Search enabled.
|
1781
|
+
# Search enabled. Enable Retail Search on Cloud Console before using this
|
1296
1782
|
# feature.
|
1297
1783
|
# @param [String] placement
|
1298
1784
|
# Required. The resource name of the Retail Search serving config, such as `
|
@@ -1453,12 +1939,12 @@ module Google
|
|
1453
1939
|
execute_or_queue_command(command, &block)
|
1454
1940
|
end
|
1455
1941
|
|
1456
|
-
# Starts a user
|
1457
|
-
# not
|
1458
|
-
# the catalog
|
1459
|
-
#
|
1460
|
-
# method
|
1461
|
-
#
|
1942
|
+
# Starts a user-event rejoin operation with latest product catalog. Events are
|
1943
|
+
# not annotated with detailed product information for products that are missing
|
1944
|
+
# from the catalog when the user event is ingested. These events are stored as
|
1945
|
+
# unjoined events with limited usage on training and serving. You can use this
|
1946
|
+
# method to start a join operation on specified events with the latest version
|
1947
|
+
# of product catalog. You can also use this method to correct events joined with
|
1462
1948
|
# the wrong product catalog. A rejoin operation can take hours or days to
|
1463
1949
|
# complete.
|
1464
1950
|
# @param [String] parent
|