Class: Google::Apis::RetailV2::CloudRetailService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::RetailV2::CloudRetailService
- Defined in:
- lib/google/apis/retail_v2/service.rb
Overview
Retail API
Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Incrementally adds place IDs to Product.fulfillment_info.place_ids.
-
#collect_project_location_catalog_user_event(parent, ets: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleApiHttpBody
Writes a single user event from the browser.
-
#complete_project_location_catalog_query(catalog, dataset: nil, device_type: nil, language_codes: nil, max_suggestions: nil, query: nil, visitor_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse
Completes the specified prefix with keyword suggestions.
-
#create_project_location_catalog_branch_product(parent, google_cloud_retail_v2_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Creates a Product.
-
#delete_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleProtobufEmpty
Deletes a Product.
-
#get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Gets a Product.
-
#get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse
Get which branch is currently default branch set by CatalogService.
-
#get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#import_project_location_catalog_branch_product(parent, google_cloud_retail_v2_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Bulk import of multiple Products.
-
#import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Bulk import of processed completion dataset.
-
#import_project_location_catalog_user_event(parent, google_cloud_retail_v2_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Bulk import of User events.
-
#initialize ⇒ CloudRetailService
constructor
A new instance of CloudRetailService.
-
#list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse
Gets a list of Products.
-
#list_project_location_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse
Lists all the Catalogs associated with the project.
-
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request.
-
#patch_project_location_catalog(name, google_cloud_retail_v2_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Catalog
Updates the Catalogs.
-
#patch_project_location_catalog_branch_product(name, google_cloud_retail_v2_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Updates a Product.
-
#predict_project_location_catalog_placement(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse
Makes a recommendation prediction.
-
#purge_project_location_catalog_user_event(parent, google_cloud_retail_v2_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Deletes permanently all user events specified by the filter provided.
-
#rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Triggers a user event rejoin operation with latest product catalog.
-
#remove_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Incrementally removes place IDs from a Product.fulfillment_info.place_ids.
-
#search_project_location_catalog_placements(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse
Performs a search.
-
#set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Updates inventory information for a Product while respecting the last update timestamps of each inventory field.
-
#set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleProtobufEmpty
Set a specified branch id as default branch.
-
#write_project_location_catalog_user_event(parent, google_cloud_retail_v2_user_event_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent
Writes a single user event.
Constructor Details
#initialize ⇒ CloudRetailService
Returns a new instance of CloudRetailService.
47 48 49 50 51 52 |
# File 'lib/google/apis/retail_v2/service.rb', line 47 def initialize super('https://retail.googleapis.com/', '', client_name: 'google-apis-retail_v2', client_version: Google::Apis::RetailV2::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/retail_v2/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/retail_v2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/google/apis/retail_v2/service.rb', line 358 def add_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_add_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+product}:addFulfillmentPlaces', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddFulfillmentPlacesRequest::Representation command.request_object = google_cloud_retail_v2_add_fulfillment_places_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['product'] = product unless product.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#collect_project_location_catalog_user_event(parent, ets: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleApiHttpBody
Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
956 957 958 959 960 961 962 963 964 965 966 967 |
# File 'lib/google/apis/retail_v2/service.rb', line 956 def collect_project_location_catalog_user_event(parent, ets: nil, uri: nil, user_event: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/userEvents:collect', ) command.response_representation = Google::Apis::RetailV2::GoogleApiHttpBody::Representation command.response_class = Google::Apis::RetailV2::GoogleApiHttpBody command.params['parent'] = parent unless parent.nil? command.query['ets'] = ets unless ets.nil? command.query['uri'] = uri unless uri.nil? command.query['userEvent'] = user_event unless user_event.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#complete_project_location_catalog_query(catalog, dataset: nil, device_type: nil, language_codes: nil, max_suggestions: nil, query: nil, visitor_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse
Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/google/apis/retail_v2/service.rb', line 110 def complete_project_location_catalog_query(catalog, dataset: nil, device_type: nil, language_codes: nil, max_suggestions: nil, query: nil, visitor_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+catalog}:completeQuery', ) command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse command.params['catalog'] = catalog unless catalog.nil? command.query['dataset'] = dataset unless dataset.nil? command.query['deviceType'] = device_type unless device_type.nil? command.query['languageCodes'] = language_codes unless language_codes.nil? command.query['maxSuggestions'] = max_suggestions unless max_suggestions.nil? command.query['query'] = query unless query.nil? command.query['visitorId'] = visitor_id unless visitor_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_location_catalog_branch_product(parent, google_cloud_retail_v2_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Creates a Product.
400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'lib/google/apis/retail_v2/service.rb', line 400 def create_project_location_catalog_branch_product(parent, google_cloud_retail_v2_product_object = nil, product_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/products', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation command.request_object = google_cloud_retail_v2_product_object command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product command.params['parent'] = parent unless parent.nil? command.query['productId'] = product_id unless product_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleProtobufEmpty
Deletes a Product.
441 442 443 444 445 446 447 448 449 |
# File 'lib/google/apis/retail_v2/service.rb', line 441 def delete_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
316 317 318 319 320 321 322 323 324 |
# File 'lib/google/apis/retail_v2/service.rb', line 316 def get_project_location_catalog_branch_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Gets a Product.
475 476 477 478 479 480 481 482 483 |
# File 'lib/google/apis/retail_v2/service.rb', line 475 def get_project_location_catalog_branch_product(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse
Get which branch is currently default branch set by CatalogService. SetDefaultBranch method under a specified parent catalog. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
151 152 153 154 155 156 157 158 159 |
# File 'lib/google/apis/retail_v2/service.rb', line 151 def get_project_location_catalog_default_branch(catalog, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+catalog}:getDefaultBranch', ) command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2GetDefaultBranchResponse command.params['catalog'] = catalog unless catalog.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
788 789 790 791 792 793 794 795 796 |
# File 'lib/google/apis/retail_v2/service.rb', line 788 def get_project_location_catalog_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_location_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
1138 1139 1140 1141 1142 1143 1144 1145 1146 |
# File 'lib/google/apis/retail_v2/service.rb', line 1138 def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#import_project_location_catalog_branch_product(parent, google_cloud_retail_v2_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Bulk import of multiple Products. Request processing may be synchronous. No partial updating is supported. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.
510 511 512 513 514 515 516 517 518 519 520 |
# File 'lib/google/apis/retail_v2/service.rb', line 510 def import_project_location_catalog_branch_product(parent, google_cloud_retail_v2_import_products_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/products:import', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportProductsRequest::Representation command.request_object = google_cloud_retail_v2_import_products_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Bulk import of processed completion dataset. Request processing may be synchronous. Partial updating is not supported. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
755 756 757 758 759 760 761 762 763 764 765 |
# File 'lib/google/apis/retail_v2/service.rb', line 755 def import_project_location_catalog_completion_datum(parent, google_cloud_retail_v2_import_completion_data_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/completionData:import', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportCompletionDataRequest::Representation command.request_object = google_cloud_retail_v2_import_completion_data_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#import_project_location_catalog_user_event(parent, google_cloud_retail_v2_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation. metadata is of type ImportMetadata.
994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/google/apis/retail_v2/service.rb', line 994 def import_project_location_catalog_user_event(parent, google_cloud_retail_v2_import_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/userEvents:import', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ImportUserEventsRequest::Representation command.request_object = google_cloud_retail_v2_import_user_events_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse
Gets a list of Products.
574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/google/apis/retail_v2/service.rb', line 574 def list_project_location_catalog_branch_products(parent, filter: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/products', ) command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListProductsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['readMask'] = read_mask unless read_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED. NOTE: the name
binding allows API services to override the binding to use different resource
name schemes, such as users/*/operations. To override the binding, API
services can add a binding such as "/v1/name=users/*/operations" to their
service configuration. For backwards compatibility, the default name includes
the operations collection id, however overriding users must ensure the name
binding is the parent resource, without the operations collection id.
831 832 833 834 835 836 837 838 839 840 841 842 |
# File 'lib/google/apis/retail_v2/service.rb', line 831 def list_project_location_catalog_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/operations', ) command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse
Lists all the Catalogs associated with the project.
193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/google/apis/retail_v2/service.rb', line 193 def list_project_location_catalogs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/catalogs', ) command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2ListCatalogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request. If the server
doesn't support this method, it returns UNIMPLEMENTED. NOTE: the name
binding allows API services to override the binding to use different resource
name schemes, such as users/*/operations. To override the binding, API
services can add a binding such as "/v1/name=users/*/operations" to their
service configuration. For backwards compatibility, the default name includes
the operations collection id, however overriding users must ensure the name
binding is the parent resource, without the operations collection id.
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 |
# File 'lib/google/apis/retail_v2/service.rb', line 1181 def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}/operations', ) command.response_representation = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningListOperationsResponse command.params['name'] = name unless name.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_location_catalog(name, google_cloud_retail_v2_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Catalog
Updates the Catalogs.
229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/google/apis/retail_v2/service.rb', line 229 def patch_project_location_catalog(name, google_cloud_retail_v2_catalog_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation command.request_object = google_cloud_retail_v2_catalog_object command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Catalog command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_location_catalog_branch_product(name, google_cloud_retail_v2_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Updates a Product.
619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/google/apis/retail_v2/service.rb', line 619 def patch_project_location_catalog_branch_product(name, google_cloud_retail_v2_product_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation command.request_object = google_cloud_retail_v2_product_object command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2Product::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2Product command.params['name'] = name unless name.nil? command.query['allowMissing'] = allow_missing unless allow_missing.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#predict_project_location_catalog_placement(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse
Makes a recommendation prediction.
871 872 873 874 875 876 877 878 879 880 881 |
# File 'lib/google/apis/retail_v2/service.rb', line 871 def predict_project_location_catalog_placement(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+placement}:predict', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest::Representation command.request_object = google_cloud_retail_v2_predict_request_object command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse command.params['placement'] = placement unless placement.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#purge_project_location_catalog_user_event(parent, google_cloud_retail_v2_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'lib/google/apis/retail_v2/service.rb', line 1031 def purge_project_location_catalog_user_event(parent, google_cloud_retail_v2_purge_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/userEvents:purge', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PurgeUserEventsRequest::Representation command.request_object = google_cloud_retail_v2_purge_user_events_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Triggers a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of product catalog. It can also be used to correct events joined with wrong product catalog.
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 |
# File 'lib/google/apis/retail_v2/service.rb', line 1071 def rejoin_project_location_catalog_user_event(parent, google_cloud_retail_v2_rejoin_user_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/userEvents:rejoin', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RejoinUserEventsRequest::Representation command.request_object = google_cloud_retail_v2_rejoin_user_events_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#remove_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
665 666 667 668 669 670 671 672 673 674 675 |
# File 'lib/google/apis/retail_v2/service.rb', line 665 def remove_project_location_catalog_branch_product_fulfillment_places(product, google_cloud_retail_v2_remove_fulfillment_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+product}:removeFulfillmentPlaces', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveFulfillmentPlacesRequest::Representation command.request_object = google_cloud_retail_v2_remove_fulfillment_places_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['product'] = product unless product.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_project_location_catalog_placements(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse
Performs a search. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
909 910 911 912 913 914 915 916 917 918 919 |
# File 'lib/google/apis/retail_v2/service.rb', line 909 def search_project_location_catalog_placements(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+placement}:search', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest::Representation command.request_object = google_cloud_retail_v2_search_request_object command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse command.params['placement'] = placement unless placement.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleLongrunningOperation
Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. When inventory is updated with CreateProduct and UpdateProduct, the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the CreateProduct or UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product will be used. If no inventory fields are set in UpdateProductRequest.set_mask, then any existing inventory information will be preserved. Pre-existing inventory information can only be updated with SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
717 718 719 720 721 722 723 724 725 726 727 |
# File 'lib/google/apis/retail_v2/service.rb', line 717 def set_project_location_catalog_branch_product_inventory(name, google_cloud_retail_v2_set_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:setInventory', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SetInventoryRequest::Representation command.request_object = google_cloud_retail_v2_set_inventory_request_object command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleProtobufEmpty
Set a specified branch id as default branch. API methods such as SearchService.
Search, ProductService.GetProduct, ProductService.ListProducts will treat
requests using "default_branch" to the actual branch id set as default. For
example, if projects/*/locations/*/catalogs/*/branches/1 is set as default,
setting SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/
default_branch is equivalent to setting SearchRequest.branch to projects/*/
locations/*/catalogs/*/branches/1. Using multiple branches can be useful when
developers would like to have a staging branch to test and verify for future
usage. When it becomes ready, developers switch on the staging branch using
this API while keeping using projects/*/locations/*/catalogs/*/branches/
default_branch as SearchRequest.branch to route the traffic to this staging
branch. CAUTION: If you have live predict/search traffic, switching the
default branch could potentially cause outages if the ID space of the new
branch is very different from the old one. More specifically: *
PredictionService will only return product IDs from branch newBranch. *
SearchService will only return product IDs from branch newBranch (if branch
is not explicitly set). * UserEventService will only join events with products
from branch newBranch. This feature is only available for users who have
Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/google/apis/retail_v2/service.rb', line 283 def set_project_location_catalog_default_branch(catalog, google_cloud_retail_v2_set_default_branch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+catalog}:setDefaultBranch', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SetDefaultBranchRequest::Representation command.request_object = google_cloud_retail_v2_set_default_branch_request_object command.response_representation = Google::Apis::RetailV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::RetailV2::GoogleProtobufEmpty command.params['catalog'] = catalog unless catalog.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#write_project_location_catalog_user_event(parent, google_cloud_retail_v2_user_event_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent
Writes a single user event.
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 |
# File 'lib/google/apis/retail_v2/service.rb', line 1105 def write_project_location_catalog_user_event(parent, google_cloud_retail_v2_user_event_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/userEvents:write', ) command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation command.request_object = google_cloud_retail_v2_user_event_object command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent::Representation command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2UserEvent command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |